microsoft / xlang

MIT License
875 stars 103 forks source link

MidlRT Nuget package doesn't work with WindowsAppSdk 1.0.0-preview1 #760

Closed iablaauw-MS closed 1 year ago

iablaauw-MS commented 2 years ago

The WindowsAppSdk nuget includes several references to winmds that look similar to this:

<Reference Include="Microsoft.Windows.ApplicationModel.DynamicDependency.winmd">
<HintPath>$(MSBuildThisFileDirectory)..\..\lib\uap10.0\Microsoft.Windows.ApplicationModel.DynamicDependency.winmd</HintPath>
      <Implementation Condition="'$(WindowsAppSDKFrameworkPackage)' != 'true'">$(MSBuildThisFileDirectory)..\..\runtimes\win10-$(_WindowsAppSDKFoundationPlatform)\native\Microsoft.WindowsAppRuntime.dll</Implementation>
      <IsWinMDFile>true</IsWinMDFile>
</Reference>

When a project is using MidlRT with modern idl turned off (ModernMidlRT property is false), then MidlRT calls WinMdIdl.exe to turn the winmds into .idl files. This command line chokes on these WindowsAppSdk references, because they aren't referenced as full paths, and msbuild doesn't seem to be looking at the HintPath property. This causes "file not found" build errors to pop-up.

BenJKuhn commented 2 years ago

Note for internal tracking: OS issue 36431255

github-actions[bot] commented 1 year ago

This issue is stale because it has been open 10 days with no activity. Remove stale label or comment or this will be closed in 5 days.