在看vs2005技巧时,有个运行宏来选择IDE窗口布局的例子,可总是出错,上网也没找到解决办法
1 Imports System
2 Imports EnvDTE
3 Imports EnvDTE80
4 Imports System.Diagnostics
5
6 Public Module WindowsSytleSelected
7
8 Public Sub code_bigwindow()
9 DTE.ExecuteCommand("Tools.ImportandExportSettings", "/import:c:\demo\settings\code_bigwindow.vssettings")
10 End Sub
11
12 Public Sub code_leftwindow()
13 DTE.ExecuteCommand("Tools.ImportandExportSettings", "/import:c:\demo\settings\code_leftwindow.vssettings")
14 End Sub
15
16 Public Sub code_rightwindow()
17 'Dim item As ProjectItem = DTE.Solution.FindProjectItem("VsEditorFormatting.vssettings")
18
19 'If Not item Is Nothing Then
20
21 'Dim name = item.FileNames(1)
22 ' End If
23 ' DTE.ExecuteCommand("Tools.ImportandExportSettings", "-import:""" & name & """")
24 DTE.ExecuteCommand("Tools.ImportandExportSettings", "-import:""c:\demo\settings\code_rightwindow.vssettings""")
25 End Sub
26 End Module
9,13,24行都出现下面的错误,谁知道哪错了啊~~2 Imports EnvDTE
3 Imports EnvDTE80
4 Imports System.Diagnostics
5
6 Public Module WindowsSytleSelected
7
8 Public Sub code_bigwindow()
9 DTE.ExecuteCommand("Tools.ImportandExportSettings", "/import:c:\demo\settings\code_bigwindow.vssettings")
10 End Sub
11
12 Public Sub code_leftwindow()
13 DTE.ExecuteCommand("Tools.ImportandExportSettings", "/import:c:\demo\settings\code_leftwindow.vssettings")
14 End Sub
15
16 Public Sub code_rightwindow()
17 'Dim item As ProjectItem = DTE.Solution.FindProjectItem("VsEditorFormatting.vssettings")
18
19 'If Not item Is Nothing Then
20
21 'Dim name = item.FileNames(1)
22 ' End If
23 ' DTE.ExecuteCommand("Tools.ImportandExportSettings", "-import:""" & name & """")
24 DTE.ExecuteCommand("Tools.ImportandExportSettings", "-import:""c:\demo\settings\code_rightwindow.vssettings""")
25 End Sub
26 End Module