Hello everyone, I have a problem about addin develop as follows:
Problem:
My request:In my addin, I need add my own menu to website project , and the language should be C#/VB.
Method: I do this in QueryStaus function. If parameter [commandName] is my own menu, then get current select project is website, then get the project language. Like follows:
Array prjs = (System.Array)_applicationObject.ActiveSolutionProjects;
if (prjs.Length == 1 )
{
Project prj_selected = (Project)prjs.GetValue(0);
if (project.Object is VSWebSite)
{
VSWebSite objWebSite = (VSWebSite)project.Object;
Property webSiteLang = project.Properties.Item("CurrentWebsiteLanguage");
if (webSiteLang.Value.ToString().Equals("Visual C#") || webSiteLang.Value.ToString().Equals("Visual Basic"))
.....
}
}
This is work well except in VS2010/2012, there is error as follows:
System.Runtime.InteropServices.COMException (0x80029C4A): タイプ ライブラリ/DLL の読み込みエラーです。 (HRESULT からの例外: 0x80029C4A (TYPE_E_CANTLOADLIBRARY)) 場所 EnvDTE.Project.get_Properties()
NOTE:
OS:Win7
VS:there are VS2005/2008/2010/2012 installed
Any one can help me?