You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm using a script referencing a assembly compiled with .net standard 2. When i use a property of type List'1, I'm getting the error in vscode:
The type 'List<>' is defined in an assembly that is not referenced. You must add a reference to assembly 'netstandard, Version=2.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51'. [testValidation.csx]
Is possible to reference a assembly compiled with .net standard 2 from a csx file, and that the intellisense works properly in vscode?
The text was updated successfully, but these errors were encountered:
@gabomgp by default OmniSharp assumes net46 mode for resolving script dependencies. You can add #! "netcoreapp2.0" directive at the top of your script to force the assembly resolution to assume .NET Core 2.0 mode.
The alternative is to manually reference netstandard.dll (which is only used for type forwarding) i.e. from C:\Program Files\dotnet\shared\Microsoft.NETCore.App\2.0.0. At the end of the day, it also depends how you will run your script (with which script runner), and whether it's able to understand NET Standard 2.0.
I'm using a script referencing a assembly compiled with .net standard 2. When i use a property of type List'1, I'm getting the error in vscode:
Is possible to reference a assembly compiled with .net standard 2 from a csx file, and that the intellisense works properly in vscode?
The text was updated successfully, but these errors were encountered: