I have just converted my PCL library to a new .Net Standard library and I have some Yellow Warning triangles on my Dependencies shown below:
During the conv
If I try to uninstall Microsoft.NETCore.Platforms
as stated in the marked answer I get the following error:
Unable to uninstall 'Microsoft.NETCore.Platforms.1.1.0' because 'NETStandard.Library.2.0.3' depends on it.
I uninstalled the other packages, but I still get the NETSDK1023
error:
A PackageReference for 'NETStandard.Library' was included in your project. This package is implicitly referenced by the .NET SDK and you do not typically need to reference it from your project. For more information, see https://aka.ms/sdkimplicitrefs
Now I edited my .csproj and deleted the following part
<PackageReference Include="NETStandard.Library" Version="2.0.3" />
as stated in https://aka.ms/sdkimplicitrefs under Recommendations:
When targeting .NET Core or .NET Standard, never have an explicit reference to the
Microsoft.NETCore.App
orNETStandard.Library
metapackages via a<PackageReference>
item in your project file.
Now the warning is gone!
The yellow triangle means that the package physical file(s) is gone and no longer available on the Hard Drive.
This usually happens when issuing a get latest version
request on source control in TFS, especially when using a new machine, and you want to get your project code from the TFS server.
It can also be caused by low quality internet connection
which almost always will result in data loss, or corrupted downloaded files.
If the problem is missing a couple of packages, you can modify the packages.config
file and remove these packages from the packages.config
and re-install the missing packages via nuget packages manager.
But if the problem is missing more than a few packages, the best and fast way I use to retrieve missing packages is by:
Packages
by selecting all, Note do NOT copy the Packages folder itself only the contents inside the folderPackages
folder with overwrite existing items.Note such problems related to missing files from projects are always hard to fix, and depends on developer experience, so don't expect an easy solution for this one.
On the cause of the error,Microsoft says it is a bug, but it can happen on any version of Visual Studio.
I just updated Visual studio to 16.4.4 and the issue was resolved. The reference is fixed and no more yellow triangle. Thanks.