帮助解决 Visual Studio 2008 的烦恼

发布于 2024-09-04 19:42:32 字数 937 浏览 8 评论 0原文

我真的很喜欢 VS2008,但我想知道是否有人有解决这些烦恼的解决方法:

  • 当我打开 /* ... */ 注释块时,VS 坚持在每个新行上放置一个 '*' 字符。这很好,但有时我根本不想要这样。有办法把它关掉吗? C# 编辑器的“选项”对话框中的格式设置部分似乎没有提供可调整的选项。我也尝试过执行 Shift+Enter 之类的操作,但没有成功。
  • VS2003 用于在主窗口标题中显示活动文件名及其所属项目(如果有)。例如,“ProjectFoo - AssemblyInfo.cs - Microsoft Visual Studio”或其他内容。这似乎已经消失了,无法打开它。我曾经依靠项目部分来快速导航解决方案资源管理器,但现在我发现自己坐在那里思考我正在寻找的文件属于哪个项目。当一个解决方案中有 30 个项目时,这往往会变得过时。而且自动同步功能在这里不是一个选项,因为我注意到 2008 年的速度比 2003 年的速度要慢。
  • VS2003 过去在编译单个文件及其所有依赖项已更改的项目时速度快如闪电。 VS2008 似乎需要更长的时间才能完成同样的事情。为什么?我查看了这些选项,我所能找到的只是“仅编译足以在调试时运行”,但这似乎对构建速度没有任何影响。这是 MSBuild 的“功能”还是什么?
  • 有没有办法关闭当我按 Ctrl+Tab 时出现的炫目的选择器,然后将其切换到下一个文件?
  • 为什么 VS2008 将新打开文件的选项卡放置在选项卡选择器的开头而不是末尾?我知道这是某些编辑器中的一个选项,有些人更喜欢它,但我希望我打开的最后一个文件位于选项卡选择器的末尾。这似乎也不是一个选择。
  • 当我调试时,我注意到有一个非常烦人的延迟。当我单步执行代码时,VS 似乎将每个打开的文件设置为只读并返回。我的意思是我可以看到蓝色的小锁图标在文件标题旁边的选项卡选择器中出现和消失。我确实需要单步执行我的代码,而不必在每次按 F10 时看到整个窗框闪烁。有办法解决这个问题吗?

I really like VS2008 but I was wondering if someone has workarounds for these annoyances:

  • When I open a /* ... */ comment block, VS insists on placing a '*' character on every new line. That's nice, but sometimes I don't want that at all. Is there a way to turn it off? The formatting section in the Options dialog for the C# editor doesn't seem to offer that as an adjustable option. I've also tried doing Shift+Enter and whatnot without success.
  • VS2003 used to display the active filename and the project (if any) it belonged to in the main window title. E.g., "ProjectFoo - AssemblyInfo.cs - Microsoft Visual Studio" or something. That seems to be gone with no way to turn it on. I used to rely on the project part to navigate the solution explorer quickly, but now I find myself sitting there thinking which project the file I'm looking for belongs to. When you have 30 projects in a solution this tends to get old. And the auto sync thing is not an option here because I noticed it's slower in 2008 than it was in 2003 to begin with.
  • VS2003 used to be lightning fast at compiling a project where a single file had changed and all its dependencies. It seems that VS2008 takes a hell of a lot longer to do the same thing. Why? I've looked at the options and all I can find is the "only compile enough to run when debugging" but that doesn't seem to make any difference in the speed of the builds. Is this a "feature" of MSBuild or something?
  • Is there a way to turn off that glitzy selector that appears when I hit Ctrl+Tab and just have the thing switch to the next file?
  • Why does VS2008 place tabs of newly-opened files at the beginning of the tab selector rather than at the end? I know this is an option in some editors and some people prefer it, but I want the last file I opened to be at the end of the tab selector. This doesn't seem to be an option, either.
  • There is a really annoying lag I've noticed when I debug. As I step through code VS seems to be setting each opened file to read only and back. I mean I can see little blue lock icons appear and disappear in the tab selectors next to the file titles. I really need to just step through my code without having to see the whole window frame flash and flicker with every F10. Is there a way to fix this?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(4

深陷 2024-09-11 19:42:32

问题太多了,我无法回答,所以我只回答一个,然后让其他人插话
与其余的。

当我打开 /* ... */ 注释块时,VS 坚持在每个新行上放置一个 * 字符。这很好,但有时我根本不想要这样。有办法关掉吗?

答案可以在 这个重复

