Build error with SDK-style project and .NET Framework 4.8
See original GitHub issueWith an SDK-style .csproj that targets .NET Framework 4.8:
<Project Sdk="Microsoft.NET.Sdk.WindowsDesktop">
<PropertyGroup>
<OutputType>WinExe</OutputType>
<TargetFramework>net48</TargetFramework>
<UseWPF>true</UseWPF>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="ModernWpfUI" Version="0.9.1" />
</ItemGroup>
</Project>
I get build error:
MC1000 Unknown build error, ‘Could not find assembly ‘netstandard, Version=2.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51’. Either explicitly load this assembly using a method such as LoadFromAssemblyPath() or use a MetadataAssemblyResolver that returns a valid assembly.’
It builds if I target .NET Framework 4.6.1, but not 4.8.
Any ideas? Thank you.
Issue Analytics
- State:
- Created 3 years ago
- Comments:6 (3 by maintainers)
Top Results From Across the Web
Visual Basic WPF .NET Framework 48 SDK style project ...
I want to create a legacy .NET Framework 4.8 WPF app in Visual Basic as SDK style project. For C# I can just...
Read more >Visual Studio 16.8 breaks .NET Framework 4.8 WPF build
I've now updated to Visual Studio 16.8, and with that, my existing (large) solution fails to build any WPF projects. Error messages such...
Read more >Troubleshoot .NET Framework targeting errors
To resolve the error, make sure that your application targets a .NET version that's compatible with the version that's targeted by the projects...
Read more >How to roll back solution from .net6 to Framework 4.8
i am building a desk top application and encountered unpleasant limitation of VS 2022 (with .net6). i cannot add ReportViewer to the form....
Read more >NET project SDK overview
Build errors · Remove the explicit Compile , EmbeddedResource , or None items that match the implicit ones listed on the previous table....
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Thank you, never mind. I did a git clean and it works.
Have you considered enabling GitHub sponsorship? I’d like to sponsor.
My simple test app doesn’t get this exception. Could you please share a repro project?