Visual Studio 2010 and SourceSafe 2005 invalid solution file
I recently re-built my development machine. On this new machine, VS 2010 can no longer open sln files directly from SS 2005. These are valid 2010 solutions (orginally created witih VS 2010) that worked fine until I re-built my machine.
The message I get is "The selected file is not a valid solution file".
I've re-built many times and used many installs of VS and never had a problem opening sln's from SS using VS 05, 08 or 10. I've just never seen this before.
I have re-installed SS 2005 as well as the latest SS update but nothing works.
VS 2010 can open solutions from the file system just fine, so it must be a SS thing.
Any ideas?
Okay thanks. I created a console app and checked it into SS. No problems. When I delete it from my local file system and try and get the solution from SS I get the same error. I would say there's nothing wrong with the sln file, but here's the text of file:
Microsoft Visual Studio Solution File, Format Version 11.00
Visu开发者_JAVA百科al Studio 2010
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ConsoleApplication1", "ConsoleApplication1\ConsoleApplication1.csproj", "{748E05CA-D880-4D89-9479-4AB800D79C82}" EndProject Global GlobalSection(SourceCodeControl) = preSolution SccNumberOfProjects = 2 SccLocalPath0 = . SccProjectUniqueName1 = ConsoleApplication1\ConsoleApplication1.csproj SccLocalPath1 = . SccProjectFilePathRelativizedFromConnection1 = ConsoleApplication1\ EndGlobalSection GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|x86 = Debug|x86 Release|x86 = Release|x86 EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution {748E05CA-D880-4D89-9479-4AB800D79C82}.Debug|x86.ActiveCfg = Debug|x86 {748E05CA-D880-4D89-9479-4AB800D79C82}.Debug|x86.Build.0 = Debug|x86 {748E05CA-D880-4D89-9479-4AB800D79C82}.Release|x86.ActiveCfg = Release|x86 {748E05CA-D880-4D89-9479-4AB800D79C82}.Release|x86.Build.0 = Release|x86 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection EndGlobal
What if you get the solution to your local disk from SourceSafe Client and open it using Visual Studio?
I've run into exactly the same situation and took me a while to figure out. In my config, I had a SSD drive with OS and programs on it, and a big data drive. Because SSD space was precious, I moved over my documents folder onto the data drive. My SSD failed, and I had to rebuild my OS and programs on a new SSD. All VS projects would then fail to load, just as with you.
Turns out that the problem actually has nothing to do with VS per se. When I rebuilt the OS, even though I used exactly the same user name and password, the documents folder still did not uniquely recognize me as the owner, so it would not let me read, write, or erase any files. And VS by default places your projects in your documents folder. It's a file permission problem!
To fix the problem [in Windows 7] go to the affected folder or file and right click -> Properties. Click on the Security tab and it will give you a warning that you don't own this file or folder. Click through and select yourself or any other administrator to access the permissions page (you still have not changed permissions yet), but don't click ok yet. If you are looking at a folder, check the checkbox at the bottom of the properties page to claim ownership of the current folder and everything in it, and click ok (if you don't check the checkbox, you have to change the permissions of each file in this folder individually). If you are looking at a file, click ok, then click through the Security tab again to edit the permissions and add yourself as an owner of this file in the form: machinename\username
Once you own all the files in the project folder again, everything should be working as normal. This same problem will affect many different apps trying to access pre-crash documents in the documents folder (but strangely did not affect music, pictures, nor video). I also had big problems with Adobe CS4, because it used the documents folder to communicate between apps (Premiere would not send renders to AME, and AfterFX would crash at launch), even if your project is not in My Documents. Same solution fixes everything.
精彩评论