如何在不带.suo文件的Visual Studio中设置默认配置
在VS2013 Pro中,打开解决方案后的默认配置为调试".
In VS2013 Pro, the default configuration after open solution is "Debug".
如何将我的默认配置更改为发布"没有.suo文件?
How to change my default configuration to "Release" without .suo file ?
我试图订购"Release"(发布)在调试"之前的模式. .sln文件中的模式,但仍然无法正常工作
I tried to order "Release" mode before "Debug" mode in my .sln file, but it's still not working
GlobalSection(SolutionConfigurationPlatforms)= preSolution
GlobalSection(SolutionConfigurationPlatforms) = preSolution
释放|任何CPU =释放|任何CPU
Release|Any CPU = Release|Any CPU
发布|混合平台=发布|混合平台
Release|Mixed Platforms = Release|Mixed Platforms
Release | x86 = Release | x86
Release|x86 = Release|x86
调试|任何CPU =调试|任何CPU
Debug|Any CPU = Debug|Any CPU
调试|混合平台=调试|混合平台
Debug|Mixed Platforms = Debug|Mixed Platforms
调试| x86 =调试| x86
Debug|x86 = Debug|x86
EndGlobalSection
EndGlobalSection
嗨Copperhead89,
Hi Copperhead89,
解决方案的解决方案配置存储在.suo文件中,该文件包含每个用户 解决方案选项.我已经检查了Visual Studio和.sln的所有配置,没有这样的设置可以设置默认的解决方案配置.
The Solution Configuration for solution is stored in .suo file which contains per-user solution options. I have checked all configurations for Visual Studio and .sln, there doesn't have such settings could set default Solution Configuration.
如果您希望解决方案下的所有项目都以发布模式构建,则有两种方法可以实现您的需求.
If you want all projects under the solution build in release mode, there are two ways to implement your requirement.
第一种方法是,使用MSBuild构建您的解决方案,并使用"/p:Configuration = Release"命令,该命令将以发布模式构建您的解决方案.
First way, build your solution with MSBuild and use the command of "/p:Configuration=Release", which will build your solution in release mode.
请参考:
第二种方式,请通过构建"菜单->将每个项目的构建都设置为发布模式.配置管理器.然后,您可以在配置管理器"窗口中设置每个项目,此配置将存储在项目文件中.
Second way, please set every project build in release mode through Build menu -> Configuration Manager. Then you can set every project on the Configuration Manager window and this configuration will be stored in project file.
最好的问候,
Weiwei
Best Regards,
Weiwei