Open Maoni0 opened 4 years ago
@Maoni0 Solution: Simply create "ucrt\x64", "ucrt\x86" sub folders and rerun MSbuild. MSbuild doesn't actually need anything from this folder but it's set as input variable anyways during Visual Studio setup.
Haven't seen any other repro of this.
CS1668: Invalid search path 'C:\Program Files (x86)\Windows Kits\10\lib\10.0.19041.0\ucrt\x64' specified in 'LIB environment variable' -- 'directory does not exist'
I hit this in VS after uninstalling that version (and several others) of the Windows SDK. Restarting VS seems to have made it go away.
FYI - I've done something like this to work around this warning in my builds.
<PropertyGroup>
<SetBuildDefaultEnvironmentVariablesDependsOn>
_SanitizeLibraryPathComponents;
$(SetBuildDefaultEnvironmentVariablesDependsOn);
</SetBuildDefaultEnvironmentVariablesDependsOn>
</PropertyGroup>
<!--
Ensure that components of $(LibraryPath) that are actually not
present on disk are removed.
This target will run before 'SetBuildDefaultEnvironmentVariables'
is called within Microsoft.Cpp.Current.targets,
which sets the environment variable 'LIB' based on $(LibraryPath).
-->
<Target Name="_SanitizeLibraryPathComponents">
<ItemGroup>
<_LibraryPathComponents Include="$(LibraryPath)" />
</ItemGroup>
<PropertyGroup>
<LibraryPath>@(_LibraryPathComponents->Exists())</LibraryPath>
</PropertyGroup>
</Target>
Initial cost estimate: 1 week Initial contacts: @trylek, @hoyosjs, @ViktorHofer
so I just freshly cloned the repo and failed to build. this was what I got when trying to build clr -
my latest version in C:\Program Files (x86)\Windows Kits\10\Lib is 10.0.19041.0 but it does not have a ucrt dir in it -
this is because I installed "Windows Driver Kit - Windows 10.0.19041.1" which created this 10.0.19041.0 dir but it did not install ucrt in it.
when I uninstalled the Windows Driver Kit the build succeeded. now the last ver in this dir does have ucrt:
C:\WINDOWS\system32>dir "C:\Program Files (x86)\Windows Kits\10\Lib\10.0.18362.0" Volume in drive C is OSDisk Volume Serial Number is EA9A-AF54
so this says we have problems searching for the right dir for ucrt.