dotnet paket convert-from-nuget doesn't respect target framework version when creating paket.lock
Open
Nobody has claimed this yet.
- Dominant language
- F#
- Stars
- 2.1k
- Forks
- 528
- Avg merge
- 1d 12m
- Merged PRs (30d)
- 54
Description
Description
Please provide a succinct description of your issue.
Repro steps
Fastest way to reproduce
- In vs-code install
Dev Containers - Create the following folders hierarchy
bugfix-issue-id/.devcontainer/ - Create the following two files in the
.devcontainerfolder- bolero.Dockerfile
- devcontainer.json
- Content for the bolero.Dockerfile
FROM mcr.microsoft.com/dotnet/sdk:6.0 AS dev-env
WORKDIR /src
RUN dotnet new -i Bolero.Templates
- Content for the
devcontainer.json
{
"name": "tahh-bolero",
"dockerFile": "bolero.Dockerfile",
"customizations": {
"vscode": {
"extensions": [
"Ionide.Ionide-fsharp",
"ms-dotnettools.dotnet-interactive-vscode"
]
}
}
}
- Run the dev container
- In the terminal scaffold a blazor project:
$ dotnet new blazorwasm -o src/Frontend - Test the project will build and function:
$ run --project src/Frontend/Frontend.csproj - Prepare for converting to paket
$ dotnet new tool-manifest$ dotnet tool install paket$ dotnet paket convert-from-nuget
Expected behavior
Perfect build and compiling code
Actual behavior
The code will no longer build
/workspaces/blazorFakePaketZero/src/Frontend/Frontend.csproj : error NU1202: Package Microsoft.JSInterop.WebAssembly 7.0.1 is not compatible with net6.0 (.NETCoreApp,Version=v6.0). Package Microsoft.JSInterop.WebAssembly 7.0.1 supports: net7.0 (.NETCoreApp,Version=v7.0)
/workspaces/blazorFakePaketZero/src/Frontend/Frontend.csproj : error NU1202: Package Microsoft.AspNetCore.Components.Web 7.0.1 is not compatible with net6.0 (.NETCoreApp,Version=v6.0). Package Microsoft.AspNetCore.Components.Web 7.0.1 supports: net7.0 (.NETCoreApp,Version=v7.0)
/workspaces/blazorFakePaketZero/src/Frontend/Frontend.csproj : error NU1202: Package Microsoft.JSInterop.WebAssembly 7.0.1 is not compatible with net6.0 (.NETCoreApp,Version=v6.0) / browser-wasm. Package Microsoft.JSInterop.WebAssembly 7.0.1 supports: net7.0 (.NETCoreApp,Version=v7.0)
/workspaces/blazorFakePaketZero/src/Frontend/Frontend.csproj : error NU1202: Package Microsoft.AspNetCore.Components.Web 7.0.1 is not compatible with net6.0 (.NETCoreApp,Version=v6.0) / browser-wasm. Package Microsoft.AspNetCore.Components.Web 7.0.1 supports: net7.0 (.NETCoreApp,Version=v7.0)
Known workarounds
I know none
bugfix-issue-id.zip
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the dotnet paket convert-from-nuget entry point and inspect how it creates paket.lock from the Frontend.csproj. Reproduce with the provided .NET 6 Blazor project, then verify that the generated lock file respects net6.0 and the project builds without NU1202 errors.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- fsharp
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100