Control compilation when integrating Visual Studio for Application (VSTA) in a C# application:.

Maurice 1 Reputation point
2021-03-15T09:05:21.52+00:00

Hello,

I integrated VSTA 2019 in my application and basically it works fine. But i was unable to find some, in my opinion key features:

1: I'm unable to determine when my user recompiled the code in the VSTA environment.
I receive the BinaryItemsChanged event (https://learn.microsoft.com/en-us/previous-versions/visualstudio/visual-studio-tools-for-applications/2015/dn921516(v=vs.140)), but this just tells me that the old binaries are no longer valid, I cannot find an event which says that new binaries are available. When should an application load the new assemblies from the VSTA environment?

2: I also added a macro recording feature, like in excel: when the performs some action, the application generates the appropriate C# and adds this to a method in the VSTA environment. However I was unable to find a way to stat the compilation process in the VSTA environment form the hosting application, so that the user can use the new macro with manually switching the the VSTA editor and compile the newly generated code. I would like to over the possibility that the user van record a macro and use it without even seeing the VSTA environment. It this possible?

Thanks in advance,
Maurice.

C#
C#
An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
10,238 questions
0 comments No comments
{count} votes