convert from nuget- read target framework from packages.config file - - #760
Conversation
There was a problem hiding this comment.
shouldn't be there, fixing
|
I'll test... |
|
If you have multiple projects having package.config files, some of them use .Net 4.5, some Portable, some Silverlight, etc. |
|
I'm voting for a) |
|
It forgets the others because it takes only the one with highest version of the package - there's a yellow warning when you have multiple versions for same package |
|
I have same versions, but still: c:\MyApp\Logics\package.config: result of c:\MyApp\paket.dependencies is: |
|
Ok so Then in case of multiple different targetframework should we omit the framework restriction? |
|
I also vote for a) |
|
ok so here it comes, rebased on master - @Thorium is this acceptable now? |
convert from nuget- read target framework from packages.config file -
|
LGTM |
|
Thanks Tomasz! |
|
You're welcome! ;) |
|
Ok, one more problem by this conflicts of nuget targetframework and the real TargetFrameworkVersion. If I make a new C#-class library and add reference to for example NServiceBus.Log4Net, by-default Visual Studio will make packages.config have: Then if people update the .NET-version of their projects, by re-targetting to .NET 4.5.1, Visual Studio will modify the .csproj-file to have But now, if I convert to Paket, it seems to be ok, but the build will fail. And the reason is that Paket will add to .csproj-file only a condition: ...which won't hit, because of the conflicting 4.5 vs 4.5.1. How could these mismatches between csproj TargetFrameworkVersion and nuget targetFramework detected? |
|
how is the paket.dependencies file for this case? |
|
Generated paket.dependencies (Paket 0.40.0): and paket.lock: |
|
we should generate care to send a PR? |
|
ah ok that's my bad, I can send a fix, but @Thorium go on if you'd like to |
|
I'll do... |
|
Actually, if we have restriction ">= net45" and ">= net451" then the later one containing the another should be enough. So minor version conflicts could be just merged. But "net45" and "net40-client" would be better to not be merged. |
|
we already have a function which can do this. see https://github.com/fsprojects/Paket/blob/master/tests/Paket.Tests/DependencySetSpecs.fs#L28 |
|
Great, I was thinking of some kind of difficult folding, but I don't have to do it then! |
references #609 #759
Not sure if this is enough, couldn't find anywhere info re the
targetFrameworkattribute possible values.Tested on a simple
packages.configwithnet451requirement