A
.NET Framework 4.6.1
project which has a reference to a nuget package built with
.netstandard2.0
is no more building. The following is the error. It is around the time when the IT Department uninstalled
.net core 2.0 SDK
from the build machine.
I added
<Reference Include="netstandard" />
to the project. The following error goes away but gives another error.
How can I fix this problem? Will installing
.net core 3.1 SDK
solve the problem?
"c:/Program Files (x86)/Microsoft Visual Studio/2019/BuildTools/MSBuild/Current/Bin/msbuild.exe" /p:Configuration=Release /verbosity:quiet /p:Platform="x86" /clp:ErrorsOnly /nologo /noautorsp /m
26-Apr-2022 18:13:55 C:\bamboo6104\xml-data\build-dir\BAM-PF1818-JOB1\MyProject\Services\SubscriptionProvider.cs(37,41): error CS0012: The type 'Object' 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'. [C:\bamboo6104\xml-data\build-dir\BAM-PF1818-JOB1\MyProjectFolder\MyProject.csproj]