Invalid class string (Exception from HRESULT: 0x800401F3 (CO_E_CLASSSTRING))

1

This was a Visual Studio 2010 application converted to Visual Studio 2013.

The code is Working fine on Local Machine.

The same code is giving error on Server where Visual Studio 2013 is installed:

Invalid class string (Exception from HRESULT: 0x800401F3 (CO_E_CLASSSTRING))

asp.net
visual-studio
asked on Stack Overflow Sep 1, 2016 by MindcraftDeveloper • edited Sep 1, 2016 by Huy Nguyen

2 Answers

0

There is an error in loading some specific plugin, whether the plugin required some settings in your config file or not. Check windows event log.

Try to run the following command from a DOS prompt:

marshal.exe /RegServer

You need to have machine-administrator privileges to run this command-line.

answered on Stack Overflow Sep 1, 2016 by Waleed Manzoor
0

It is most likely that in the original application you had a line that looked like this :

EnvDTE80.DTE2 dte2 = (EnvDTE80.DTE2)System.Runtime.InteropServices.Marshal.
    GetActiveObject("VisualStudio.DTE.10.0");

This line would have given you the DTE (or DTE2) object representing your visual studio IDE, but the use of

"VisualStudio.DTE.10.0"

gets only the instance of VS2010 and what you need is actually the 2013 version which will be:

"VisualStudio.DTE.12.0"

You can learn more here: How to: Get References to the DTE and DTE2 Objects

answered on Stack Overflow Jul 14, 2017 by Ravid Goldenberg

User contributions licensed under CC BY-SA 3.0