-
Notifications
You must be signed in to change notification settings - Fork 525
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
Support for conditional groups #1026
Comments
Ah. You forget to specify different versions in the first dependencies file. I thought: why would someone install the same package version 3 times. |
what if we make this feature independent from groups:
|
I mean this would the be like all the settings in http://fsprojects.github.io/Paket/nuget-dependencies.html#Framework-restrictions |
Yes that would work for me as well. But on the other hand I'm not sure if we need so much power and it would kind of mess with the paket idea of a "consistent view" of the dependencies. I think the main usage should be to switch between a consistent set of dependencies instead of single packages. |
mhm. good point. |
How do normal settings behave on indirect references? If I have
where |
yes. that would be a conflict. |
Ok I added (very very basic) support for this. The generated XML is probably completely wrong right now (I need real samples). BUT: You can now specify conditions for groups and individual packages. Please try it out and tell me where and how it breaks ;-) |
Everything seems to be working fine! One thing I noticed is that the condition generates the warning
I couldn't find a lot of info about this warning, but it seems to disappear when we generate |
PR against groups branch are very welcome
|
Fix msbuild warning MSB4130, references #1026
Once released, RazorEngine can finally make the full switch to paket and get rid of nuget.exe 👍 |
Wow. Cool to hear.
|
OK I try to re-formulate the problem I mentioned in #1018 (comment).
In RazorEngine we use 3 different builds for 3 different Razor versions
We use conditional compilation to take care about the API differences and provide the same API on all 3 builds. The thing is that if we develop a new RazorEngine feature there is no reason to support only the latest when it will work fine on any Razor version. Handling 3 branches is not really an option either.
Now with the group feature I can compile for Razor2 and Razor3 because they target different frameworks.
Paket will generate a csproj file like this (this is simplified):
Which is perfect!
But I still can't add Razor4 to the mix, because the reference would be enabled the same time as Razor3 (when compiling for net45):
Notice how
TargetFrameworkVersion=v4.5
will now enable twoSystem.Web.Razor.dll
versions, which is not what I want, so I need some way to tell paket to generate an additional condition which should be true.One way to solve this is adding a way to tell paket to add a group with a custom msbuild condition (see example syntax in from my earlier comment).
Just something to note: Groups already improve the situation as we don't need
nuget.exe
anymore to resolve Razor2 and Razor4 👍 . I still need to update allcsproj
files by hand, but at least I now have stable paths and can usepaket update
(of course I still need to set<paket>false</paket>
for the Razor3 and Razor4 dependency).The text was updated successfully, but these errors were encountered: