Visual Studio 2010 和 SourceSafe 2005 无效的解决方案文件
我最近重建了我的开发机器。在这台新机器上,VS 2010 无法再直接从 SS 2005 打开 sln 文件。这些是有效的 2010 解决方案(最初使用 VS 2010 创建),在我重新构建机器之前一直运行良好。
我收到的消息是“所选文件不是有效的解决方案文件”。
我已经重建了很多次并使用了很多次 VS 安装,并且使用 VS 05、08 或 10 从 SS 打开 sln 从来没有遇到过问题。我以前从未见过这种情况。
我已经重新安装了 SS 2005 以及最新的 SS 更新,但没有任何效果。
VS 2010 可以很好地从文件系统打开解决方案,所以它一定是 SS 的东西。
有什么想法吗?
好的,谢谢。我创建了一个控制台应用程序并将其签入 SS。没问题。当我从本地文件系统中删除它并尝试从 SS 获取解决方案时,我得到了同样的错误。我想说 sln 文件没有任何问题,但文件文本如下:
Microsoft Visual Studio Solution File, Format Version 11.00
Visual Studio 2010
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ConsoleApplication1" 、“ConsoleApplication1\ConsoleApplication1.csproj”、“{748E05CA-D880-4D89-9479-4AB800D79C82}” 结束项目 全球的 GlobalSection(SourceCodeControl) = preSolution Scc 项目数 = 2 SccLocalPath0 = . SccProjectUniqueName1 = ConsoleApplication1\ConsoleApplication1.csproj SccLocalPath1 = . SccProjectFilePathRelativizedFromConnection1 = ConsoleApplication1\ 结束全局部分 GlobalSection(解决方案配置平台) = preSolution 调试|x86 = 调试|x86 版本|x86 = 版本|x86 结束全局部分 GlobalSection(项目配置平台) = postSolution {748E05CA-D880-4D89-9479-4AB800D79C82}.调试|x86.ActiveCfg = 调试|x86 {748E05CA-D880-4D89-9479-4AB800D79C82}.调试|x86.Build.0 = 调试|x86 {748E05CA-D880-4D89-9479-4AB800D79C82}.发布|x86.ActiveCfg = 发布|x86 {748E05CA-D880-4D89-9479-4AB800D79C82}.发布|x86.Build.0 = 发布|x86 结束全局部分 GlobalSection(解决方案属性) = preSolution 隐藏解决方案节点 = FALSE 结束全局部分 终结全球
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
Visual 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
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
如果您从 SourceSafe 客户端获取本地磁盘的解决方案并使用 Visual Studio 打开它会怎么样?
What if you get the solution to your local disk from SourceSafe Client and open it using Visual Studio?
我遇到了完全相同的情况,并且花了我一段时间才弄清楚。在我的配置中,我有一个带有操作系统和程序的 SSD 驱动器,以及一个大数据驱动器。由于 SSD 空间非常宝贵,因此我将文档文件夹移至数据驱动器上。我的 SSD 出现故障,我不得不在新的 SSD 上重建操作系统和程序。所有 VS 项目都将无法加载,就像您一样。
事实证明,这个问题实际上与 VS 本身无关。当我重建操作系统时,即使我使用完全相同的用户名和密码,文档文件夹仍然无法唯一地将我识别为所有者,因此它不会让我读取、写入或删除任何文件。 VS 默认将您的项目放在文档文件夹中。是文件权限问题!
要修复问题 [在 Windows 7 中],请转到受影响的文件夹或文件,然后右键单击 ->特性。单击“安全”选项卡,它将向您发出警告,表明您不拥有此文件或文件夹。单击并选择您自己或任何其他管理员来访问权限页面(您尚未更改权限),但先不要单击“确定”。如果您正在查看文件夹,请选中属性页面底部的复选框以声明当前文件夹及其中所有内容的所有权,然后单击“确定”(如果不选中该复选框,则必须更改该文件夹的权限)该文件夹中的每个文件单独)。如果您正在查看文件,请单击“确定”,然后再次单击“安全”选项卡以编辑权限并将您自己添加为该文件的所有者,格式如下:机器名\用户名
一旦您再次拥有项目文件夹中的所有文件,一切都应该正常进行。同样的问题会影响许多不同的应用程序尝试访问文档文件夹中崩溃前的文档(但奇怪的是没有影响音乐、图片或视频)。我在使用 Adobe CS4 时也遇到了很大的问题,因为它使用文档文件夹在应用程序之间进行通信(Premiere 不会将渲染发送到 AME,AfterFX 会在启动时崩溃),即使您的项目不在“我的文档”中也是如此。相同的解决方案解决了所有问题。
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.