пʼятниця, 27 жовтня 2017 р.

tips and tricks :: VSCode and dotnetstandard libraries

If we use "dotnetstandard" libraries then VSCode may print some warnings:

Some projects have trouble loading. Please review the output for more details.

[warn]: OmniSharp.MSBuild.ProjectFile.ProjectFileInfo
        The primary reference "..." could not be resolved because it was built against the ".NETPortable,Version=v5.0" framework. This is a higher version than the currently targeted framework ".NETPortable,Version=v4.5,Profile=Profile111".

So the Droid project may have the disabled intellisense, because the PCL dll has not been built.

[fail]: OmniSharp.MSBuild.ProjectFile.ProjectFileInfo
        The "ResolveLibraryProjectImports" task failed unexpectedly.
System.IO.FileNotFoundException: Could not load assembly 'MyPCLProject, Version=0.0.0.0, Culture=neutral, PublicKeyToken='. Perhaps it doesn't exist in the Mono for Android profile?
File name: 'MyPCLProject.dll'

To avoid these warnings in VSCode we may run xbuild.sh or xfast.sh first before opening the VSCode.

It is not necessary if we work with the PCL files only.
And PCL project doesn't see these libraries anyway in VSCode.




P.S. One more receipt ... but it didn't work for me.

https://nicksnettravels.builttoroam.com/post/2016/12/06/When-I-grow-up-I-want-to-be-a-NETStandard-Library!.aspx

https://github.com/dsplaisted/NetStandardTFMFix/commit/43ad5119a2632765979e12cef8904e6d2408923a

Related issues:
https://github.com/smstuebe/xamarin-fingerprint/issues/58
https://github.com/dotnet/roslyn/issues/11067


Немає коментарів:

Дописати коментар