工具>选项...>>文本编辑器> C#>高级>取消选中“为 /// 生成 XML 文档注释”。

(当然,除了删除块注释中的自动 * 之外,这还会在您键入“///”时禁用自动格式设置,正如它所说的那样。)

That's too many questions for me to answer so I'll just take one and let others chime in
with the rest.

When I open a /* ... */ comment block, VS insists on placing a * character on every new line. That's nice, but sometimes I don't want that at all. Is there a way to turn it off?

The answer is found in this duplicate:

Tools > Options... > Text Editor > C# > Advanced > Uncheck "Generate XML Documentation comments for ///".

(Of course, in addition to getting rid of the automatic * in block comments, this will disable the autoformatting when you type "///", as it says.)

你穿错了嫁妆 2024-09-11 19:42:32

让我再问一个问题:

VS2003 曾经快如闪电
编译一个项目,其中单个
文件已更改并且其所有内容
依赖关系。好像是VS2008
需要更长的时间才能完成
同样的事情。为什么?我看过
选项,我能找到的就是
“仅编译足以运行时
调试”,但这似乎不是
的速度有任何差异
构建。这是一个“特征”吗?
MSBuild 还是什么?

这可以通过将 VS 设置为仅构建启动项目及其依赖项来实现,如 此处

仅构建启动项目并
它的依赖项

  1. 在“工具”菜单上,选择“选项”。

  2. 在“选项”对话框中,展开“项目和解决方案”
    文件夹,然后选择“构建并运行”。>
    将打开“构建和运行”、“项目和解决方案”、“选项”对话框。

  3. 选择“仅构建启动项目和依赖项”选项
    运行。

    当选择此选项时,仅当前启动项目和
    当您执行以下操作时,就会构建其依赖项:

    • 从“调试”菜单中选择“开始”(F5)。

      -或-

    • 从“构建”菜单中选择“构建解决方案”(CTRL+SHIFT+B)。

    清除此选项后,将构建上述任一命令
    所有项目、它们的依赖项以及
    解决方案文件。默认情况下,这
    未选择该选项。

Let me take another question:

VS2003 used to be lightning fast at
compiling a project where a single
file had changed and all its
dependencies. It seems that VS2008
takes a hell of a lot longer to do the
same thing. Why? I've looked at the
options and all I can find is the
"only compile enough to run when
debugging" but that doesn't seem to
make any difference in the speed of
the builds. Is this a "feature" of
MSBuild or something?

This can be achieved by setting VS to only build the startup project and its dependencies as described here:

To build only the startup project and
its dependencies

  1. On the Tools menu, choose Options.

  2. In the Options dialog box, expand the Projects and Solutions
    folder, and choose Build and Run.>
    The Build and Run, Projects and Solutions, Options Dialog Box opens.

  3. Select the option to Only build startup projects and dependencies on
    Run.

    When this option is selected, only the current startup project and
    its dependencies are built when you:

    • choose Start (F5) from the Debug menu.

      -or-

    • choose Build Solution (CTRL+SHIFT+B) from the Build menu.

    When this option is cleared, either of the preceding command builds
    all projects, their dependencies, and
    the solution files. By default, this
    option is not selected.

这样的小城市 2024-09-11 19:42:32

我知道这个问题很老了,但是在 VS2008 中你需要打开工具 ->选项->如果您希望停止此行为,请调试并禁用“编辑并继续”。

I know this question is dirt old, but in VS2008 you need to open up tools -> Options -> Debugging and disable "Edit and Continue", if you want this behavior to stop.

妳是的陽光 2024-09-11 19:42:32

我希望这可以帮助那些寻找 VS2008 烦恼解决方案的人。当单步执行本机 C++ 代码时,如果光标位于源文件窗口中,我会出现奇怪的延迟。我终于想出了如何摆脱它。

1) 转到“控制面板\所有控制面板项目\个性化”并选择“更改鼠标指针”

2) 选择“指针”选项卡

3) 禁用/取消选中“启用指针阴影”

现在我不必关闭手表窗口、自动车窗等。

I hope this helps someone searching for solutions to VS2008 annoyances. When stepping in native C++ code, I was getting a strange lag if my cursor was in a source file window. I finally figured out how to get rid of it.

1) Go to "Control Panel\All Control Panel Items\Personalization" and select "Change mouse pointers"

2) Select "Pointers" tab

3) Disable/Uncheck "Enable pointer shadow"

Now I don't have to close my watch windows, auto window, etc..

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文