Skip to content

Do not import .NET Framework's copy of Microsoft.WinFX.targets when building Sdk style projects.  #4948

@vatsan-madhavan

Description

@vatsan-madhavan

From dotnet/wpf#2258 (comment)

In SDK style projects, we didn't intend for WPF specific functionality to be present unless Microsoft.NET.Sdk.WindowsDesktop SDK is used. Contrary to this intention, when MSBuild/Visual Studio is used for builds, .NET Framework's copy of WinFX.targets gets imported by default irrespective of the SDK being used. This happens even for Microsoft.NET.Sdk projects.

image

This results in inconsistent results for Resource items when built by msbuild vs. dotnet. For e.g., a Microsoft.NET.Sdk project with Resource items built using msbuild will invoke PresentationBuildTasks (the .NET Framework version) and embed the resource into the assembly.

The same project, when built using dotnet will not do this.

A developer could perceive the dotnet behavior as a regression (as seen in dotnet/wpf#2258), but in reality the msbuild behavior is unexpected.

/cc @nguerrera, @dsplaisted, @livarcocc
/cc @rladuca

Metadata

Metadata

Assignees

Labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions