This work item, http://nuget.codeplex.com/workitem/2635, improved the error messages a little when installing a package into a project that is targeting the wrong frameworks, however, I don't believe it went far enough.
I'll quote the comment I wrote on that page:
"I don't believe the short name is an improvement. The short name makes sense if you are a package producer, but not if you are consumer.
We already have APIs[1] within Visual Studio to get the friendly name (ie ".NET Framework 4", or ".NET Portable Subset (.NET Framework 4, Silverlight 4)) for a given target framework name (TFM). Visual Studio and MSBuild uses this everywhere.
Can this be changed to use them?
[1] http://msdn.microsoft.com/en-us/library/microsoft.visualstudio.shell.interop.ivsframeworkmultitargeting.getdisplaynamefortargetfx.aspx."
Comments: The error message is emitted by NuGet.Core, which can be used outside of Visual Studio. We can't call VS services from there.
I'll quote the comment I wrote on that page:
"I don't believe the short name is an improvement. The short name makes sense if you are a package producer, but not if you are consumer.
We already have APIs[1] within Visual Studio to get the friendly name (ie ".NET Framework 4", or ".NET Portable Subset (.NET Framework 4, Silverlight 4)) for a given target framework name (TFM). Visual Studio and MSBuild uses this everywhere.
Can this be changed to use them?
[1] http://msdn.microsoft.com/en-us/library/microsoft.visualstudio.shell.interop.ivsframeworkmultitargeting.getdisplaynamefortargetfx.aspx."
Comments: The error message is emitted by NuGet.Core, which can be used outside of Visual Studio. We can't call VS services from there.