|
#1
|
|||
|
|||
|
VB.NET IDE Add-in problems
I have managed to get a basic C# add-in to compile and work; given to
horrible installation process in to ToDo section. Has anyone got a wizard-generated add-in using VB to work? All I get when I try to start one is; ---------------------------------------------------------------------------- The Add-in 'KD Test Add-in VB 1' failed to load or caused an exception. Would you like to remove this Add-in? (HRESULT value: 80040154) ---------------------------------------------------------------------------- Regards, Kevin Downs |
|
#2
|
|||
|
|||
|
Re: VB.NET IDE Add-in problems
You need to follow the same process as for a C# wizard. The wizrd creation
process still needs some work. The addin implements a classic COM interface and needs to be registered correctly. The addin needs to be located in a place the runtime can find it, the easiest is to copy it into %Windir%\Microsoft.Net\Framework\v* and then run tlbexp/regasm on it. Here are some other hints and tips: Debugging an addin is not working correctly in the beta, the debugger is not stopping at breakpoints. If you attach the debugger to a second IDE that is running the addin, the debugger will stop at stop statements in VB code. The fastest way to develop/debug is to disable the deployment project from being built, until you want to build a setup. You should not need the setup on your dev machine if you do the copy and regasm thing. You can disable building the deployment project from the properties page for the <b>Solution</b>. The events in the managed wrapper are muddled. If you follow the _DTE.Events.XXX property and then look at the type returned, that does not expose the actual events. However there is an interface with a similar name with the _ added or removed (I can't verify which at the moment as I don't have a build on this machine at the moment) but you can cast from the value returned by the property off _DTE.Events.XXX to the interface with the events (using ctype) then it works. Hope that helps, Sam "Kevin Downs" <kdowns@nospam.optushome.com.au> wrote in message news:3a21b6df$1@news.devx.com... > I have managed to get a basic C# add-in to compile and work; given to > horrible installation process in to ToDo section. > > Has anyone got a wizard-generated add-in using VB to work? > All I get when I try to start one is; > > -------------------------------------------------------------------------- -- > The Add-in 'KD Test Add-in VB 1' failed to load or caused an exception. > Would you like to remove this Add-in? > > (HRESULT value: 80040154) > -------------------------------------------------------------------------- -- > > Regards, > > Kevin Downs > > |
|
#3
|
|||
|
|||
|
Re: VB.NET IDE Add-in problems
Many thanks Sam.
inline comments follow. regards, Kevin "Sam Spencer" <samsp@microsoft.com> wrote in message news:3a234cdd$1@news.devx.com... > You need to follow the same process as for a C# wizard. The wizrd creation > process still needs some work. The addin implements a classic COM interface > and needs to be registered correctly. The addin needs to be located in a > place the runtime can find it, the easiest is to copy it into > %Windir%\Microsoft.Net\Framework\v* and then run tlbexp/regasm on it. > I *really* hope you are going to streamline this.... > > Here are some other hints and tips: > Debugging an addin is not working correctly in the beta, the debugger is not > stopping at breakpoints. If you attach the debugger to a second IDE that is > running the addin, the debugger will stop at stop statements in VB code. > sanity saving tip #1 > The fastest way to develop/debug is to disable the deployment project from > being built, until you want to build a setup. You should not need the setup > on your dev machine if you do the copy and regasm thing. You can disable > building the deployment project from the properties page for the > <b>Solution</b>. period of confusion followed... Then I realised you meant the properties page that appears when you select properties from the context (right-click) menu - not the dockable properties page below the solution explorer.... > > The events in the managed wrapper are muddled. Understatement of the year. Ah, wait, that prize already went to "some changes may be required to port a vb6 project to vb.net" <g> (sorry, couldn't resist) > If you follow the > _DTE.Events.XXX property and then look at the type returned, that does not > expose the actual events. However there is an interface with a similar name > with the _ added or removed (I can't verify which at the moment as I don't > have a build on this machine at the moment) but you can cast from the value > returned by the property off _DTE.Events.XXX to the interface with the > events (using ctype) then it works. Yuuuuuuuuuuuuuuuk! Please, please, please, someone tell me that this will not be in the release version (pretty please?) > > Hope that helps, > It sure does. Again, many thanks Sam - you have probably just saved many hours of frustration, if not my sanity! |
|
#4
|
|||
|
|||
|
Re: VB.NET IDE Add-in problems
Sam,
Thank you for the information. For building, I have the result of the build go directly to COREPATH. I only needed to RegAsm once. I found another way to debug. Add System.Diagnostic.Debugger.Break() to the beginning of OnConnection. This allows you to break in immediately. Hopefully this will be fixed soon. I have had some limited success hooking events. The form is as follows: object.Event += new EventHandler(MyHandler); //the event does not show in intellisense void MyHandler(object sender, EventArgs e) { } I am also looking for details on the Winform events, methods and properties. Steve Binney "Sam Spencer" <samsp@microsoft.com> wrote in message news:3a234cdd$1@news.devx.com... > You need to follow the same process as for a C# wizard. The wizrd creation > process still needs some work. The addin implements a classic COM interface > and needs to be registered correctly. The addin needs to be located in a > place the runtime can find it, the easiest is to copy it into > %Windir%\Microsoft.Net\Framework\v* and then run tlbexp/regasm on it. > > Here are some other hints and tips: > Debugging an addin is not working correctly in the beta, the debugger is not > stopping at breakpoints. If you attach the debugger to a second IDE that is > running the addin, the debugger will stop at stop statements in VB code. > > The fastest way to develop/debug is to disable the deployment project from > being built, until you want to build a setup. You should not need the setup > on your dev machine if you do the copy and regasm thing. You can disable > building the deployment project from the properties page for the > <b>Solution</b>. > > The events in the managed wrapper are muddled. If you follow the > _DTE.Events.XXX property and then look at the type returned, that does not > expose the actual events. However there is an interface with a similar name > with the _ added or removed (I can't verify which at the moment as I don't > have a build on this machine at the moment) but you can cast from the value > returned by the property off _DTE.Events.XXX to the interface with the > events (using ctype) then it works. > > Hope that helps, > > Sam > > "Kevin Downs" <kdowns@nospam.optushome.com.au> wrote in message > news:3a21b6df$1@news.devx.com... > > I have managed to get a basic C# add-in to compile and work; given to > > horrible installation process in to ToDo section. > > > > Has anyone got a wizard-generated add-in using VB to work? > > All I get when I try to start one is; > > > > -------------------------------------------------------------------------- > -- > > The Add-in 'KD Test Add-in VB 1' failed to load or caused an exception. > > Would you like to remove this Add-in? > > > > (HRESULT value: 80040154) > > -------------------------------------------------------------------------- > -- > > > > Regards, > > > > Kevin Downs > > > > > > |
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|