System.IO.FileNotFoundException: Could not load file or assembly 'JasperFx.Core, Version=1.4.0.0, Culture=neutral, PublicKeyToken=null'. The system cannot find the file specified. #758
When running a basic empty ASP.NET Core project in F# configured to use a library calling JasperFx under the hoods (Oakton, Wolverine, etc...) I get the following exception on application startup:
Unhandled exception. System.IO.FileNotFoundException: Could not load file or assembly 'JasperFx.Core, Version=1.4.0.0, Culture=neutral, PublicKeyToken=null'. The system cannot find the file specified.
File name: 'JasperFx.Core, Version=1.4.0.0, Culture=neutral, PublicKeyToken=null'
at Oakton.CommandFactory..ctor()
at Oakton.CommandLineHostingExtensions.ApplyOaktonExtensions(IHostBuilder builder)
What is strange is that the dll is correctly copied to the output directory, however its metadata are a bit strange: namely the version is set to 0.0.0.0, here is what JetBrains Rider displays about the assembly referenced by the project
Needless to say that this issue is quite blocking, running a project with something as basic as the below should reproduce the exception:
let exitCode = 0
let builder = WebApplication.CreateBuilder(args)
builder.Host.ApplyOaktonExtensions()
builder.Services.AddControllers()
builder.Services.AddResourceSetupOnStartup()
let app = builder.Build()
app.RunOaktonCommands(args) |> Async.AwaitTask
exitCode
If I remove the lines regarding oakton and try to configure Wolverine using the UseWolverine method of the hostbuilder, this exception will be thrown at that point instead. I've seen people succefully boostrap JasperFx-based projects using F# like here so I'm a bit puzzled.
Everything works properly in the C# version but I am in the process of migrating all the projects to F#. Any idea or pointers? Cleaning/Rebuilding does not help unfortunately. The project targets .NET 7:
When running a basic empty ASP.NET Core project in F# configured to use a library calling JasperFx under the hoods (Oakton, Wolverine, etc...) I get the following exception on application startup:
What is strange is that the dll is correctly copied to the output directory, however its metadata are a bit strange: namely the version is set to 0.0.0.0, here is what JetBrains Rider displays about the assembly referenced by the project
Needless to say that this issue is quite blocking, running a project with something as basic as the below should reproduce the exception:
If I remove the lines regarding oakton and try to configure Wolverine using the UseWolverine method of the hostbuilder, this exception will be thrown at that point instead. I've seen people succefully boostrap JasperFx-based projects using F# like here so I'm a bit puzzled.
Everything works properly in the C# version but I am in the process of migrating all the projects to F#. Any idea or pointers? Cleaning/Rebuilding does not help unfortunately. The project targets .NET 7: