本文介绍了你有没有为Microsoft Visual Studio的任何建议宏?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
什么是你已经找到了code操作和自动化在Visual Studio中一些有用的宏?
What are some macros that you have found useful in Visual Studio for code manipulation and automation?
推荐答案
这是我的宏关闭解决方案,删除智能感知文件,并重新打开解决方案。必不可少的,如果你是在本地C ++的工作。
This is my macro to close the solution, delete the intellisense file, and reopen the solution. Essential if you're working in native C++.
Sub UpdateIntellisense()
Dim solution As Solution = DTE.Solution
Dim filename As String = solution.FullName
Dim ncbFile As System.Text.StringBuilder = New System.Text.StringBuilder
ncbFile.Append(System.IO.Path.GetDirectoryName(filename) + "\")
ncbFile.Append(System.IO.Path.GetFileNameWithoutExtension(filename))
ncbFile.Append(".ncb")
solution.Close(True)
System.IO.File.Delete(ncbFile.ToString())
solution.Open(filename)
End Sub
这篇关于你有没有为Microsoft Visual Studio的任何建议宏?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!