Skip to content

Use Process.MainModule to find the dotnet muxer - #233

Merged
natemcmaster merged 2 commits into
devfrom
namc/mainmodule
May 24, 2017
Merged

Use Process.MainModule to find the dotnet muxer#233
natemcmaster merged 2 commits into
devfrom
namc/mainmodule

Conversation

@natemcmaster

Copy link
Copy Markdown

Per discussion on https://github.com/dotnet/core-setup/issues/2473, it appears Process.MainModule is a more accurate way to find the path to corehost.

Resolves issues related to multi-hive lookup and aspnet/dotnettools and aspnet/buildtools.

var muxerPath = DotNetMuxer.MuxerPath;
Assert.NotNull(muxerPath);
Assert.True(File.Exists(muxerPath), "The file did not exist");
Assert.True(Path.IsPathRooted(muxerPath), "The path should be rooted");

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you also add a Assertion that says the file name is dotnet.exe? Just so we know in case they ever break us.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will do. On second thought, it would be good to add this to the DotNetMuxer too. Process.MainModule will return the path to corehost in standalone mode ( which is typically renamed to MyAppName.exe). This is muxer, so we should fallback to "dotnet" on PATH in that case.

@natemcmaster
natemcmaster merged commit 04e2b85 into dev May 24, 2017
@natemcmaster
natemcmaster deleted the namc/mainmodule branch May 24, 2017 17:44
natemcmaster pushed a commit that referenced this pull request Nov 5, 2018
* Modify PhysicalFileWatcher.Watch to work for new files being added

Fixes #233
@ghost ghost locked as resolved and limited conversation to collaborators May 30, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants