views:

1012

answers:

2

I have a semi-large solution file in Visual Studio 2008, with around 25-30 projects in it.

I notice that a lot of times when I want to either close the solution file, or check in pending changes to TFS, VS will ask me if I want to save a particular project.

If I cancel the operation, hit Save All, then retry, it will ask me again.

If I try to check in pending changes, it will ask me, I hit Yes, to save the changes, the check-in takes place, and if I now try to close the solution, it will ask me again if I want to save the project file.

What am I doing wrong?

As far as I can tell, there's nothing different about this project compared to the others.

If I close the solution (saving the project file in the process), reopens it and closes it, then it doesn't ask me, but anything done to any of the files in the entire solution, and it looks like this file is now edited, even though VS hasn't checked it out.

At least once I've experienced that files I added to the project was not checked into TFS, so it seems the save operation doesn't take place at all, which would explain why it repeatedly asks me to save it.

If anyone can shed some light on this problem it would be nice.


Edit 1: In response to the editing of the project files to make sure it contains the SAK entries, all the project files in the solution already contains that. To make sure I just did a file-level recursive search for the XML nodes, and they all contain SAK.

A: 

Unload the project from your solution by right-clicking->unload. Then open the vcproj/csproj file in text editor by right-clicking->Edit on the project. There are some attributes like SccProjectName, SccLocalPath etc. Change all of those to:

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

Save it, and checkin it once and you will be fine.

SAK means that TFS binding info for the project can be gotten from mssccprj.scc file.

Aamir
Unfortunately, the file is already like that.
Lasse V. Karlsen
+1  A: 

Solved.

The project contains T4 template files, and if these are open in Visual Studio when I try to save all, the generation of the code seems to revolve around two steps:

  1. Delete old generated file
  2. Create new generated file

Both of these seems to change the project file momentarily, and thus it will always look changed to Visual Studio.

Lasse V. Karlsen