Pergunta

In Visual Studio 2012, I found it is possible to use DocumentSaved events from DocumentEventsClass. So I have written the following code in PowerShell.

$DTE.Events.DocumentEvents($DTE.ActiveDocument)

However, the COMObject returned is incorrect, (000... GUID). What am I doing wrong?

Foi útil?

Solução

To execute an action on Save, we found that the easy solution was to set a custom tool on the file. The same way RESX files work.

Basically, we added

MSBuild:CustomTarget

And this target will be called every time you save.

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top