Open gowthamrang opened 6 years ago
Target framework information has implicitly been included when it adds assembly under lib/net471/TestLibrary.dll
which is what helps NuGet to figure out the target framework when it tries to install this package. So there is no need of explicitly including target framework information.
Ah ok, the visual studio-nuget client doesn't display this information
I was hoping to see something like this and this is what I'm seeing ]
On a second thought, NuGet UI can do a better job showing list of frameworks even though there is no dependency similar to NuGet.org behavior.... That will be really useful for the consumer to figure out the supported framework until we have the search by tfm or package applicability features in place.
cc @rrelyea
On a second thought, NuGet UI can do a better job showing list of frameworks even though there is no dependency similar to NuGet.org behavior.... That will be really useful for the consumer to figure out the supported framework until we have the search by tfm or package applicability features in place.
cc @rrelyea
Maybe this was fixed at some point? I see this package showing in PM UI the same as nuget.org. Version 17.7.0 Preview 2.0 [33630.43.main]
@donnie-msft SDK style projects that are packed create empty dependency groups for TFMs that don't have dependencies. Therefore, the .nuspec
file defines the dependencies node, plus a group that specifies the TFM, as can be verified in NuGet Package Explorer (click the "View metadata source" button): https://nuget.info/packages/Microsoft.Extensions.DependencyInjection.Abstractions/2.1.1
I'm not sure if nuget.exe pack does the same for legacy csproj (that does not have any packages installed), but that's exactly what the issue author said does not happen.
I see, then the comment I quoted was not a real example and worse, it's misleading since it postulates that what shows on nuget.org doesn't show on PM UI. Thanks for pointing it out.
Details about Problem
I was trying to pack, a library, managed by a legacy csproj file. Nuget pack command was able to pack the library excluding the target framework version information in the nuspec file. I was expecting nuget pack to read the target framework version from the legacy csproj file and include that information with the nuspec file
NuGet product used (NuGet.exe | VS UI | Package Manager Console | dotnet.exe):
NuGet Version: 4.3.0.4406
VS version (if appropriate): 15.6.6
OS version (i.e. win10 v1607 (14393.321)): win10 pro
Detailed repro steps so we can see the same problem
Consider a legacy Test.csproj
nuget pack Test.csproj
...
Other suggested things
Verbose Logs
Sample Project
Very helpful if you can zip a project and paste into this issue!