Skip to content
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

Get MSBuild to run on coreclr #4058

Closed
japj opened this issue Mar 18, 2015 · 5 comments
Closed

Get MSBuild to run on coreclr #4058

japj opened this issue Mar 18, 2015 · 5 comments

Comments

@japj
Copy link
Contributor

japj commented Mar 18, 2015

I know it is probably still a fair bit away from succeeding, but this is to get a discussion started on what is needed to run MSBuild on coreclr (assuming that is the path for 'selfhosting' a build in a crossplatform way).

I started with building MSBuild (from the very recent git repository) on an Azure VS2015 CTP machine (in order to get binaries build). I copied these binaries over to my local development machine and tried to do a "CoreRun.exe MSBuild.exe".

This currently fails with:

Unhandled Exception: System.MissingMethodException: Method not found: 'System.String System.Environment.get_CommandLine()'.
at Microsoft.Build.CommandLine.MSBuildApp.Main()

It seems the CommandLine property is currently excluded from coreclr by an !FEATURE_CORECLR in src\mscorlib\src\System\Environment.cs

@ellismg
Copy link
Contributor

ellismg commented Mar 19, 2015

This is definitely something we'd want to do. The first thing would be to get MSBuild building against the contracts from .NET Core. This would let us quickly determine what surface area (like Environment.CommandLine) is not currently present on .NET Core and we could start looking into either adding it back or figure out how MSBuild could work around the issue (for this specific example, a quick glance at their code makes it look like they parse the entire command line themselves today, making the assumption that the first thing in the command line is the path to MSBuild, which is no longer a true assumption in the case where you run with CoreRun.exe, so it's unclear that even if we add the API back things are going to just work).

The complete set of APIs we expect to expose as part of .NET core (and their corresponding contracts) live here: https://github.com/dotnet/corefx-progress.

It's probably a good amount of work to do this, and better tracked in the MSBuild repository. I'm not exactly sure what their timeline is on doing this or what their plans for having the community help are. However, this is a prerequisite for running on top of CoreCLR on either Mac, Linux or Windows long term.

So my recommendation would be to start there. Once we have msbuild comping against the surface area from .NET Core we can start the process of actually running it on CoreCLR and see how things go.

Personally, I'm super excited about getting this all working. It will be very nice to be able to have MSBuild on top of CoreCLR and then cross platform.

@MattWhilden
Copy link
Contributor

👍

@linquize
Copy link
Contributor

https://github.com/Microsoft/msbuild just opens the source

CarolEidt referenced this issue in CarolEidt/coreclr Mar 25, 2015
… || operator

This was very old code that was needed before the rationalization of assignments (should have been GT_CLS_VAR and GT_IND).  GT_CLS_VAR should now never be seen post-rationalizer.
CarolEidt referenced this issue in dotnet/coreclr Mar 25, 2015
Fix #497: Identical expressions to the left and right of the ||...
@ellismg ellismg reopened this Mar 25, 2015
josteink referenced this issue in josteink/coreclr Mar 25, 2015
This was very old code that was needed before the rationalization
of assignments (should have been GT_CLS_VAR and GT_IND).
GT_CLS_VAR should now never be seen post-rationalizer.
@MattWhilden
Copy link
Contributor

@japj Would you mind closing this out and opening it up over in https://github.com/Microsoft/msbuild. If this effort ends up needing more surface area for the framework, those can be opened in https://github.com/dotnet/corefx.

Would love to see this happen!

@japj
Copy link
Contributor Author

japj commented Apr 1, 2015

I submitted dotnet/msbuild#58

@japj japj closed this as completed Apr 1, 2015
@msftgits msftgits transferred this issue from dotnet/coreclr Jan 30, 2020
@ghost ghost locked as resolved and limited conversation to collaborators Jan 6, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants