Closed davkean closed 8 years ago
Okay, did some investigation, for this, I think we should write a custom IProjectPropertiesProvider that handles the ProjectGuid property, that itself reads from a property that reads from the ProjectFile. We choose to delegate down to that property on Set based on whether it already has a GUID.
If the solution tries to push the project guid to the project, do not write it. (But if the project file already has a guid, leave it there.)
👏
What's the replacement for ProjectTypeGuids
? ReSharper currently uses this to enable certain functionality (e.g. if it's a web application, and so on). How would ReSharper do this in the CPS world?
@citizenmatt The replacement for ProjectTypeGuids is a concept called "project capabilities", web, for example, will have a special well-known capability that lights up the web tooling. ReSharper can use the same markers to light up their tooling.
Ah, yes. We're already using project capabilities for shared project support in VS2015. Is there a plan to have the capability names documented somewhere?
We've started documenting them here: https://github.com/Microsoft/VSProjectSystem/blob/master/doc/overview/project_capabilities.md.
GUIDs are extremely unfriendly, and are only used for Visual Studio purposes. As we move the project file to a human editable file format, we should avoid using them.
There are three main ones today:
ProjectGuid property
This is used as unique key of a project within a solution. First approach of removal should be to move this to an in-memory and solution-only concept.
Project metadataUsed by csproj/msvbprj to find the hierarchy of the project, introduced in VS 2010 release. I can't find the history, but it appears that it may have been persisted so that if a project is renamed underneath the project (for example, if it was unloaded, or in a different solution), it can continue to find the old project.
CPS does not persist this today - so no work to do here.
ProjectTypeGuids propertyUsed to indicate the project factories that should be used to open a project inside Visual Studio.
CPS completely removes the need for this, and this can be safely removed for projects that have opt'd into CPS.
Work required to pull this off:
ProjectTypeGuids
(CPS doesn't have this concept)<Project>
metadata under a<ProjectReference>
<ProjectGuid>