Skip to content

Commit 53f75d1

Browse files
committed
Fix hopefully
1 parent 96f5319 commit 53f75d1

File tree

1 file changed

+14
-3
lines changed

1 file changed

+14
-3
lines changed

src/Servers/IIS/Directory.Build.props

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,24 @@
55
<KestrelSharedSourceRoot>$(MSBuildThisFileDirectory)..\Kestrel\shared\</KestrelSharedSourceRoot>
66

77
<EnableManagedPackageReferenceSupport>true</EnableManagedPackageReferenceSupport>
8-
<LibNetHostPath>$(NuGetPackageRoot)microsoft.netcore.app.host.win-$(TargetArchitecture)\$(MicrosoftNETCoreAppRefVersion)\runtimes\win-$(TargetArchitecture)\native</LibNetHostPath>
8+
<HostArch>$(Platform)</HostArch>
9+
<HostArch Condition="'$(Platform)' == 'Win32'">x86</HostArch>
10+
<HostArch Condition="'$(Platform)' == 'AnyCPU'">x64</HostArch>
11+
<HostArch Condition="'$(DotNetBuild)' == 'true'">$(TargetArchitecture)</HostArch>
12+
<LibNetHostPath>$(NuGetPackageRoot)microsoft.netcore.app.host.win-$(HostArch)\$(MicrosoftNETCoreAppRefVersion)\runtimes\win-$(HostArch)\native</LibNetHostPath>
913
<!-- This tools version MUST match the same version as runtime uses to compile libnethost.lib -->
1014
<PlatformToolsetVersion>143</PlatformToolsetVersion>
1115
</PropertyGroup>
1216

13-
<ItemGroup Condition="'$(MSBuildProjectExtension)' == '.vcxproj'">
14-
<PackageReference Include="Microsoft.NETCore.App.Host.win-$(TargetArchitecture)" Version="$(MicrosoftNETCoreAppRefVersion)" PrivateAssets="all" ExcludeAssets="all" />
17+
<!-- Platform is different during restore than during build. Therefore, restore everything when not building the product. -->
18+
<ItemGroup Condition="'$(MSBuildProjectExtension)' == '.vcxproj' and '$(DotNetBuild)' != 'true'">
19+
<PackageDownload Include="Microsoft.NETCore.App.Host.win-x64" Version="[$(MicrosoftNETCoreAppRefVersion)]" />
20+
<PackageDownload Include="Microsoft.NETCore.App.Host.win-x86" Version="[$(MicrosoftNETCoreAppRefVersion)]" />
21+
<PackageDownload Include="Microsoft.NETCore.App.Host.win-arm64" Version="[$(MicrosoftNETCoreAppRefVersion)]" />
22+
</ItemGroup>
23+
24+
<ItemGroup Condition="'$(MSBuildProjectExtension)' == '.vcxproj' and '$(DotNetBuild)' == 'true'">
25+
<PackageDownload Include="Microsoft.NETCore.App.Host.win-$(TargetArchitecture)" Version="[$(MicrosoftNETCoreAppRefVersion)]" />
1526
</ItemGroup>
1627

1728
</Project>

0 commit comments

Comments
 (0)