Skip to content

Failed to create CoreCLR if an app has ':' (colon) in the path on Mac #104402

Description

@rolfbjarne

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

  1. dotnet new ios -n someName on a Mac
  2. 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>
  1. dotnet build
  2. 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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    • Status
      No status

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions