Closed forki closed 9 years ago
Basically you want this mapping? (from NuGet.Core)
".NETFramework" -> "net"
".NETMicroFramework" -> "netmf"
"Silverlight" -> "sl"
".NETCore" -> "win"
"Windows" -> "win"
".NETPortable" -> "portable"
"WindowsPhone" -> "wp"
"WindowsPhoneApp" -> "wpa"
"Xamarin.iOS" -> "xamarinios"
"Xamarin.Mac" -> "xamarinmac"
"Xamarin.PlayStation3" -> "xamarinpsthree"
"Xamarin.PlayStation4" -> "xamarinpsfour"
"Xamarin.PlayStationVita" -> "xamarinpsvita"
"Xamarin.Xbox360" -> "xamarinxboxthreesixty"
"Xamarin.XboxOne" -> "xamarinxboxone"
not exactly. At the moment wer can understand the folder structure in a package see https://github.com/fsprojects/Paket/blob/master/tests/Paket.Tests/InstallModel/ProcessingSpecs.fs#L26
what we want is to convert this info back into nuget syntax in order to patch nuspecs.
OK, so basically what this method does? (also from NuGet.Core) https://gist.github.com/khellang/af53ef9991e8e31a6cc5
not completely sure but I think the inverse. but @Vidarls knows ;-)
It seems a bit crazy to duplicate all this logic. Have you ever considered dragging in NuGet.Core or even cherry-picking these parts from the NuGet codebase?
We don't duplicate the logic ;-) But yes we considered to reference NuGet.Core. Very carefully.
And we cherry-pick.
2014-10-23 19:36 GMT+02:00 Kristian Hellang notifications@github.com:
It seems a bit crazy to duplicate all this logic. Have you even considered dragging in NuGet.Core or even cherry-picking these parts from the NuGet codebase?
— Reply to this email directly or view it on GitHub https://github.com/fsprojects/Paket/issues/291#issuecomment-60276988.
I have to admit there is a lot I do not yet grok of nuget/nuspec (like yhe fact that nuget have a public Api for utility stuff like this..)
Anyhow, the reason for this conversion is to convert from targey fw found in a proj file to the correct subfolder name in a nuget package lib folder. My current (bnaive) implementation at the top seems to be working, but might have issues with edge cases. Not sure if nuget core has any code for this, but none of @khellang s suggestions seems to fit this use case
You should at least check out NuGet.Core's VersionUtility
and NetPortableProfileTable
(along with the other classes under the NuGet.Core.NETPortable
namespace). They should have methods to go back and forth between different framework version representations.
Yes. We did already. And ported some parts.
But I can tell you most of the stuff is not really fitting. We already used in FAKE... On Oct 23, 2014 8:46 PM, "Kristian Hellang" notifications@github.com wrote:
You should at least check out NuGet.Core's VersionUtility http://nuget.codeplex.com/SourceControl/latest#src/Core/Utility/VersionUtility.cs and NetPortableProfileTable http://nuget.codeplex.com/SourceControl/latest#src/Core/NETPortable/NetPortableProfileTable.cs (along with the other classes under the NuGet.Core.NETPortable namespace.
— Reply to this email directly or view it on GitHub https://github.com/fsprojects/Paket/issues/291#issuecomment-60289036.
I think I misinterpreted @Vidarls' original code and that part is already covered. Need to go back to the beginning.
very naive implementation might look like:
also tests...