-1

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?

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]```
wonderful world
  • 10,969
  • 20
  • 97
  • 194

1 Answers1

-1

Installing Visual Studio 2022 Build Tools fixed the problem.

wonderful world
  • 10,969
  • 20
  • 97
  • 194