Prevent Nuget Package to Installs in .NET Framework Projects.

Samarasam M 1 Reputation point
2019-11-22T10:56:43.07+00:00

Prevent Nuget Package to Installs in .NET Framework Projects. But It Should Install the Nuget Package in .NET Core and .NET Standard projects.

Only while try to install in Framework Projects it should show the custom message.
How to achieve this.

Community Center | Not monitored
{count} votes

1 answer

Sort by: Most helpful
  1. Vahid Ghafarpour 23,595 Reputation points Volunteer Moderator
    2023-07-16T06:27:59.4833333+00:00

    You can use a combination of package dependencies and conditional logic in your NuGet package's .nuspec file.

    0 comments No comments

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.