Red Gate forums :: View topic - Incorrect addin instruction for VS2008
Return to www.red-gate.com RSS Feed Available

Search  | Usergroups |  Profile |  Messages |  Log in  Register 
Go to product documentation
PInvoke.Net
PInvoke.Net forum

Incorrect addin instruction for VS2008

Search in PInvoke.Net forum
Post new topic   Reply to topic
Jump to:  
Author Message
aram



Joined: 05 Feb 2008
Posts: 1

PostPosted: Tue Feb 05, 2008 9:40 am    Post subject: Incorrect addin instruction for VS2008 Reply with quote

Hello Everyone,
I think there is a mistyped line in the instruction mentioned at
http://www.red-gate.com/support/kb/KB200711000198.htm
Note that visual studio Add-in file is an standard xml-based file which needs to have all tags correctly opened and closed.
Where it says in the instructions:
After the text:(part1)
---------------------------------------------
<HostApplication>
<Name>Microsoft Visual Studio Macros</Name>
<Version>8.0</Version>
</HostApplication>
<HostApplication>
<Name>Microsoft Visual Studio</Name>
<Version>8.0</Version>
</HostApplication>
<HostApplication> this is incorrect.
----------------------------------------------
Add:(part2)
----------------------------------------------
<HostApplication>
<Name>Microsoft Visual Studio Macros</Name>
<Version>9.0</Version>
</HostApplication>
<HostApplication>
<Name>Microsoft Visual Studio</Name>
<Version>9.0</Version>
</HostApplication>
<HostApplication> this is also incorrect.
and save the file.

---------------------------------------

if you add 'part 2' to the end of 'part 1' you will definitely get an error from VS2008 and your addin will never work.
Please if moderators could fix this in the mentioned link.

Thank you again for your products.

Best Regards,
Aram Azhari
Back to top
View user's profile Send private message
Brian Donahue



Joined: 23 Aug 2004
Posts: 6670

PostPosted: Tue Feb 05, 2008 11:10 am    Post subject: Reply with quote

Hi Aram,

Thanks for pointing that out. Looks like I overshot the copy part of the copy-and-paste. Smile
Back to top
View user's profile Send private message
BillyT63



Joined: 29 May 2008
Posts: 2

PostPosted: Thu May 29, 2008 8:23 pm    Post subject: Reply with quote

My PInvokeDotNetAddIn.AddIn file looks as follows:

<?xml version="1.0" encoding="UTF-16" standalone="no"?>
<Extensibility xmlns="http://schemas.microsoft.com/AutomationExtensibility">
<HostApplication>
<Name>Microsoft Visual Studio Macros</Name>
<Version>8.0</Version>
</HostApplication>
<HostApplication>
<Name>Microsoft Visual Studio</Name>
<Version>8.0</Version>
</HostApplication>
<HostApplication>
<Name>Microsoft Visual Studio Macros</Name>
<Version>9.0</Version>
</HostApplication>
<HostApplication>
<Name>Microsoft Visual Studio</Name>
<Version>9.0</Version>
</HostApplication>
<Addin>
<FriendlyName>pInvoke.net Add-In</FriendlyName>
<Description>Red Gate pInvoke.net Visual Studio 2005 Add-In. Communicates with www.pinvoke.net</Description>
<Assembly>PInvokeDotNetAddIn2005.dll</Assembly>
<FullClassName>PInvokeDotNetAddIn.Connect</FullClassName>
<LoadBehavior>1</LoadBehavior>
<CommandPreload>1</CommandPreload>
<CommandLineSafe>0</CommandLineSafe>
</Addin>
</Extensibility>

Yet, I receive the following error upon invoking Visual Studio .NET 2008:

PInvoke.Net
There was a problem trying to launch the PInvoke.net Visual Studio add-in:
Object reference not set to an instance of an object.
For more details, please see the event log.

This loads perfectly in Visual Studio .NET 2005 using the same add-in XML file. So, what do I have wrong for loading the add-in in VS .NET 2008????

Best Regards,
Bill Tello
billyt63@gmail.com
Back to top
View user's profile Send private message
Brian Donahue



Joined: 23 Aug 2004
Posts: 6670

PostPosted: Fri May 30, 2008 9:21 am    Post subject: Reply with quote

Hi Billy,

The configuration of the add-in is correct, otherwise the PInvoke add-in would not load. In order to get an error from the add-in like this, it must be loading, so that part is okay. It is just that the add-in itself is having a problem. Is there anything in the system or application event log that includes a stack trace?
Back to top
View user's profile Send private message
BillyT63



Joined: 29 May 2008
Posts: 2

PostPosted: Fri May 30, 2008 9:51 pm    Post subject: Reply with quote

Hello Brian:

Yes, there are two application errors regarding Pinvoke.net which are posted within my event manager.

The first is when I try to load Microsoft Visual Studio .NET 2008 application with the PInvoke.net add-in loaded and marked to load upon VS start-up, I get the following error:

There was an exception trying to launch the PInvoke.net Visual Studio add-in:
Object reference not set to an instance of an object.

at Microsoft.PowerCommands.Commands.ShowAllFilesCommand.CanExecute(OleMenuCommand command)
at Microsoft.PowerCommands.Commands.DynamicCommand.OnBeforeQueryStatus(Object sender, EventArgs e)
at Microsoft.VisualStudio.Shell.OleMenuCommand.get_OleStatus()
at Microsoft.VisualStudio.Shell.OleMenuCommandService.Microsoft.VisualStudio.OLE.Interop.IOleCommandTarget.QueryStatus(Guid& guidGroup, UInt32 nCmdId, OLECMD[] oleCmd, IntPtr oleText)
at Microsoft.VisualStudio.Shell.Package.Microsoft.VisualStudio.OLE.Interop.IOleCommandTarget.QueryStatus(Guid& guidGroup, UInt32 nCmdId, OLECMD[] oleCmd, IntPtr oleText)
at EnvDTE.Commands.AddCommandBar(String Name, vsCommandBarType Type, Object CommandBarParent, Int32 Position)
at PInvokeDotNetAddIn.Connect.OnConnection(Object application, ext_ConnectMode connectMode, Object addInInst, Array& custom)

For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp.

The second error occurs when I go into the Microsoft Visual Studio .NET 2008 application without the add-in loaded and marked to start-up automatically. In this scenario, I then go into the add-in manager and mark the add-in to load and start-up automatically and I receive the following error:

There was an exception trying to launch the PInvoke.net Visual Studio add-in:
Error HRESULT E_FAIL has been returned from a call to a COM component.

at EnvDTE.Commands.AddCommandBar(String Name, vsCommandBarType Type, Object CommandBarParent, Int32 Position)
at PInvokeDotNetAddIn.Connect.OnConnection(Object application, ext_ConnectMode connectMode, Object addInInst, Array& custom)

For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp.


I appreciate your help with this problem.

Best Regards,
Bill Tello
billyt63@gmail.com
Back to top
View user's profile Send private message
Brian Donahue



Joined: 23 Aug 2004
Posts: 6670

PostPosted: Mon Jun 02, 2008 6:58 pm    Post subject: Reply with quote

Hi Billy,

It would be a piece of cake if we knew which COM component was at fault. Sometimes an error message of this type will mention the CLSID of the offending component. If I had to hazard a guess, though, I'd have a go at the DTE components. From a command prompt, can you try this:
Code:
cd %commonprogramfiles%\microsoft shared\MSEnv
regsvr32 dte80.olb
regsvr32 dte.olb
regsvr32 dte80a.olb
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic All times are GMT + 1 Hour
Page 1 of 1

 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group