Skip to content
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

wrapped assembly reference issues (The type or namespace 'X' could not be found, are you missing...) #424

Closed
remcoros opened this issue Jun 10, 2016 · 5 comments
Assignees
Milestone

Comments

@remcoros
Copy link

remcoros commented Jun 10, 2016

Environment data

.NET Command Line Tools (1.0.0-preview2-002820)

Product Information:
Version: 1.0.0-preview2-002820
Commit SHA-1 hash: d307537eb8

Runtime Environment:
OS Name: Windows
OS Version: 10.0.10586
OS Platform: Windows
RID: win10-x64

VS Code version: 1.2 / 1.3-insiders
C# Extension version: 1.1.5

Steps to reproduce

I have set up a demo repository here: https://github.com/remcoros/vscode-omnisharp-assemblydemo

Expected behavior

No errors are visible in vscode.

Actual behavior

VSCode shows an error:

The type or namespace name 'ADODB' could not be found (are you missing a using directive or an assembly reference?) [net46]

Notes

'dotnet build' works as expected.

omnisharp output

[INFO] Starting OmniSharp at 'c:\Projects\vscode-assemblydemo'...
[INFO] Started OmniSharp from 'C:\Users\rro.vscode-insiders\extensions\ms-vscode.csharp-1.1.5.omnisharp\OmniSharp.exe' with process id 26384...
OmniSharp: -s c:\Projects\vscode-assemblydemo --hostPID 14564 dnx:enablePackageRestore=false --stdio
[INFORMATION:OmniSharp.Startup] Omnisharp server running using Stdio at location 'c:\Projects\vscode-assemblydemo' on host 14564.
[INFORMATION:OmniSharp.DotNet.DotNetProjectSystem] Initializing in c:\Projects\vscode-assemblydemo
[INFORMATION:OmniSharp.DotNet.DotNetProjectSystem] Auto package restore: True
[INFORMATION:OmniSharp.DotNet.DotNetProjectSystem] Update workspace context
[INFORMATION:OmniSharp.DotNet.DotNetProjectSystem] Update project c:\Projects\vscode-assemblydemo\ADODB
[INFORMATION:OmniSharp.DotNet.DotNetProjectSystem] Add project c:\Projects\vscode-assemblydemo\ADODB\project.json => 43ce4340-cd80-4554-a957-f14c3cc810f0
[INFORMATION:OmniSharp.DotNet.DotNetProjectSystem] Update project c:\Projects\vscode-assemblydemo\Script
[INFORMATION:OmniSharp.DotNet.DotNetProjectSystem] Add project c:\Projects\vscode-assemblydemo\Script\project.json => 5b042b64-aa78-46d1-80a4-5b76bbd04343
[INFORMATION:OmniSharp.DotNet.DotNetProjectSystem] Resolving projects references
[INFORMATION:OmniSharp.DotNet.DotNetProjectSystem] Processing [ProjectState] ADODB/.NETFramework,Version=v3.5
[INFORMATION:OmniSharp.DotNet.DotNetProjectSystem] Added 3 and removed 0 file references
[INFORMATION:OmniSharp.DotNet.DotNetProjectSystem] Processing [ProjectState] Script/.NETFramework,Version=v4.6
[INFORMATION:OmniSharp.DotNet.DotNetProjectSystem] Added 9 and removed 0 file references
[INFORMATION:OmniSharp.DotNet.DotNetProjectSystem] Added 1 and removed 0 documents.
[INFORMATION:OmniSharp.MSBuild.MSBuildProjectSystem] No solution files found in 'c:\Projects\vscode-assemblydemo'
[INFORMATION:OmniSharp.ScriptCs.ScriptCsProjectSystem] Detecting CSX files in 'c:\Projects\vscode-assemblydemo'.
[INFORMATION:OmniSharp.ScriptCs.ScriptCsProjectSystem] Could not find any CSX files
[INFORMATION:OmniSharp.Startup] Configuration finished.

@elvirb
Copy link

elvirb commented Jun 13, 2016

I've been having this issue as well - since 1.0.10. Any updates on this?

@dsschnau
Copy link

dsschnau commented Jun 29, 2016

Hey, I'm also seeing this issue in VS Code, specifically referencing XUnit. Same behavior, the dotnet CLI builds, runs, and tests are working. I'm using v 1.1.6 of this extension.

Here's my dotnet --info output.

.NET Command Line Tools (1.0.0-preview2-003121)

Product Information:
 Version:            1.0.0-preview2-003121
 Commit SHA-1 hash:  1e9d529bc5

Runtime Environment:
 OS Name:     ubuntu
 OS Version:  14.04
 OS Platform: Linux
 RID:         ubuntu.14.04-x64
.NET Command Line Tools (1.0.0-preview2-003121)

Product Information:
 Version:            1.0.0-preview2-003121
 Commit SHA-1 hash:  1e9d529bc5

Runtime Environment:
 OS Name:     ubuntu
 OS Version:  14.04
 OS Platform: Linux
 RID:         ubuntu.14.04-x64

@xplicit
Copy link

xplicit commented Aug 30, 2016

+10 To fix this. Intellisense does not work, Problems window is spammed with huge amount of non-existed errors and becomes unusable. VS code in this scenario works like a simple text editor with colorizing.

@DustinCampbell DustinCampbell modified the milestones: 2.0, 1.5 Nov 11, 2016
@tetious
Copy link

tetious commented Dec 12, 2016

This also breaks when using a PCL assembly via Microsoft.NETCore.Portable.Compatibility with multiple mscorelib reference errors. At least I think that is what is happening.

@DustinCampbell
Copy link
Member

Sorry for the delay on this! I have a fix specifically for the wrapped assembly case here: OmniSharp/omnisharp-roslyn#749.

@tetious: It's not clear to me that your issue is the same thing. If you have a project that reproduces the problem, please go ahead and file a new issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants