I know that creating nugets for .Net Standard
, .Net Core
or .Net5
is now fast and simple but unfortunately, I must create nuget for old not so good .NetFramework
and I got an issue with dependence description in nuspec. If the group is empty VS2017-19 doesn't show any decency at all not even targetFramework which is very important for me.
I create nuspec with 'nuget spec' command , then pack it with 'nuget pack' and in the end publish it with 'nuget add' command.
Project folder structure
-root --MyProject.csproj --MyProject.nuspec --lib ---net4 ----MyProject.dll
nuspec
<?xml version="1.0" encoding="utf-8"?><package xmlns="http://schemas.microsoft.com/packaging/2012/06/nuspec.xsd"><metadata><id>****</id><version>1.0.0</version><title>****</title><authors>****</authors><owners>****</owners><requireLicenseAcceptance>false</requireLicenseAcceptance><description>****</description><copyright>****</copyright><dependencies><group targetFramework=".NETFramework4.0" /></dependencies></metadata></package>
UpdateWhen someone try to install nuget for 4.5 framework on 4.0 framework projecterror is shown. It's ok but without descriptions user should try to install each packet version until he hit the right one for framework 4.0