Skip to content

add C++ Project and C++ ARM/ARM64 Desktop application PackageReference support - #67

Closed
mingkuang-Chuyu wants to merge 7 commits into
dotnet:mainfrom
mingkuang-Chuyu:master
Closed

mingkuang-Chuyu wants to merge 7 commits into
dotnet:mainfrom
mingkuang-Chuyu:master

Conversation

@mingkuang-Chuyu

@mingkuang-Chuyu mingkuang-Chuyu commented Dec 14, 2019 •

Copy link
Copy Markdown

Home issue

NuGet/Home#8874

As we all know, packages.xml easily leads to wasted space and a large number of IO copy operations. So I hope that nuget can support VC++ to support PackageReference style.

New features

  1. add C++ Project PackageReference style restore support.
  2. add C++ ARM/ARM64 Desktop application support.
  3. add C++ Project TargetFramework support.

@mingkuang-Chuyu

mingkuang-Chuyu commented Dec 23, 2019 •

Copy link
Copy Markdown
Author

targetFramework matching order

  (vs2019)
native v14.20.27508, 14.21.27702, 14.22.27905, 14.23.28105 ...
       |
  (vs2017)
native v14.10.25017, 14.11.25503, 14.12.25827, 14.13.26128 ...
      |
  (vs2015)            (vs2013)       (vs2012)          (vs2010)      (vs2008)
native v14.0      native v12.0     native v11.0    native v10.0    native v9.0
       ╲                    ╲           |             ╱               ╱
                                    native v0.0 

For example, if the following 2 paths exist in a package:

  • build\native14.0\Test.Static.targets
  • build\native14.20\Test.Static.targets

If we use the v142 toolset (14.23.28105 vs2019), then build\native14.20\Test.Static.targets will insert * .nuget.g.targets.

If we use the v141 toolset (14.13.26128 vs2017), then build\native14.0\Test.Static.targets will insert * .nuget.g.targets.

<!-- The items in _NuGetContentItems need to go into the appropriately-named item group, but the names depend upon the items
themselves. Split it apart. -->
<CreateItem Include="@(_NuGetContentItems)" Condition="'@(_NuGetContentItems)' != ''">
<CreateItem Include="@(_NuGetContentItems)" AdditionalMetadata="PrecompiledHeader=NotUsing" Condition="'@(_NuGetContentItems)' != ''">

@mingkuang-Chuyu mingkuang-Chuyu Dec 25, 2019 •

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The PrecompiledHeader is unique to C++ projects, and this option reduces the generality of the asset. Because we don't know if the project has precompiled headers enabled. And we don't know the name of the precompiled header file.

For other projects adding PrecompiledHeader, nothing will happen.

So we can add “PrecompiledHeader=NotUsing”.

@dmonroym
dmonroym changed the base branch from master to main October 24, 2020 01:51
@MiYanni

MiYanni commented Sep 13, 2021

Copy link
Copy Markdown
Member

@mingkuang-Chuyu Are these changes still needed? This PR has been open for a while.

@Nirmal4G

Copy link
Copy Markdown

@MiYanni 2 years is too much to say "… for a while."! 😂

Also, I think PackageReference support is being added from VS16.8 or is in the works and is slated for completion by VS17 release.

In fact, I do want to know what's the current status!!

@nkolev92

Copy link
Copy Markdown
Contributor

C++/CLI .NET Core are the only types slated to get PackageReference support: NuGet/Home#8195

C++ native is something not planned right now: Voicing your concern here is the right approach: https://developercommunity.visualstudio.com/t/use-packagereference-in-vcxproj/351636.

I can't really make that decision myself. Refer to any updates in that issue.

@MiYanni

MiYanni commented Sep 20, 2021

Copy link
Copy Markdown
Member

Based on the discussion, I believe the best course of action at the moment is to close this PR. It sounds like the best place to help out is by following the links that @nkolev92 provided. If these changes could be utilized in the future, the PR can be reopened at any time.

@MiYanni MiYanni closed this Sep 20, 2021
@mingkuang-Chuyu

mingkuang-Chuyu commented Oct 9, 2021 •

Copy link
Copy Markdown
Author

@MiYanni I hope to merge as soon as possible. Your(MS) work efficiency is very high!

@levicki

levicki commented Nov 25, 2021

Copy link
Copy Markdown

Is there any ETA on this feature? It is sorely needed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants