Skip to content

Pass dotnet host options to worker nodes - #859

Merged
rainersigwald merged 1 commit into
dotnet:xplatfrom
rainersigwald:preserve-dotnet-config
Aug 5, 2016
Merged

rainersigwald merged 1 commit into
dotnet:xplatfrom
rainersigwald:preserve-dotnet-config

Conversation

@rainersigwald

Copy link
Copy Markdown
Member

Multiprocess builds were hanging when called through dotnet build3,
because the child process spawned from LaunchNode failed immediately on
start with

A fatal error was encountered. The library 'hostpolicy.dll' required to
execute the application was not found

That was because MSBuild preserved the path to dotnet, but not the
additional arguments required for it to assemble a runtime environment.

This commit uses the property bag that the host provides to find the right
deps file. At the moment, there is no programmatic way to access the
runtimeconfig, so I'm relying on a heuristic--that it'll match the deps
file.

The property-bag access code is based on
https://github.com/dotnet/cli/blob/b7075b857b48b08908bd340ffd3f41f756318339/src/Microsoft.DotNet.Cli.Utils/Muxer.cs#L36-L40

Multiprocess builds were hanging when called through `dotnet build3`,
because the child process spawned from `LaunchNode` failed immediately on
start with

```
A fatal error was encountered. The library 'hostpolicy.dll' required to
execute the application was not found
```

That was because MSBuild preserved the path to `dotnet`, but not the
additional arguments required for it to assemble a runtime environment.

This commit uses the property bag that the host provides to find the right
deps file. At the moment, there is no programmatic way to access the
runtimeconfig, so I'm relying on a heuristic--that it'll match the deps
file.

The property-bag access code is based on
https://github.com/dotnet/cli/blob/b7075b857b48b08908bd340ffd3f41f756318339/src/Microsoft.DotNet.Cli.Utils/Muxer.cs#L36-L40
@rainersigwald

Copy link
Copy Markdown
Member Author

@piotrpMSFT, @eerhardt--I have some questions!

Is this temporary?

Is there a bug or PR I can crosslink for the "programmatically get runtimeconfig" part?

@TheRealPiotrP

Copy link
Copy Markdown

@rainersigwald I'm working on a PR now. Once it's ready you won't need to get runtimeconfig anymore. Feel free to create an issue on /cli if you want a reference.

@AndyGerlicher

Copy link
Copy Markdown
Contributor

:shipit:

@rainersigwald
rainersigwald merged commit cd53996 into dotnet:xplat Aug 5, 2016
@rainersigwald
rainersigwald deleted the preserve-dotnet-config branch August 5, 2016 21:42
rainersigwald added a commit to rainersigwald/msbuild that referenced this pull request Aug 9, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants