The Windows App SDK empowers all Windows desktop apps with modern Windows UI, APIs, and platform features, including back-compat support, shipped via NuGet.
Severity Code Description Project File Line Suppression State Details
Error (active) NETSDK1152 Found multiple publish output files with the same relative path: D:\source\repos\WinmdTest\WinmdTest\BuildAssets\Microsoft.Windows.Widgets.winmd, D:\source\repos\WinmdTest\WinmdTest\obj\x64\Debug\net8.0-windows10.0.22621.0\MsixContent\Microsoft.Windows.Widgets.winmd. WinmdTest C:\Program Files\dotnet\sdk\8.0.400\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.ConflictResolution.targets 112
Originally, I think this issue relates to msbuild. However when I downgrade the version of Microsoft.WindowsAppSDK, this issue just disappear. So I decide to report it here.
Sometimes, I can avoid the compile issue when changing CopyToOutputDirectory="PreserveNewest" to CopyToOutputDirectory="Never". But it causes Typename or Namespace was not found in metadata file. issue, and it seems the project has issues for loading the winmd files.
This issue will happen in Microsoft.WindowsAppSDK 1.5+ (1.5 included).
<!-- No Issue Using This Nuget Package. -->
<PackageReference Include="Microsoft.WindowsAppSDK" Version="1.4.240802001" />
<!-- Issue Exists Using This Nuget Package. -->
<!-- <PackageReference Include="Microsoft.WindowsAppSDK" Version="1.5.240227000" /> -->
Using the <PackageReference Include="Microsoft.WindowsAppSDK" Version="1.4.240802001" />, the project can work well. But <PackageReference Include="Microsoft.WindowsAppSDK" Version="1.5.240227000" /> cannot.
Describe the bug
If you include winmd file in your project, like this:
and then it will give you the issue:
Originally, I think this issue relates to
msbuild
. However when I downgrade the version ofMicrosoft.WindowsAppSDK
, this issue just disappear. So I decide to report it here.Sometimes, I can avoid the compile issue when changing
CopyToOutputDirectory="PreserveNewest"
toCopyToOutputDirectory="Never"
. But it causesTypename or Namespace was not found in metadata file.
issue, and it seems the project has issues for loading the winmd files.This issue will happen in Microsoft.WindowsAppSDK 1.5+ (1.5 included).
Steps to reproduce the bug
<PackageReference Include="Microsoft.WindowsAppSDK" Version="1.4.240802001" />
, the project can work well. But<PackageReference Include="Microsoft.WindowsAppSDK" Version="1.5.240227000" />
cannot.Expected behavior
No response
Screenshots
No response
NuGet package version
None
Packaging type
Packaged (MSIX)
Windows version
Windows 11 version 22H2 (22621, 2022 Update)
IDE
Visual Studio 2022
Additional context
No response