-
Notifications
You must be signed in to change notification settings - Fork 4.6k
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
Comments
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. |
👍 |
https://github.com/Microsoft/msbuild just opens the source |
… || 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.
Fix #497: Identical expressions to the left and right of the ||...
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.
@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! |
I submitted dotnet/msbuild#58 |
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
The text was updated successfully, but these errors were encountered: