DOTNET_HOSTING_OPTIMIZATION_CACHE requires architecture in the folder name
It seems that setting DOTNET_HOSTING_OPTIOMIZATION_CACHE requires the architecture to be part of the path. I was under the impression that you just point it to a folder that has two subfolders in it and it works.
So, my native image cache has:
- ni-cache\x86
- ni-cache\x64
If the env var points to the ni-cache, the packages are not loaded but if I point to ni-cache\x64 then it works.
Environment data
dotnet --info output:
.NET Command Line Tools (1.0.0-rc2-002439)
Product Information: Version: 1.0.0-rc2-002439 Commit Sha: ef0c3b2cee
Runtime Environment: OS Name: Windows OS Version: 10.0.10586 OS Platform: Windows RID: win10-x64
It looks like there is a workaround here. @schellap, is the behavior by-design?
No, it is not by design. In fact code from the commit SHA above seems to be appending get_arch and get_arch is x86/x64. Can I ask @victorhurdugaci to share set COREHOST_TRACE=1 output with me, please?
https://github.com/dotnet/cli/blob/ef0c3b2cee6c2cae84a0201e794ec1c272c0e211/src/corehost/cli/deps_resolver.cpp#L210
https://github.com/dotnet/cli/blob/5b38dd6765f0bf9b3fdd198d7e2e762fbf1fcbed/src/corehost/common/utils.cpp#L155
Just tried to repro and things work as expected on this specified version:
- Created
c:\temp,c:\temp\x64;set DOTNET_HOSTING_OPTIMIZATION_CACHE=c:\temp - Downloaded https://dotnetcli.blob.core.windows.net/dotnet/beta/Binaries/1.0.0-rc2-002439/dotnet-dev-win-x64.1.0.0-rc2-002439.zip
- Copied
%USERPROFILE%\.nuget\packages\runtime.win7.System.Consoleintoc:\temp\x64 dotnet help- Saw this in the TPA:
.dll;c:\temp\x64\runtime.win7.System.Console\4.0.0-rc2-24018\runtimes\win7\lib\netstandard1.3\System.Console.dll;H:\Downloads
That's strange. I cannot reproduce it anymore... I'll investigate more but it seems to work now. Will reopen if I find a case in which it doesn't work
Are you hitting MAX_PATH?
Nope. The folder in the root of the drive