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

Making MSBuild great again #709

Merged
merged 76 commits into from
Dec 16, 2016
Merged

Making MSBuild great again #709

merged 76 commits into from
Dec 16, 2016

Conversation

DustinCampbell
Copy link
Contributor

This PR integrates the new-msbuild branch back into dev, which gets us one large step of the way to #666. Essentially, this integrates MSBuild in a much better way with OmniSharp, using official MSBuild packages and a custom-build for Mono.

Adding a couple of smart people to review, but others are welcome to chime in.

danwalmsley and others added 30 commits November 22, 2016 23:00
…est!)

This is a fairly significant change in that it adds our first MSBuild
project test. This requires some gymnastics to ensure that MSBuild.exe can
to set up MSBuild's build environment. In the tests, we set the
MSBUILD_EXE_PATH environment variable to properly locate MSBuild during
test runs.
…sproj-in-solution

add support for new .net core csproj guid in .sln files.
@@ -5,7 +5,6 @@
},
"dependencies": {
"OmniSharp.Abstractions": "1.0.0",
"OmniSharp.Nuget": "1.0.0",
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@david-driscoll: Please note this change. I think we need to invest in some effort to make this endpoint great again.

Copy link
Member

Choose a reason for hiding this comment

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

oh god, no more trump references... I only hope he doesn't follow through repealing NAFTA (though looking at all his other promises... it might disappear!)

var specificDiagnosticOptions = new Dictionary<string, ReportDiagnostic>(projectFileInfo.SuppressedDiagnosticIds.Count);

// Always suppress CS1701 (Assuming assembly reference 'x' used by 'y' matches identity 'z'. you may need to supply runtime policy)
specificDiagnosticOptions.Add("CS1701", ReportDiagnostic.Suppress);
Copy link
Member

Choose a reason for hiding this comment

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

.net cli project system disables also CS1702 and CS1705 - should these be aligned?

Copy link
Contributor Author

@DustinCampbell DustinCampbell Dec 16, 2016

Choose a reason for hiding this comment

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

Actually, this probably isn't needed anymore. Now that we properly support the <NoWarn> attribute in the project file, we actually inherit CS1701, CS1702 and CS1705 from the targets.

@filipw
Copy link
Member

filipw commented Dec 16, 2016

this is a hugely welcome change! 🎉 🎈 🍰
also, at this point I think there is no point in keeping OmniSharp .NET Core build anymore?

return;
}

if (File.Exists(msbuildExePath))
Copy link
Member

Choose a reason for hiding this comment

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

this check is not necessary anymore, as we will have exited already if the file was not there
similarly, the following else is unreachable anymore and can be removed

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I really should read my code after refactoring 😄

Fixing...

msbuildFolder = FindMSBuildFolderFromSolution();
}

if (msbuildFolder == null || !Directory.Exists(msbuildFolder))
Copy link
Member

@filipw filipw Dec 16, 2016

Choose a reason for hiding this comment

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

FindMSBuildFolderFromSolution() already checks for directory existence internally so no need to recheck again, just null check would be enough

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good catch! I'd forgotten to remove that after some refactoring.

@DustinCampbell
Copy link
Contributor Author

@filipw: .NET Core builds are still a good thing so that we have standalone OmniSharp builds. However, once I can get the other part of #666 finished (moving onto a local, embedded Mono), we can probably drop them if we want since we'll have standalone net46 builds of OmniSharp.

@filipw
Copy link
Member

filipw commented Dec 16, 2016

once I can get the other part of #666 finished

makes sense 👍

Copy link
Member

@david-driscoll david-driscoll left a comment

Choose a reason for hiding this comment

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

:shipit: 🚢 :shipit:

@@ -5,7 +5,6 @@
},
"dependencies": {
"OmniSharp.Abstractions": "1.0.0",
"OmniSharp.Nuget": "1.0.0",
Copy link
Member

Choose a reason for hiding this comment

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

oh god, no more trump references... I only hope he doesn't follow through repealing NAFTA (though looking at all his other promises... it might disappear!)

@DustinCampbell
Copy link
Contributor Author

OK. In it goes! 😄

@DustinCampbell DustinCampbell merged commit f71a08d into dev Dec 16, 2016
@DustinCampbell DustinCampbell deleted the new-msbuild branch December 16, 2016 21:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants