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.

WindowsBase NETCoreApp vs WindowsDesktopApp

See original GitHub issue

I am starting this as a question, if there is a bug I am not quite sure who it belongs to.

It appears that WindowsBase assembly is both part of Microsoft.WindowsDesktop.App as well as Microsoft.NETCore.App. However, they have different assembly version ( vs

C:\Program Files\dotnet\shared\Microsoft.NETCore.App\6.0.14\WindowsBase.dll
WindowsBase, Version=, Culture=neutral, PublicKeyToken=31bf3856ad364e35


C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App\6.0.14\WindowsBase.dll
WindowsBase, Version=, Culture=neutral, PublicKeyToken=31bf3856ad364e35

My question is why do they have different versions?

(Obviously I do have an issue for context, when you compile C++/CLI assembly targeting net6.0, it uses references from Microsoft.WindowsDesktop.App. When you then add the C++/CLI assembly as a reference to a normal net6.0 project, you get a MSB3277 conflict between WindowsBase coming from a Microsoft.NETCore.App.Ref and WindowsBase coming from the C++/CLI reference.)

/cc @vatsan-madhavan @pchaurasia14

Issue Analytics

  • State:closed
  • Created 7 months ago
  • Reactions:2
  • Comments:9 (5 by maintainers)

github_iconTop GitHub Comments

dsplaistedcommented, Mar 2, 2023

How does the SDK know that given assembly reference requires a FrameworkReference to be added?

Normally NuGet restore flows that information, either for project or package references.

If you’re referencing a DLL directly, then that information doesn’t flow and you need to know to add the FrameworkReference.

joperezrcommented, Mar 1, 2023

Or perhaps the version in Microsoft.NETCore.App is just a facade to enable code compiled against .NET Framework to work.

I believe this is why.

Read more comments on GitHub >

github_iconTop Results From Across the Web

.NET Core 3 and Support for Windows Desktop ...
NET Core 3 is support for Windows desktop applications, specifically Windows Forms, Windows Presentation Framework (WPF), and UWP XAML.
Read more >
What's new with .NET for Desktop?
NET Core is to provide a unified platform for all types of applications, which includes Windows, cross-platform, and mobile applications. .NET ...
Read more >
Started to get "This project is targeting a version of .NET ...
Before VS 2022 came out I started working on a .NET 5 API ... App 3.1.5 [C:\Program Files\dotnet\shared\Microsoft. ... WindowsDesktop.App ...
Read more >
.NET desktop apps | Free tools and frameworks
Free tools and frameworks for building desktop applications with the .NET platform. Develop desktop apps for Windows, macOS, and the web.
Read more >
.NET Core 3 for Windows Desktop - .NET Blog
While developing desktop applications, you won't notice much difference between .NET Framework and .NET Core versions of WPF and Windows Forms.
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 Post

No results found

github_iconTop Related Hashnode Post

No results found