Skip to content
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

Custom CPS projects require AssemblyReferences project capability in order to restore. #8071

Closed
kfertitta opened this issue Apr 29, 2019 · 4 comments

Comments

@kfertitta
Copy link

Our custom project systems are built on CPS and use a project SDK to import our targets. We also import the Microsoft common targets. Ours are not .NET project types, but full-on custom projects which produce domain-specific (non-assembly) artifacts. While we do require support for the ProjectReferences capability and need to see project references in the dependencies tree in Solution Explorer, we have no notion of assembly references. However, without declaring the AssemblyReferences project capability, our project does not perform a NuGet restore automatically when we create the project with our template wizard nor does it restore an existing project when opened. With the AssemblyReferences <img width="1535" alt="Untitled" src="https://user-images.githubusercontent.com/1080656/56930757-b40c8680-6a92-11e9-9f75-530eb41f86e1.png"> project capability in place, along with imports for the corresponding XAML rules files, everything works fine.

This leads to confusion for our customers that see dependencies that don't apply. Please see the attached screenshot.

@nkolev92
Copy link
Member

Apologies for the delay.

We need to work with @davkean & project-system to clarify the capabilities NuGet should require from the project-systems in order to support auto restore.

//cc @rrelyea

@nkolev92
Copy link
Member

nkolev92 commented Nov 7, 2020

Maybe fixed by NuGet/NuGet.Client#3726 and NuGet/NuGet.Client#3644.

@nkolev92
Copy link
Member

Confirmed that this is fixed.
In here, https://github.com/NuGet/NuGet.Client/blob/a4c9d63bf942f1df1ba9486a87bad2e4b6888488/src/NuGet.Clients/NuGet.PackageManagement.VisualStudio/Projects/CpsPackageReferenceProjectProvider.cs#L77-L78 the checks are CPS and PackageReferences support.

@nkolev92
Copy link
Member

Please note that this was fixed in 5.9, so it will be in the next Visual Studio 16.9 preview.

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

No branches or pull requests

4 participants