When opening a VB.NET project in VS Code using the VB.NET language server extension, namespace imports defined at the project level inside the .vbproj file are not properly recognized by the language server.
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="..." />
...
<ItemGroup>
<Import Include="Microsoft.VisualBasic" />
<Import Include="System" />
</ItemGroup>
...
</Project>
As a result, symbols from these namespaces are reported as unresolved even though the project builds successfully (on Visual Studio). In this case I need to write Imports System at file level (on the loaded .vb file in VS Code) to get rid of half of the 300 errors in the PROBLEMS window:
But there is also other related problem with assembly references, I don't exactly understand why, but for example it can't recognize any defined member in the code that depends on the imported namespace System.Windows.Forms (from assembly: System.Windows.Forms.dll), however, this code makes calls to class: System.Windows.Forms.Clipboard() and method: System.Windows.Forms.SendKeys(), but the namespace it is underlined with this yellow-orange color:
Neither it can't resolve other namespaces like DevCase.Runtime.TypeComparers:
Maybe this last is because the file have 8 "errors" and since the language server can't compile it, then it can't resolve the namespace. But why it can't compile it at first?. It works perfect on Visual Studio.
The compiler errors marked in that StringNaturalComparer.vb file points to another file that does NOT have errors:
And it is sharing the SAME namespace so it should resolve it:

When opening a VB.NET project in VS Code using the VB.NET language server extension, namespace imports defined at the project level inside the .vbproj file are not properly recognized by the language server.
As a result, symbols from these namespaces are reported as unresolved even though the project builds successfully (on Visual Studio). In this case I need to write
Imports Systemat file level (on the loaded .vb file in VS Code) to get rid of half of the 300 errors in the PROBLEMS window:But there is also other related problem with assembly references, I don't exactly understand why, but for example it can't recognize any defined member in the code that depends on the imported namespace
System.Windows.Forms(from assembly:System.Windows.Forms.dll), however, this code makes calls to class:System.Windows.Forms.Clipboard()and method:System.Windows.Forms.SendKeys(), but the namespace it is underlined with this yellow-orange color:Neither it can't resolve other namespaces like
DevCase.Runtime.TypeComparers:Maybe this last is because the file have 8 "errors" and since the language server can't compile it, then it can't resolve the namespace. But why it can't compile it at first?. It works perfect on Visual Studio.
The compiler errors marked in that
StringNaturalComparer.vbfile points to another file that does NOT have errors:And it is sharing the SAME namespace so it should resolve it: