Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dotnet build is not able to map normalized TFMs #46947

Open
leotsarev opened this issue Feb 19, 2025 · 0 comments
Open

Dotnet build is not able to map normalized TFMs #46947

leotsarev opened this issue Feb 19, 2025 · 0 comments
Labels
Area-NetSDK untriaged Request triage from a team member

Comments

@leotsarev
Copy link

Describe the bug

When evaluating /p:TargetFramework, msbuild expect EXACT value as in .csproj and does not accept normalized value.

To Reproduce

<Project Sdk="Microsoft.NET.Sdk">
  <PropertyGroup>
    <TargetFramework>netstandard2</TargetFramework>
  </PropertyGroup>
</Project>

Working: dotnet build /p:TargetFramework=netstandard2

Not working: dotnet build /p:TargetFramework=netstandard2.0

Exceptions (if any)

C:\Program Files\dotnet\sdk\9.0.200\Sdks\Microsoft.NET.Sdk\targets\Microsoft.PackageDependencyResolution.targets(266,5): error NETSDK1005: Assets file 'C:\Users\leo\source\repos\leotsarev\joinrpg-net\src\JoinRpg.XGameApi.Contract\obj\project.assets.json' doesn't have a target for 'netstandard2.0'. Ensure that restore has run and that you have included 'netstandard2.0' in the TargetFrameworks for your project.

Further technical details

.NET SDK:
Version: 9.0.200
Commit: 90e8b20
Workload version: 9.0.200-manifests.c4f6226a
MSBuild version: 17.13.8+cbc39bea8

Runtime Environment:
OS Name: Windows
OS Version: 10.0.26100
OS Platform: Windows
RID: win-x64
Base Path: C:\Program Files\dotnet\sdk\9.0.200\

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-NetSDK untriaged Request triage from a team member
Projects
None yet
Development

No branches or pull requests

1 participant