-
Notifications
You must be signed in to change notification settings - Fork 4.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Failed to create CoreCLR if an app has ':' (colon) in the path on Mac #104402
Comments
From @rolfbjarne on Wed, 03 Jul 2024 19:37:43 GMT 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 |
From @rolfbjarne on Wed, 03 Jul 2024 19:40:38 GMT |
Tagging subscribers to this area: @vitek-karas, @agocke, @VSadov |
This is weird to me:
That is trying to run the app - I would not expect an ios app to run on CoreCLR, we could produce a better error, but functionally this is simply not supported. But the issue states that it fails during build, which would not be this failure. What does the build failure look like? |
|
It fails to launch illink. |
Tagging subscribers to this area: @agocke, @sbomer, @vitek-karas |
Here's a simpler repro: #104402 (comment) |
The command which fails looks something like
The problem is that this leads to
Populating the internal TPA cache with this will fail because neither points to an existing file. The short version of this bug is that running a .NET app in a path which has ':' in it somewhere fails. |
Tagging subscribers to this area: @vitek-karas, @agocke, @VSadov |
Related to this, dotnet-publish fails with semicolon as well. $ dotnet new console -n 't;e;s;t'
$ cd 't;e;s;t'
$ dotnet publish -o dist
MSBUILD : error MSB1006: Property is not valid.
Switch: e
For switch syntax, type "MSBuild -help"
$ dotnet publish -p:PublishDir="$(pwd)/dist"
The "HasTrailingSlash" function only accepts a scalar value, but its argument "$(ClickOncePublishDir)" evaluates to "/Users/adeel/projects/t;e;s;t/dist" which is not a scalar value. /Users/adeel/.dotnet9/sdk/9.0.100-rc.1.24414.26/Microsoft.Common.CurrentVersion.targets
MSBUILD : error MSB1006: Property is not valid.
Switch: e
For switch syntax, type "MSBuild -help"
# without publishdir or -o / --output, it works
$ dotnet publish
Restore complete (0,3s)
You are using a preview version of .NET. See: https://aka.ms/dotnet-support-policy
t;e;s;t succeeded (0,3s) → bin/Release/net9.0/publish/
Build succeeded in 0,7s |
Simplified repro:
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 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
Copied from original issue xamarin/xamarin-macios#20800
The text was updated successfully, but these errors were encountered: