Programmatically setting Application Root Directory of a COM+ Application
When dev开发者_如何学运维eloping a COM+ application, I have to uninstall and reinstall it each time I make changes to the code that I want to test.
It is becoming extremely tedious having to manually set the "Application Root Directory" in the Activation tab every time I install the COM+ app, and so I was wondering if there was a way to programmatically set this attribute?
You'll want RegistrationHelper.InstallAssemblyFromConfig().
For those who stumble upon this article (like I did) and are looking for a way to do it using the COMAdmin.COMAdminCatalog library. You need can set the Application Root Directory setting using the ApplicationDirectory property.
For details see: https://msdn.microsoft.com/en-us/library/windows/desktop/ms686107(v=vs.85).aspx#applicationdirectory
精彩评论