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

MSBuild Update #907

Merged
merged 12 commits into from
Jul 6, 2017
Merged

Conversation

DustinCampbell
Copy link
Contributor

@DustinCampbell DustinCampbell commented Jul 5, 2017

This represents several updates for the OmniSharp MSBuild projects system:

  1. Use the "Compile" target rather than the "ResolveReferences" target. This allows MSBuild to run more stuff while evaluating the project file, such as generated files (fixes Generated files in .csproj projects are not processed dotnet/vscode-csharp#1531). Note that this requires copying the C# build tasks into OmniSharp.
  2. Update MSBuild to latest bits (fixes Sdk element in MSBuild project causes InvalidProjectFileException on load #904).
  3. Binding redirects added for MSBuild (fixes OmniSharp.MSBuild.ProjectFile.ProjectFileInfo - Specified cast is not valid. #903).
  4. Support for testing projects with the latest .NET Core SDK.

build.json Outdated
"LegacyDotNetVersion": "1.0.0-preview2-1-003177",
"FutureDotNetVersion": "2.0.0-preview2-006497",
Copy link
Member

Choose a reason for hiding this comment

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

the range of supported versions is getting out of control 😀

build.cake Outdated
DeleteFile(CombinePaths(folder, "Microsoft.VisualBasic.Core.targets"));
DeleteFile(CombinePaths(folder, "VBCSCompiler.exe"));
DeleteFile(CombinePaths(folder, "VBCSCompiler.exe.config"));
DeleteFile(CombinePaths(folder, "csi.exe"));
Copy link
Member

Choose a reason for hiding this comment

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

it's not related to the PR, but it just occurred to me, can we keep these 3 csi files? it's only ~50kb I think

if they are there, they open a world of possibilities. we could add similar functionality into VS Code that already exists in VS - you can either execute CSX with a shortcut or highlight a piece of code and execute that. In VS it's done using the "C# Interactive Window" but csi.exe could be a simple replacement

Copy link
Contributor Author

Choose a reason for hiding this comment

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

You already have APIs to execute scripts though.

Copy link
Member

Choose a reason for hiding this comment

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

you mean to have such APIs built into OmniSharp? yes that would be possible, I remember discussing this with Jason some time ago.
it could also be a third party extension, I built one like that for scriptcs long time ago

But the simple way would be to just have CSI.exe as part of the bundle. The main reason is there is no distribution channel for CSI.exe at the moment other than installing MSBuild tools on your machine (and no distribution channel for non-Windows platforms at all), which is quite annoying

Again, this should be discussed separately, as it doesn't impact this PR, but it would be great to be able to simply ship CSI.exe with OmniSharp so that as a user you don't need to install anything else if you i.e. just want to start a C# REPL or something like that. The C# extension in VS Code could just facilitate shelling scripts into CSI (again, to simulate a bit the experience you have in VS with C# Interactive Window) and give folks an exploratory playground for C# straight up.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

No, I meant you have APIs to execute scripts from Roslyn.

I'm OK with leaving these. I'm just a little leery of supporting an execution path through "csi" here. Essentially, it would mean that we're supporting it. So long as we're willing to sign up for that... 😄

@filipw
Copy link
Member

filipw commented Jul 6, 2017

actually the test failures seem legit at the moment?

@DustinCampbell
Copy link
Contributor Author

Yeah, the test failures were me getting a bit greedy. I tried to add testing of .NET 2.0 SDKs at the very end , but it occurs to me that there's going to be problems with that until some upcoming Mono changes make their way in. I'll roll that bit back for now.

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.

🎉

@DustinCampbell
Copy link
Contributor Author

OK. CI passes now that I rolled back the 'future' testing stuff. @filipw: I went ahead and kept CSI.exe as well.

@DustinCampbell DustinCampbell merged commit a881405 into OmniSharp:master Jul 6, 2017
@DustinCampbell DustinCampbell deleted the use-compile-target branch August 30, 2017 19:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants