Skip to content

Commit af63025

Browse files
authored
Fixed removal of dll references that report IsWinmdFile == true (#533)
1 parent fc55163 commit af63025

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

nuget/Microsoft.Windows.CsWinRT.targets

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,11 @@ Copyright (C) Microsoft Corporation. All rights reserved.
2727
<Target Name="CsWinRTRemoveWinMDReferences" BeforeTargets="ResolveReferences;BeforeCompile" AfterTargets="AfterResolveReferences">
2828
<ItemGroup>
2929
<!--Move winmd references into private item group to prevent subsequent winmd reference errors-->
30-
<CsWinRTRemovedReferences Include="@(ReferencePath)" Condition="'%(ReferencePath.WinMDFile)' == 'true'" />
30+
<CsWinRTRemovedReferences Include="@(ReferencePath)" Condition="'%(ReferencePath.Extension)' == '.winmd'" />
3131
<CsWinRTInputs Include="@(CsWinRTRemovedReferences)"/>
3232

3333
<!--Prevent NETSDK1130 errors from winmd references-->
34-
<ReferencePath Remove="@(ReferencePath)" Condition="'%(ReferencePath.WinMDFile)' == 'true'" />
34+
<ReferencePath Remove="@(ReferencePath)" Condition="'%(ReferencePath.Extension)' == '.winmd'" />
3535
<ReferencePathWithRefAssemblies Remove="@(CsWinRTRemovedReferences)"
3636
Condition="'%(CsWinRTRemovedReferences.Filename)%(CsWinRTRemovedReferences.Extension)' == '%(ReferencePathWithRefAssemblies.Filename)%(ReferencePathWithRefAssemblies.Extension)'" />
3737
<!--Do not publish projection source winmds -->

0 commit comments

Comments
 (0)