Is it possoble to run 'Generate Local Resource

2019-02-17 23:09发布

问题:

Is it possible to run Visual Studio tool: 'Generate Local Resources' programmatically?

回答1:

From a macro in VS2010 you can do this:

Imports System
Imports EnvDTE
Imports EnvDTE80
Imports EnvDTE90
Imports EnvDTE90a
Imports EnvDTE100
Imports System.Diagnostics

Public Module Module1

    Public Sub test()
        DTE.ExecuteCommand("Tools.GenerateLocalResource")
    End Sub


End Module