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.

NETSDK1100 blocks building on Linux

See original GitHub issue

I have a test project which multi-targets between net472;netcoreapp2.1;netcoreapp3.0. Only when targeting net472 or netcoreapp3.0 does it reference or use any WPF/WinForms types. Nevertheless, I have to set the SDK attribute to Microsoft.NET.Sdk.WindowsDesktop for this to work with netcoreapp3.0 at all, AFAIK.

This blocks the test project from building the netcoreapp2.1 target on linux, which blocks me testing my library on Linux.

How should I proceed?

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:23
  • Comments:33 (16 by maintainers)

github_iconTop GitHub Comments

20reactions
natemcmastercommented, Jan 6, 2020

I ran into this myself with the 3.1 SDK. My workaround was to add this to my csproj file. This is a workaround, of course, so your mileage may vary.

<ItemGroup>
  <KnownFrameworkReference Update="Microsoft.WindowsDesktop.App" IsWindowsOnly="false" />
  <KnownFrameworkReference Update="Microsoft.WindowsDesktop.App.WPF" IsWindowsOnly="false" />
  <KnownFrameworkReference Update="Microsoft.WindowsDesktop.App.WindowsForms" IsWindowsOnly="false" />
</ItemGroup>
18reactions
AArnottcommented, Oct 22, 2020

so we don’t want to bloat the SDK for them by including the support by default.

Why must this additional support be built into the SDK at all? Why not have it be a nuget package that can be referenced by UI projects, that includes the SDK tools necessary to build such projects?

Read more comments on GitHub >

github_iconTop Results From Across the Web

NETSDK1100: Set the `EnableWindowsTargeting` property ...
NETSDK1100 indicates that you're building a project that targets Windows on Linux or macOS. The full error message is similar to the ...
Read more >
c# - Error NETSDK1100: Windows is required to build ...
When I try to do it, a message is displayed: error NETSDK1100: Windows is required to build Windows desktop applications. Unable to create ......
Read more >
'Linux' 카테고리의 글 목록 - Hafen - 티스토리
Linux 11. Without oh-my-zsh 1: bindkey. zsh 환경에는 oh-my-zsh라는 훌륭한 ... NETSDK1100 blocks building on Linux · Issue #3592 · dotnet/sdk I have...
Read more >
Net | PDF | Xml | Microsoft Visual Studio
Install on Windows Install on macOS. Install on Linux Overview Ubuntu ... How to: Write Messages to and Read Messages from a Dataflow...
Read more >
Building Windows Desktop (WPF) on Linux : r/dotnet
All build agents are linux docker containers running… ... error NETSDK1100: Windows is required to build Windows desktop applications.
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