-
Notifications
You must be signed in to change notification settings - Fork 782
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
Improve VS Code and cross-platform dev experience #2997
Conversation
PR open-telemetry#2015 fixed the target framework ordering to allow better VS Code due to the challenges with VS Code multi-targeting: dotnet/vscode-csharp#1783 dotnet/vscode-csharp#3754 Short version: VS Code support is better if you list the latest .NET Core frameworks first. Recent projects and updates have lost that ordering so VS Code isn't great on non-Windows. This restores that order and updates the latest projects.
The .vscode folder isn't per-user like .user files or .vs folders are in Visual Studio. Instead, this is where the build tasks, etc. are kept to allow VS Code to build and test from inside the IDE.
Includes a small number of recommended but common extensions to make .NET development easier. Settings support those extensions. Default build and test tasks are included.
If it's in parallel then test discovery is also in parallel, which can really tank your CPU at IDE startup.
This is the only analysis warning that really throws OmniSharp for a loop on Mac. It can't figure out if System.Enum is in a missing assembly reference or what; this fixes it.
Codecov Report
@@ Coverage Diff @@
## main #2997 +/- ##
==========================================
+ Coverage 84.08% 84.15% +0.06%
==========================================
Files 258 258
Lines 9093 9093
==========================================
+ Hits 7646 7652 +6
+ Misses 1447 1441 -6
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. I have some concern regarding the lack of CI, but I think overall this is a good movement, it is okay to me if want to have the CI later (in a follow up PR, or wait until someone complains about it).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are definitely still some cross-platform challenges in VS Code.
TBH I think you have done the best you could. Especially if one would like to develop on Linux or MacOs. Nice job 👍
In general, I do not see any blocking comments. However, I have concerns about the VS Code config-related changes (.vscode
dir and global.json
file). I would prefer to have it as a separate PR. It will be easier to roll back if one would find it harmful. Also currently the format GH workflow does not work b/c of the changes. Related comment: #2997 (comment)
I'm really, really not interested in going back here to split out the .csproj and .vscode stuff into two separate PRs. If folks don't like the .vscode stuff, it's "delete the folder and add back to .gitignore" which is a pretty simple operation. |
I was not aware that the maintainers changed their mind. Approving. |
Thanks for reviewing. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks reasonable, left a minor comment about this.
Would be great if we get another approver who is a VSCode user to take a look. @pellared ? @alanwest ?
Sorry I'm coming to this late... but
Holy crap. Hard approve. Just pulled latest and opened up VSCode. Things are way more seamless - especially when conditional compilation is involved.
I did have to make sure I had the latest .NET SDK installed, but that seems reasonable to me.
Thank you, @tillig!
Changes
TargetFrameworks
and uses that for things like code analysis and IntelliSense. Having them ordered from highest to lowest .NET Core, then the .NET desktop framework (e.g.,net461
) last helps..vscode
folder with tasks for build and test as well as default settings and a couple extension recommendations to bootstrap folks. For example, C# dev tools aren't built into VS Code, they're an extension - so that's recommended.global.json
to help with tooling determining which version of the .NET SDK to use during build whendotnet
is invoked.There are definitely still some cross-platform challenges in VS Code. For example, while the
Microsoft.NETFramework.ReferenceAssemblies
package allows you to compile, OmniSharp analysis really just doesn't work so there are ~549 errors that all are basicallyThe type 'XXXXX' is defined in an assembly that is not referenced. You must add a reference to assembly 'netstandard, Version=2.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51'. [OpenTelemetry.Instrumentation.AspNet.TelemetryHttpModule]
Build works great, OmniSharp, not so much.Regardless, this will help folks with VS Code get up and running a little easier, I think.