Fix crossgen path separator and add opt-out
authorEric St. John <ericstj@microsoft.com>
Tue, 2 May 2017 00:19:03 +0000 (17:19 -0700)
committerEric St. John <ericstj@microsoft.com>
Tue, 2 May 2017 16:54:04 +0000 (09:54 -0700)
Commit migrated from https://github.com/dotnet/core-setup/commit/6f421a16f704d91c4e909fafacd21ad17a8c48ff

src/installer/pkg/projects/Microsoft.NETCore.App/src/Microsoft.NETCore.App.depproj

index f148707..75fd9a2 100644 (file)
   </Target>
 
   <!-- Prepares all items for cross-gen and replaces package file items with their cross-gen'ed equivalents -->
-  <Target Name="PrepareForCrossGen" Condition="'$(NuGetRuntimeIdentifier)' != ''" DependsOnTargets="GetFilesFromPackages">
+  <Target Name="PrepareForCrossGen" Condition="'$(NuGetRuntimeIdentifier)' != '' AND '$(DisableCrossgen)' != 'true'" DependsOnTargets="GetFilesFromPackages">
     <PropertyGroup>
       <_crossGenIntermediatePath>$(IntermediateOutputPath)/crossgen</_crossGenIntermediatePath>
     </PropertyGroup>
     </ItemGroup>
     
     <PropertyGroup>
-      <_crossgenPlatformAssemblies>@(_crossgenPlatformDirectories->'%(Identity)', '%3B')</_crossgenPlatformAssemblies>
+      <!-- Use PathSeparator so that we get a ':' on unix and ';' on windows
+           Escape the value so that the ';' doesn't result multiple lines when writing to the RSP file -->
+      <_pathSeparatorEscaped>$([MSBuild]::Escape($([System.IO.Path]::PathSeparator.ToString())))</_pathSeparatorEscaped>
+      <_crossgenPlatformAssemblies>@(_crossgenPlatformDirectories->'%(Identity)', '$(_pathSeparatorEscaped)')</_crossgenPlatformAssemblies>
     </PropertyGroup>
   </Target>