-
Notifications
You must be signed in to change notification settings - Fork 176
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
[Csproj] Add support for conditional PackageReferences #258
base: main
Are you sure you want to change the base?
[Csproj] Add support for conditional PackageReferences #258
Conversation
checking this |
Thanks for this intesting proposal. I discussed this with a colleague as I don't know well the csproj generator. While your proposal works, we thought it might be better to extend the existing ItemGroup support for supporting new types of conditions(Platform + Configuration) There is right now support for automatic ItemGroup section conditions for dotnet framework version as you can see in the DotNetMultiFrameworksHelloWorld sample. This can generate PackageReference references with framework version conditions when multiple framework versions are specified as target fragments. As you can see, there is
I synced your branch and I modified the sample to use the nuget used in your tests to add more cases.
What we think we should do is we shouldn't specify the condition as parameter and modify Sharpmake so that it is able to
To implement this, we would have to rename TargetFrameworksCondition to something like TargetsConditions and modify it to take into account the Configuration and platform associated with the item For example:
|
Adds support for conditionals in csproj PackageReference entries.