question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

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

See original GitHub issue

Environment data

dotnet --info output:

.NET Command Line Tools (2.1.201)

Product Information:
 Version:            2.1.201
 Commit SHA-1 hash:  7932dc6179

Runtime Environment:
 OS Name:     Windows
 OS Version:  10.0.17134
 OS Platform: Windows
 RID:         win10-x64
 Base Path:   C:\Program Files\dotnet\sdk\2.1.201\

Microsoft .NET Core Shared Framework Host

  Version  : 2.0.7
  Build    : 2d61d0b043915bc948ebf98836fefe9ba942be11

VS Code version: Version 1.23.1 Commit d0182c3417d225529c6d5ad24b7572815d0de9ac Date 2018-05-10T17:11:17.614Z Shell 1.7.12 Renderer 58.0.3029.110 Node 7.9.0 Architecture x64

C# Extension version: 1.15.2

Steps to reproduce

  • warning: the steps to reproduce I used visual studio to create the project. the problem comes AFTER, when i try to open the project folder within vscode:
  • Create a visual studio project A.
  • Add a reference to project A to any other project, B
  • Go to the properties of that reference, and add an alias. something like ‘global,test’
  • add a new class, and put a using statement at the top using the alias, something like extern alias test; using test::B;

Expected behavior

I expect the project to compile, or not show any compiler warnings. it works in visual studio w/out any issues

Actual behavior

i get 2 errors:

  • the extern alias ‘test’ was not specified in a /reference option
  • the type or namespace name ‘B’ does not exist in the namespace ‘test’

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:7 (3 by maintainers)

github_iconTop GitHub Comments

3reactions
DustinCampbellcommented, May 24, 2018

Thanks! I believe the issue here is that extern alias support needs to be added to the OmniSharp server (https://github.com/OmniSharp/omnisharp-rolsyn). We’ll take a look.

1reaction
filipwcommented, Mar 11, 2019
Read more comments on GitHub >

github_iconTop Results From Across the Web

The extern alias 'xxx' was not specified in a /reference option
It turns out reference aliases are ignored on projects containing xaml files which has an xmlns definition to the output assembly like xmlns:local='clr- ......
Read more >
[solved]-the extern alias 'yyy' was not specified in a /reference ...
It turns out reference aliases are ignored on projects containing xaml files which has an xmlns definition to the output assembly like ...
Read more >
Issue adding external alias - VS 2010 bug - MSDN - Microsoft
I am having a tough time setting up an external alias. I added references to these two items: - Telerik.Windows.Controls.Scheduler
Read more >
Questions in topic: "external-libraries" - RSSing.com
Core.dll setting to x86 / Windows it should not be loaded. ... The extern alias `WinForm' was not specified in -reference option*, where...
Read more >
Compose specification - Docker Documentation
The Compose specification includes properties designed to target a local OCI container runtime, exposing Linux kernel specific configuration options, ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found