dotnet / vscode-csharp

Official C# support for Visual Studio Code
MIT License
2.86k stars 670 forks source link

the extern alias 'XXX' was not specified in a /reference option #3218

Open seanmars opened 5 years ago

seanmars commented 5 years ago

Environment data

dotnet --info output:

.NET Core SDK (reflecting any global.json):
 Version:   3.0.100-preview7-012821
 Commit:    6348f1068a

Runtime Environment:
 OS Name:     Windows
 OS Version:  10.0.18362
 OS Platform: Windows
 RID:         win10-x64
 Base Path:   C:\Program Files\dotnet\sdk\3.0.100-preview7-012821\

Host (useful for support):
  Version: 3.0.0-preview7-27912-14
  Commit:  4da6ee6450

.NET Core SDKs installed:
  3.0.100-preview7-012821 [C:\Program Files\dotnet\sdk]

VS Code version:

Version: 1.36.1 (user setup)
Commit: 2213894ea0415ee8c85c5eea0d0ff81ecc191529
Date: 2019-07-08T22:59:35.033Z
Electron: 4.2.5
Chrome: 69.0.3497.128
Node.js: 10.11.0
V8: 6.9.427.31-electron.0
OS: Windows_NT x64 10.0.18362

C# Extension version: 1.21.0

Steps to reproduce

Expected behavior

No error

Actual behavior

Get errors: The extern alias 'xxx' was not specified in a /reference option (CS0430)

rchande commented 5 years ago

@seanmars I'm having trouble reproducing this; can you share a repro project?

seanmars commented 5 years ago

@rchande Here is my test project https://github.com/seanmars/omnisharp-roslyn-alias-test

rchande commented 5 years ago

@seanmars Thanks, looks like OmniSharp is doing something weird here.

filipw commented 5 years ago

we have a test for this, and the test passes. I had a quick look and in the test setup, the msbuild property resolves differently than when running against the standalone/VS msbuild provider 😱