我可以在 VS2008 的不同项目/解决方案中使用不同的大括号样式吗?
我正在处理几个使用不同 C# 大括号样式的开源项目,并且我想配置 VS 文本格式以对每个项目使用不同的样式,以便我可以使用 Ctrl-KD 重新格式化源代码。
有什么方法可以配置 Visual Studio 2008 来加载一组特定的文本格式首选项以及特定的解决方案文件吗?
I'm working with a couple of open-source projects that use different C# brace styles, and I'd like to configure VS text formatting to use different styles for each project so I can use Ctrl-K-D to reformat source code.
Is there any way I can configure Visual Studio 2008 to load a particular set of text formatting preferences along with a particular solution file?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
据我所知,没有办法在 VS 2008(甚至 2010)中本地执行此操作,
有一个
resetsettings
Visual Studio 中的命令行开关,您可以使用它来指示它应该启动的设置。这在 2005 年有效,我想它也适用于 2008 年,尽管我个人没有在 2008 年尝试过。如果你只是使用这种方法制作一个 bat 文件 如此处所示,这可能是解决您的问题的一种方法。另外,还有一个选项可以执行基于宏的解决方案,这可能会对您有所帮助,我记得过去看过。您可能可以 查看此网站,它指示如何执行与您正在寻找的内容非常相似的操作
As far as i know, there is no way to do this natively in VS 2008 (or even 2010 for that matter)
There is a
resetsettings
command line switch in Visual Studio which you can use to indicate what settings it should start up with. This works in 2005 and i presume it would with 2008 as well though i have personally not tried it with 2008. If you just make a bat file using this method as indicated here, that might be one workaround to your problem.Also, there is an option to do a macro based solutions that might help you that i remember looking at in the past.You can probably check out this site which indicates how to do something very similar to what you are looking for