-
Notifications
You must be signed in to change notification settings - Fork 526
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
convert from nuget- read target framework from packages.config file - #760
Conversation
{ Name = PackageName packageName | ||
VersionRequirement = VersionRequirement(VersionRange.Exactly version, PreReleaseStatus.No) | ||
Sources = sources | ||
ResolverStrategy = ResolverStrategy.Max | ||
Settings = InstallSettings.Default | ||
Settings = { InstallSettings.Default with FrameworkRestrictions = restrictions } //Requirements.parseRestrictions |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what's about this comment?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
targetFramework
attribute possible values.Tested on a simple
packages.config
withnet451
requirement