dotnet / vscode-csharp

Official C# support for Visual Studio Code
MIT License
2.88k stars 676 forks source link

Intellisense problems when referencing a project with a build-time defined assembly version #1908

Closed SwooshyCueb closed 1 week ago

SwooshyCueb commented 6 years ago

Environment data

dotnet --info output:

.NET Command Line Tools (2.0.0)

Product Information:
 Version:            2.0.0
 Commit SHA-1 hash:  cdcd1928c9

Runtime Environment:
 OS Name:     linuxmint
 OS Version:  18.1
 OS Platform: Linux
 RID:         linuxmint.18.1-x64
 Base Path:   /usr/share/dotnet/sdk/2.0.0/

Microsoft .NET Core Shared Framework Host

  Version  : 2.1.0-preview2-25615-02
  Build    : 2d818e87081bfe71f9a3f2cbba43cb279e79b265

VS Code version: 1.18.1 C# Extension version: 1.13.1 mono --version output:

Mono JIT compiler version 5.2.0.215 (tarball Fri Aug 25 18:11:54 UTC 2017)
Copyright (C) 2002-2014 Novell, Inc, Xamarin Inc and Contributors. www.mono-project.com
        TLS:           __thread
        SIGSEGV:       altstack
        Notifications: epoll
        Architecture:  amd64
        Disabled:      none
        Misc:          softdebug 
        LLVM:          supported, not enabled.
        GC:            sgen (concurrent by default)

Mono Debug extension version: 0.15.8

Steps to reproduce

Expected behavior

Intellisense should not throw fits about symbols/objects from the referenced project.

Actual behavior

Intellisense throws fits about symbols/objects from the referenced project. projrefbug1

Notes

rchande commented 6 years ago

@SwooshyCueb We made big changes to how we discover MSBuild in 1.13. @DustinCampbell Any idea what's going on here?

DustinCampbell commented 6 years ago

I doubt this is related to MSBuild discovery since the CodeLens references indicators show that MSBuild is clearly loading the project. It looks to me like a metadata reference is being added twice within OmniSharp.

viceice commented 6 years ago

Same here. This is blocking us from using vscode.

dotnet --info

.NET Command Line Tools (2.1.100)

Product Information:
 Version:            2.1.100
 Commit SHA-1 hash:  b9e74c6520

Runtime Environment:
 OS Name:     Windows
 OS Version:  6.3.9600
 OS Platform: Windows
 RID:         win81-x64
 Base Path:   C:\Program Files\dotnet\sdk\2.1.100\

Microsoft .NET Core Shared Framework Host

  Version  : 2.0.5
  Build    : 17373eb129b3b05aa18ece963f8795d65ef8ea54

vscode: 1.20.1 ms-vscode.csharp: 1.14.0

SwooshyCueb commented 6 years ago

This still occurs with omnisharp-vscode 1.16.1/omnisharp 1.32.5/Mono 5.16.0.147/vscode 1.27.2

JoeRobich commented 1 week ago

A lot has changed with O# project loading since this issue was opened. Please reopen with fresh details if it is still a problem.