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 on .NET 5

See original GitHub issue

After upgrading from .NET 5 preview 7 to .NET 5 RC 2 I’m getting this error on project build: Microsoft.NET.Sdk.targets(934, 5): [NETSDK1130] Referencing a Windows Metadata component directly when targeting .NETCoreApp,Version=v5.0 is not supported. Use the C#/WinRT projection tool (https://aka.ms/cswinrt) or a provided projection for this target. To reproduce: Create WPF app using .NET 5, install newest version of ModernWpfUI (I’m getting error on older versions too), run build. Thanks in advance!

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:2
  • Comments:16 (5 by maintainers)

github_iconTop GitHub Comments

15reactions
ghost1372commented, Nov 13, 2020

@rfloresarg just change targetframework to this: net5.0-windows10.0.18362.0

6reactions
Kinnaracommented, Oct 19, 2020

The project needs to target net5.0-windows10.0.18362.0 or higher, since this library calls WinRT APIs. You can find related documentation here. The app will still be able to run on older versions of Windows.

Read more comments on GitHub >

github_iconTop Results From Across the Web

NETSDK1045: The current .NET SDK does not support ...
This error occurs when the build tools can't find the version of the .NET SDK that's needed to build a project. This is...
Read more >
Build error when using .NET 5 · Issue #4559 · dotnet/core
Hi,. I'm receiving the following error while building a application for Windows: error NETSDK1045: The current .NET SDK does not support ...
Read more >
Net 5 Scaffoling "Build failed. Use dotnet build to see the ...
1 Answer 1 ... Make sure any assembly projects included in your main project build successfully. Clean your project and make sure it...
Read more >
Azure Devops Build failing for .Net 5 when using multiple ...
I have a project that builds using the following frameworks: <TargetFrameworks>netstandard2.0;netstandard2.1;net5.0</TargetFrameworks>.
Read more >
Error in sonarqube while executing dotnet build
Hello All, I am new to this Sonarqube, so i thought to doing a test into my local project. I downloaded the sonarqube...
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