简体   繁体   English

Visual Studio 2008 - 移动解决方案文件(sln,suo)

[英]Visual Studio 2008 - Moving solution files (sln, suo)

If a VS2008 project is created initially with a web app project, and class projects are added, and the structure is like this: 如果最初使用Web应用程序项目创建VS2008项目,并添加了类项目,结构如下所示:

Parent Folder
    Web App Project Folder - (solution Files in this folder)
    Class Project 1
    Class Project 2
    ...

do you see any problems with moving the .sln and .suo files to the parent directory? 你看到将.sln和.suo文件移动到父目录有什么问题吗?

Parent Folder - (solution Files in this folder)
    Web App Project Folder 
    Class Project 1
    Class Project 2
    ...

I adjusted the .sln project directories and the solution seems to be working fine, but I'm wondering if this action will break something I didn't anticipate. 我调整了.sln项目目录,解决方案似乎工作正常,但我想知道这个动作是否会破坏我没想到的东西。

Only the project files determine their build outputs - solutions only link projects together into a logical entity, so that they can be loaded at the same time in a Visual Studio instance. 只有项目文件才能确定其构建输出 - 解决方案只将项目链接到一个逻辑实体,以便可以在Visual Studio实例中同时加载它们。 If the projects are still the same, nothing's broken. 如果项目仍然相同,没有什么是破碎的。

You can open your .sln file with whatever editor you'd like, even notepad, and see that it contains only references to your project files in it, you can modify it so that the relative paths to your project files in it match your layout. 您可以使用您想要的任何编辑器打开.sln文件,甚至是记事本,并且看到它只包含对项目文件的引用,您可以对其进行修改,以使其中项目文件的相对路径与您的布局相匹配。 VS wouldn't have anything against it. VS不会有任何反对意见。
All build settings are stored in project files, so you don't loose any configuration changes you've done in your projects. 所有构建设置都存储在项目文件中,因此您不会丢失在项目中执行的任何配置更改。

And the .suo file can be safely deleted. 并且可以安全地删除.suo文件。 It's a user-specific file that simply retains a particular user's options for a solution. 它是一个特定于用户的文件,只保留特定用户的解决方案选项。 It contains nothing that's important to projects, build settings etc. 它不包含任何对项目,构建设置等重要的内容。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM