Project-system: Please do not put source control concerns in the .csproj (SccProjectName, etc)

Created on 21 Mar 2017  路  8Comments  路  Source: dotnet/project-system

If you create a new csproj, source control icons in Solution Explorer and change detection do not function properly, and when you open the project Visual Studio prompts you to select source control configuration. To make the problem go away, it inserts this in your csproj:

  <PropertyGroup Label="Globals">
    <SccProjectName>%24/TFS/Path</SccProjectName>
    <SccProvider>{SOME_GUID}</SccProvider>
    <SccAuxPath>http://servername:8080/tfs/ProjectCollectionName</SccAuxPath>
    <SccLocalPath>.</SccLocalPath>
  </PropertyGroup>

First, this is what the legacy csprojs had, and this also works:

  <PropertyGroup>
    <SccProjectName>SAK</SccProjectName>
    <SccProvider>SAK</SccProvider>
    <SccAuxPath>SAK</SccAuxPath>
    <SccLocalPath>SAK</SccLocalPath>
  </PropertyGroup>

But as should hopefully be clear from the second snippet, this is not providing any information of value which can't already be determined by looking at the workspace mapping. If this was a project under Git source control, that's exactly what Visual Studio would do. It should do the same for TFS and keep the csproj clean of such concerns.

Since you're improving the .csproj story with this project system, please be consistent and consistently separate concerns cleanly. A csproj should be able to go back and forth between Git and TFS source control without changing. The contents of the entire solution should be independent of its location.

Feature Request Feature-Project-File-Simplification Triage-Approved

Most helpful comment

This should also include getting rid of the vspscc and vssscc files.

https://github.com/dotnet/project-system/issues/1801

All 8 comments

I am fully encourage.

@jjmew @davkean Is there any progress on this issue?

@skrysmanski Thanks for reaching out. As of now we haven't scheduled time to work on this. It is unlikely that we will get to this in the near future.

This should also include getting rid of the vspscc and vssscc files.

This is so painful when using branches in TFS VC and causes very unnecessary churn and noise in change sets, and code history.
Please fix this.

What is the consequence of checking in a branched project that still references the source branch path for this <SccProjectName /> element?

I think VS complains about the source control bindings when you load the solution, but I have "SAK" in the proj files, which makes vs refer to the solution for the binding info.

This should also include getting rid of the vspscc and vssscc files.

https://github.com/dotnet/project-system/issues/1801

Was this page helpful?
0 / 5 - 0 ratings