Closed brunck closed 2 months ago
This looks like a bug in .NET:
$ mkdir rootdir
$ cd rootdir
$ dotnet new console
[...]
$ dotnet publish /p:PublishDir=C:
[...]
$ dotnet exec C:/rootdir.dll
Failed to create CoreCLR, HRESULT: 0x80070057
Looks like variations of https://github.com/dotnet/runtime/issues/3163 and https://github.com/dotnet/runtime/issues/75387
This issue was moved to dotnet/runtime#104402
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 Macnuget.config
file for the created project with a Windows path likeC:\n
for example:dotnet build
Expected Behavior
The app builds with no errors.
Actual Behavior
A
Failed to create CoreCLR, HRESULT: 0x80070057
error, along with a message about setting thePublishTrimmed
property 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.300`Example Project (If Possible)
https://github.com/brunck/reproductions/tree/master/NuGetConfigBuildError