I'm trying to set a target framework for my NuGet package with NuGet Package Explorer. I've created a folder lib/net462/myassembly.dll
. I want to prevent the package from being installed on .NET projects targeted lower than version 4.6.2. When I install the package in a .NET 4.5.2 project, no error is thrown and the dll is installed in the project.
How can I prevent my package from being installed in a .NET project targeted lower than version 4.6.2?
See screenshot below: