-
Notifications
You must be signed in to change notification settings - Fork 676
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
Disable "Assuming assembly reference..." warning squigglies #967
Comments
This was high on my list already, but I'll use this issue to to track it. This is a warning (CS1701) that the C# compiler issues when unifying assembly references. Essentially, the problem occurs when downstream transitive assemblies reference different versions of an assembly. Most tools disable the warning, and that still needs to be done in OmniSharp. The problem is that the OmniSharp MSBuildProjectSystem doesn't properly handle |
Fix for this issue is here: OmniSharp/omnisharp-roslyn@44c5bc7. Once we update to a newer OmniSharp, we'll produce a beta release with the fix. |
I've created a v1.6-beta2 release of the C# extension that contains this fix, among others. See this page for information on installing beta releases |
I uninstalled the extension, installed 1.6.0-beta2, added VSCode 1.7.2 |
Well, you shouldn't need to add that If you can share your project out I'll take a look. |
Happens to me with Console.WriteLine in HelloWorld.
|
Hmmm... I'm not sure how to get ahold of Preview3 any longer, but I don't think that should matter. I just grabbed the latest Preview4 build from https://github.com/dotnet/cli and don't observe the problem any longer.
|
Could you check Also, please copy-paste your OmniSharp Log here. You can find this by selecting View->Output from the menu and the selecting "OmniSharp Log" from the dropdown at the top-right corner of the Output pane. |
That was it! I had another version/folder sitting in By the way, preview 3 is here. Link was found on this blog post. Thank you and happy thanksgiving! |
I'm very glad that was it! I've seen this happen a couple of times now. Hmmm... Anyway, have a great holiday weekend! |
@DustinCampbell I'm getting this, but I don't understand where to look for dup C# extensions. Can you provide the full path? [EDIT] Found this: |
On Windows, look under %UserProfile%.vscode\extensions. |
It looks like you haven't installed the latest beta release as mentioned above: #967 (comment) |
Gotcha ... thanks. I thought it was just going to be the dup C# extenstion prob. I'll get the beta release on here. |
The dup problem can happen after installing the beta. |
Install with: code --install-extension csharp-1.6.0-beta2.vsix |
Or use the UI like so: https://github.com/OmniSharp/omnisharp-vscode/wiki/Installing-Beta-Releases |
Hi I am still running into this issue as of April 2021. My C# extension version is 1.23.9. It sounds like back in 2016 a fix went out, but every time I open a C# file in vscode, I get a whole slew of the "Assuming assembly reference..." errors. I can provide any information that might help. |
@mdkincaid Can you open a new issue and provide the requested logs? It is likely that the underlying issue is different from this one. |
@JoeRobich Sure thing!! |
Environment data
dotnet --info
output:VS Code version: 1.7.1
C# Extension version: 1.5.2
Steps to reproduce
Create new ASP.NET Core application using
dotnet new -t Web
, rundotnet restore
from command line.Open project in VS Code.
Observe green squigglies all over the C# code, with mouseover showing a popup along the lines of:
It's probably right, and the assembly references are mixed up (as far as I can tell it's actually referencing 4.1.0 and 4.3.0, no reference to 4.0.20 anywhere) but the application builds and runs fine and these green squigglies are everywhere, it's meaningless and I can't see actual important warnings for all the noise.
A way to disable this warning would be great.
The text was updated successfully, but these errors were encountered: