Template icon indicating copy to clipboard operation
Template copied to clipboard

Paket dotnet version incompatability

Open JoschuaL opened this issue 10 months ago • 1 comments

On my machine, when installing the template trough dotnet new install BoleroTemplate and creating a new project configured for Paket with dotnet new bolero-app -o BoleroApp -p it asks for permission to dotnet tool restore after which it installs paket version 6.2.1. It then asks for permission to dotnet paket install which then fails with the error Paket failed with -> Error in paket.dependencies line 2 Could not parse framework 'net8.0'. Try to update or install again or report a paket bug. Because paket version 6.2.1 does not yet include support for dotnet 8.0

After cloning and editing the template to restore paket 9.0.2 instead in content/application/.config/dotnet-tools.json, it recognizes framework: net8.0 correctly, but i now get new errors

Calling dotnet restore on SetFinderF.sln D:\SetFinderF\src\SetFinderF.Server\SetFinderF.Server.fsproj : error NU1202: Package Microsoft.AspNetCore.Components 9.0.2 is not compatible with net8.0 (.NETCoreApp,Version=v8.0). Package Microsoft.AspNetCore.Components 9.0.2 supports: net9.0 (.NETCoreApp,Version=v9.0) D:\SetFinderF\src\SetFinderF.Server\SetFinderF.Server.fsproj : error NU1202: Package Microsoft.AspNetCore.Components.Web 9.0.2 is not compatible with net8.0 (.NETCoreApp,Version=v8.0). Package Microsoft.AspNetCore.Components.Web 9.0.2 supports: net9.0 (.NETCoreApp,Version=v9.0) D:\SetFinderF\src\SetFinderF.Server\SetFinderF.Server.fsproj : error NU1202: Package Microsoft.AspNetCore.Components.WebAssembly 9.0.2 is not compatible with net8.0 (.NETCoreApp,Version=v8.0). Package Microsoft.AspNetCore.Components.WebAssembly 9.0.2 supports: net9.0 (.NETCoreApp,Version=v9.0) D:\SetFinderF\src\SetFinderF.Server\SetFinderF.Server.fsproj : error NU1202: Package Microsoft.JSInterop.WebAssembly 9.0.2 is not compatible with net8.0 (.NETCoreApp,Version=v8.0). Package Microsoft.JSInterop.WebAssembly 9.0.2 supports: net9.0 (.NETCoreApp,Version=v9.0) D:\SetFinderF\src\SetFinderF.Client\SetFinderF.Client.fsproj : error NU1202: Package Microsoft.AspNetCore.Components 9.0.2 is not compatible with net8.0 (.NETCoreApp,Version=v8.0). Package Microsoft.AspNetCore.Components 9.0.2 supports: net9.0 (.NETCoreApp,Version=v9.0) D:\SetFinderF\src\SetFinderF.Client\SetFinderF.Client.fsproj : error NU1202: Package Microsoft.AspNetCore.Components.WebAssembly 9.0.2 is not compatible with net8.0 (.NETCoreApp,Version=v8.0). Package Microsoft.AspNetCore.Components.WebAssembly 9.0.2 supports: net9.0 (.NETCoreApp,Version=v9.0) D:\SetFinderF\src\SetFinderF.Client\SetFinderF.Client.fsproj : error NU1202: Package Microsoft.JSInterop.WebAssembly 9.0.2 is not compatible with net8.0 (.NETCoreApp,Version=v8.0). Package Microsoft.JSInterop.WebAssembly 9.0.2 supports: net9.0 (.NETCoreApp,Version=v9.0) D:\SetFinderF\src\SetFinderF.Client\SetFinderF.Client.fsproj : error NU1202: Package Microsoft.AspNetCore.Components 9.0.2 is not compatible with net8.0 (.NETCoreApp,Version=v8.0) / browser-wasm. Package Microsoft.AspNetCore.Components 9.0.2 supports: net9.0 (.NETCoreApp,Version=v9.0) D:\SetFinderF\src\SetFinderF.Client\SetFinderF.Client.fsproj : error NU1202: Package Microsoft.AspNetCore.Components.WebAssembly 9.0.2 is not compatible with net8.0 (.NETCoreApp,Version=v8.0) / browser-wasm. Package Microsoft.AspNetCore.Components.WebAssembly 9.0.2 supports: net9.0 (.NETCoreApp,Version=v9.0) D:\SetFinderF\src\SetFinderF.Client\SetFinderF.Client.fsproj : error NU1202: Package Microsoft.JSInterop.WebAssembly 9.0.2 is not compatible with net8.0 (.NETCoreApp,Version=v8.0) / browser-wasm. Package Microsoft.JSInterop.WebAssembly 9.0.2 supports: net9.0 (.NETCoreApp,Version=v9.0)

As for some reason paket seems to restore the dotnet 9.0 versions for some libraries, and fixing that is a bit outside my expertise.

While I am personally fine to just not use paket (as I also have 0 experience using it), it still seems bad to expose an option that doesnt actually work in the template.

JoschuaL avatar Mar 08 '25 19:03 JoschuaL

Yes indeed we need to update the version of paket that is installed by the template.

For the project you created, you can run dotnet tool update paket. Then paket install should hopefully work.

Tarmil avatar Mar 10 '25 15:03 Tarmil

This is now fixed in v0.24.17.

Tarmil avatar Jun 07 '25 11:06 Tarmil