question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Build error with SDK-style project and .NET Framework 4.8

See original GitHub issue

With 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:closed
  • Created 3 years ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
JVimescommented, Oct 3, 2020

Thank you, never mind. I did a git clean and it works.

Have you considered enabling GitHub sponsorship? I’d like to sponsor.

0reactions
Kinnaracommented, Oct 2, 2020

My simple test app doesn’t get this exception. Could you please share a repro project?

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found