dotnet / dotnet/project-system

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

Open
#1,802 15 comments 51 reactions 0 assignees View on GitHub
Feature-Project-File-Simplification Triage-Approved
Dominant language
C#
Stars
1k
Forks
415
PR merge metrics
No merged PRs in 30d

Description

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:

```xml

%24/TFS/Path
{SOME_GUID}
http://servername:8080/tfs/ProjectCollectionName
.

```

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

SAK
SAK
SAK
SAK

```

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.

Contributor guide

Open the contributing guide

Research direction

No files, tests, or entry points are named. Trace where the project system generates or consumes SccProjectName, SccProvider, SccAuxPath, and SccLocalPath, then compare the legacy and Git behavior described here. Done means Visual Studio source-control behavior remains functional without adding source-control properties to the .csproj.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
build-system, tooling
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.