.csproj.user when checking in TFS

We made a mistake by allowing the .csproj.user files to be checked in TFS so that we can set the "Run external program" values ​​by default. This worked poorly, especially when branching.

Now we are trying to undo it.

If I delete the .csproj.user file for the project and then try to set new debugging properties for the project, I get:

TF14050: It is not possible to modify the element $ / xxx.csproj.user because it already has a pending change that is incompatible.

If I register deletion and modification, TFS then tries to re-add the .csproj.user file.

How can we fix this for existing projects in source management?

Update:

I think their destruction is the best option; we ended up just deleting them using TFS Power Tools. The trick was the first "Delete Source Control File Type" that we had for * .user, although it was already disabled. Now TFS seems to completely ignore these files.

+6
source share
5 answers

I suggest you use the Destroy command. Be careful as it is permanently deleted. MSDN Documentation: http://msdn.microsoft.com/en-us/library/bb386005.aspx

Run the Visual Studio 2010 command and use tf.exe ...

+2
source

I also wanted to register .user files to do what I wanted to specify default options for debug / run options. It turns out that the .user file is another XML file for the MSBuild Project, and you can simply "merge" a group of properties there into your project. No need for .user files.

<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|AnyCPU'"> <StartAction>Program</StartAction> <StartProgram>$(VS100COMNTOOLS)..\IDE\devenv.exe</StartProgram> <StartArguments>/rootsuffix Exp</StartArguments> </PropertyGroup> 
+4
source

Make sure that someone does not have the file, and then delete the file, checking it as deletion, not editing.

I use Team Foundation Power Tools and do it from the Windows Shell context menu

+2
source

After deleting the file in TFS, it has not disappeared yet. You need to register your deletion. Only then will the file disappear.

It’s best to also clear the workspace so that user files do not linger as read-only files.

+1
source

I am using TFS Git and I was able to delete the unwanted file on the server through the TFS project site. Then I synchronized the local project with the server.

When you open a project for VS synchronization, you may complain that you cannot synchronize until you commit the changes to the junk file. This is exactly what I did not want to do, I wanted the file to disappear.

However, on the change screen, I right-clicked the file and said β€œdiscard the changes”, and this made it leave.

After canceling the changes, I was able to synchronize, and the server deleted the unnecessary file from my local repository.

0
source

Source: https://habr.com/ru/post/911111/


All Articles