Reputation: 253
When executing dotnet run -c release in my terminal on OSX 10.13, I get the following error:
../../Properties/launchSettings.json...
System.ComponentModel.Win32Exception (0x80004005): No such file or
directory
at Interop.Sys.ForkAndExecProcess(String filename, String[] argv,
String[] envp, String cwd, Boolean redirectStdin, Boolean
redirectStdout, Boolean redirectStderr, Int32& lpChildPid, Int32&
stdinFd, Int32& stdoutFd, Int32& stderrFd, Boolean shouldThrow)
at System.Diagnostics.Process.StartCore(ProcessStartInfo startInfo)
at System.Diagnostics.Process.Start()
at Microsoft.DotNet.Cli.Utils.Command.Execute()
at Microsoft.DotNet.Tools.Run.RunCommand.Start()
at Microsoft.DotNet.Tools.Run.RunCommand.Run(String[] args)
at Microsoft.DotNet.Cli.Program.ProcessArgs(String[] args, ITelemetry
telemetryClient)
at Microsoft.DotNet.Cli.Program.Main(String[] args)
.NET Command Line Tools (2.2.0-preview1-007582)
Product Information: Version: 2.2.0-preview1-007582 Commit SHA-1 hash: 4845efe2ea
Runtime Environment: OS Name: Mac OS X OS Version: 10.13 OS Platform: Darwin RID: osx.10.12-x64 Base Path: /usr/local/share/dotnet/sdk/2.2.0-preview1-007582/
Microsoft .NET Core Shared Framework Host
Version : 2.1.0-preview1-25919-02 Build : 96a1025de48784825ac61e45ece24a4343e0bf01
The runtime identifier is set for OSX 10.12 as directed on the Microsoft documents. The project works on Windows 10, just not on any OSX device. The launchSettings.json file does exist. If I copy and nano the file, it will edit the file. I'm out of ideas right now.
Upvotes: 4
Views: 1796
Reputation: 253
dotnetcore 2.0.3 and 2.1 have this issue:
https://github.com/dotnet/cli/issues/6397
There is a . in our project name and it's causing the issue.
It's currently reopened as it has not been resolved.
Upvotes: 2
Reputation: 100731
Make sure that you have installed and are using a version of the .NET Core Runtime that supports macOS High Sierra (10.13).
Since you are building a self-contained app, make sure that you set the RuntimeFrameworkVersion
to a recent version to ensure that you include all the assets necessary to run on High Sierra.
For example:
<PropertyGroup>
<TargetFramework>netcoreapp1.0</TargetFramework>
<RuntimeFrameworkVersion>1.0.8</RuntimeFrameworkVersion>
</PropertyGroup>
or if you are using .NET Core 1.1:
<PropertyGroup>
<TargetFramework>netcoreapp1.1</TargetFramework>
<RuntimeFrameworkVersion>1.1.5</RuntimeFrameworkVersion>
</PropertyGroup>
.NET Core 2.0 always supported High Sierra, but to get the newest runtime for self-contained apps, you currently also need to set this property:
<PropertyGroup>
<TargetFramework>netcoreapp2.0</TargetFramework>
<RuntimeFrameworkVersion>2.0.3</RuntimeFrameworkVersion>
</PropertyGroup>
Upvotes: 0