Simplified repro:
dotnet new console
dotnet build
ren ./bin/Debug/net9.0 net9.0:n
./bin/Debug/net9.0:n/app
Failed to create CoreCLR, HRESULT: 0x80070057
From @brunck on Mon, 01 Jul 2024 22:46:14 GMT
It's helpful to have a nuget.config file on the Windows side to shorten paths, due to the dastardly max path problem in VS for Windows. This breaks building the project on a Mac at the command line.
Building the same project in VS for Windows (paired to a Mac) works.
Steps to Reproduce
dotnet new ios -n someName on a Mac- Create a
nuget.config file for the created project with a Windows path like C:\n
for example:
<configuration>
<config>
<addkey="globalPackagesFolder"value="C:\n" />
</config>
</configuration>
dotnet build- or, just download and run the provided example project
Expected Behavior
The app builds with no errors.
Actual Behavior
A Failed to create CoreCLR, HRESULT: 0x80070057 error, along with a message about setting the PublishTrimmed property to false, which is disallowed in a.NET for iOS app anyway
Environment
Version information
.NET SDK version 8.0.302
Workload info: ios 17.2.8053/8.0.100 SDK 8.0.300
Example Project (If Possible)
https://github.com/brunck/reproductions/tree/master/NuGetConfigBuildError
Copied from original issue dotnet/macios#20800
Simplified repro:
From @brunck on Mon, 01 Jul 2024 22:46:14 GMT
It's helpful to have a
nuget.configfile on the Windows side to shorten paths, due to the dastardly max path problem in VS for Windows. This breaks building the project on a Mac at the command line.Building the same project in VS for Windows (paired to a Mac) works.
Steps to Reproduce
dotnet new ios -n someNameon a Macnuget.configfile for the created project with a Windows path likeC:\nfor example:
dotnet buildExpected Behavior
The app builds with no errors.
Actual Behavior
A
Failed to create CoreCLR, HRESULT: 0x80070057error, along with a message about setting thePublishTrimmedproperty to false, which is disallowed in a.NET for iOS app anywayEnvironment
Version information
.NET SDK version 8.0.302
Workload info:
ios 17.2.8053/8.0.100 SDK 8.0.300Example Project (If Possible)
https://github.com/brunck/reproductions/tree/master/NuGetConfigBuildError
Copied from original issue dotnet/macios#20800