-
Notifications
You must be signed in to change notification settings - Fork 188
[Vcxproj] Improve NuGet handling in packages.config mode & add necessary logic for package reference mode #399
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
Conversation
We want VS to find files in build/native/ piror to files in build/
2. Add searching priority for reference files
…yle includes for C++ project. (requires extra Directory.Build.props hack)
|
Hi The next step is we need some samples using this if you ever want this to land eventually. Thanks. |
|
It looks like you need to update some samples reference files(see CI failure) |
|
Hi, Run Yet the doc about what needs to be done in order to add a new sample is fairly unclear to me. There is a Samples.md but it is not enough, many other things are not mentioned like how to properly make reference files, how to update launchSettings.json, etc. Currently the new sample involves a copy action of P.S. there is one thing needs to be beware of: in SamplesDef.json the target of |
|
you need to edit UpdateSamplesOutput.bat and run it. this will generate new references files. |
|
the changes looks fine but the CI fails possibly due to the fact that you need to regenerate references(execute updatesamplesoutput.bat after edit) |
|
Hi, just a follow up in case the commit didn't trigger notification: reference files have been updated by the output of UpdateSamplesOutput.bat. |
…piling cpp (as msbuild command might not exists in CI)
|
merged. thanks |
1. Improve
.targetsimport logic when using NuGet packages.config modeOld Behaviour:
/build/native/*.targetsand/build/*.targetsare both imported.Problem: in common,
/build/native/*.targetsfor C++ project is firstly chosen if presented, old logic will make/build/*.targetsalso be imported, and in before of/build/native/*.targets, causing troubles.e.g. Microsoft.WindowsAppSDK
Current Behaviour:
/build/native/*.targetsimport is made before/build/*.targets, it will check if/build/native/*.targetsis not presented, then do the
/build/*.targetsimport.2. Add support codes for NuGet package reference mode in
.vcxprojThe current NuGet support for C++ project is incomplete.
.propsfile import is not supported..targetsand.propsfiles are initially presented in order to generate correct error check..targetsand.propsfiles are not supported.[Vcxproj] Support explicit path to NuGet .targets, and clean up existing packages.config if no longer needed #390
here and NuGet/NuGet.Client#3145 have shown the way to force package reference mode for
.vcxproj.To achieve this in Sharpmake, it requires
Directory.Build.props<PackageReference>element generation support inside SharpmakeThis PR contains the 2. part.
I haven't figure out the best way to automatically handle 1., but since
Directory.Build.propsis originally a thing that users manually add to their projects, so it should be no harm to let them also add that custom configuration manually (for now?)P.S. the default NuGet mode for C++ project still keeps as packages.config.