Is there a way to change something in Tool-> Options using a macro?

I would like to easily switch between the two values ​​for "maximum number of parallel projects" in Visual Studio 2008 (in "Tools-> Options-> Projects and Solutions->" Build and Run "). (When I plan to do parallel work, I would like would reduce it from 4 to 3.) I’m not very good at writing macros for the IDE. When I try to record a macro and perform all the actions (open a dialog box, change the setting, click OK), the only thing that is written is the following:

DTE.ExecuteCommand ("Tools.Options")

Is my goal unattainable?

+3
source share
2 answers

, MSDN

, :

Dim p = DTE.Properties("ProjectsAndSolutions","BuildAndRun")
p.Item("MaxNumParallelBuilds")
+3

VS2010. VB, :

Sub EditConcurrentBuilds()
    Dim p As EnvDTE.Properties = DTE.Properties("Environment", "ProjectsAndSolution")
    Dim item As EnvDTE.Property = p.Item("ConcurrentBuilds")
    Dim text As String = InputBox("Enter number of concurrent builds", "Concurrent Build Option")
    Dim v As Integer = Val(text)

    If (v > 0 And v < 5) Then
        item.Value = text
    End If
End Sub

4 - , .

+1

Source: https://habr.com/ru/post/1697886/


All Articles