Hardcode LKG version of ucrtbased.dll (#25444)
authorWilliam Godbe <wigodbe@microsoft.com>
Thu, 27 Jun 2019 03:41:42 +0000 (20:41 -0700)
committerwtgodbe <wigodbe@microsoft.com>
Thu, 27 Jun 2019 03:43:00 +0000 (20:43 -0700)
* Hardcode LKG version of ucrtbased.dll

* Only use hardcoded UCRT version when search path fails

* Add missing single-quotes

tests/src/Interop/Interop.settings.targets

index 117a54f..f56113c 100644 (file)
 
     <None Include="$(VCToolsRedistDir)onecore/debug_nonredist/$(Platform)/Microsoft.VC*.DebugCRT/vcruntime*d.dll" CopyToOutputDirectory="Always" />
     <None Include="$(VCToolsRedistDir)onecore/debug_nonredist/$(Platform)/Microsoft.VC*.DebugCRT/msvcp*d.dll" CopyToOutputDirectory="Always" />
-    <None Include="$(ExtensionSdkDir)/Microsoft.UniversalCRT.Debug/$(UCRTVersion)/Redist/Debug/$(Platform)/ucrtbased.dll" CopyToOutputDirectory="Always" />
+    <None Include="$(ExtensionSdkDir)/Microsoft.UniversalCRT.Debug/$(UCRTVersion)/Redist/Debug/$(Platform)/ucrtbased.dll" CopyToOutputDirectory="Always"
+        Condition="Exists('$(ExtensionSdkDir)/Microsoft.UniversalCRT.Debug/$(UCRTVersion)/Redist/Debug/$(Platform)/ucrtbased.dll')" />
+    
+    <!-- There's a bug in VS that causes UCRTVersion env var to get set to a version that isn't actually installed on the machine. -->
+    <!-- Until that gets resolved, we need this workaround to grab the last "known" good version of ucrtbased.dll -->
+    <None Include="$(ExtensionSdkDir)/Microsoft.UniversalCRT.Debug/10.0.17763.0/Redist/Debug/$(Platform)/ucrtbased.dll" CopyToOutputDirectory="Always"
+        Condition="!Exists('$(ExtensionSdkDir)/Microsoft.UniversalCRT.Debug/$(UCRTVersion)/Redist/Debug/$(Platform)/ucrtbased.dll')" />
   </ItemGroup>
 </Project>