Click here to Skip to main content
15,918,808 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
NuGet package restore error for the solution which have a mix of .netcoreapp3.1 and .NETStandard 2.1 projects.

I have multiple .net projects in one solution file and added references to each other projects. Some of the projects has  .netcore 3.1 version and some of has .NET Standard 2.1. It is working fine in my local machine.

Now i am creating my azure devops build pipeline using classic editor then select asp.net core template so it will add all the necessary tasks (Showing in attached image). But it is giving me error in NuGet package restore task "##[error]The nuget command failed with exit code(1) and error(NU1201: Project XX is not compatible with netcoreapp3.1 (.NETCoreApp,Version=v3.1). Project XX supports: netstandard2.1 (.NETStandard,Version=v2.1)".

I can not change the any project version as it is used in many other projects, can any one help me on this if i missed anything.


What I have tried:

I have changes the many nuget versions in NuGet package restore task also select .csproject file in build task but it gives me same error everytime.
Posted

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900