Thks luisdem for the answer, and sorry for the delay on my answer. I get a different error message now,
TITLE: Microsoft SQL Server Management Studio
------------------------------
Class does not support aggregation (or class object is remote) (Exception from HRESULT: 0x80040110 (CLASS_E_NOAGGREGATION)) (mscorlib)
------------------------------
===================================
Class does not support aggregation (or class object is remote) (Exception from HRESULT: 0x80040110 (CLASS_E_NOAGGREGATION)) (mscorlib)
------------------------------
Program Location:
at Microsoft.SqlServer.Management.UI.VSIntegration.ISqlToolsVSHlpFactory.CreateHierarchyWrapper(Guid& clsidInnerHier)
at Microsoft.SqlServer.Management.UI.VSIntegration.SqlWorkbenchHierarchy.CreateHierarchyWrapper(Type typeToWrap, ILocalRegistry localReg)
at Microsoft.SqlServer.Management.UI.VSIntegration.Editors.ScriptFactory.get_SqlVirtualProject()
at Microsoft.SqlServer.Management.UI.VSIntegration.Editors.VirtualProject.get_TheVirtualProject()
at Microsoft.SqlServer.Management.UI.VSIntegration.Editors.ScriptAndResultsEditorControl..ctor()
at Microsoft.SqlServer.Management.UI.VSIntegration.Editors.SqlScriptEditorControl..ctor(Boolean withEncoding, String moniker)
at Microsoft.SqlServer.Management.UI.VSIntegration.Editors.SqlScriptEditorControl.CreateInstance(Object serviceProvider, Boolean withEncoding, String moniker)
at Microsoft.SqlServer.Management.UI.VSIntegration.Editors.EditorFactorySql.CreateEditorInstance(IServiceProvider serviceProvider, Boolean storeActiveConnIfNeeded, String moniker)
at Microsoft.SqlServer.Management.UI.VSIntegration.Editors.EditorFactoryBase.Microsoft.VisualStudio.Shell.Interop.IVsEditorFactory.CreateEditorInstance(UInt32 createFlags, String moniker, String physicalView, IVsHierarchy hierarchy, UInt32 itemId, IntPtr existingDocData, IntPtr& docViewIntPtr, IntPtr& docDataIntPtr, String& caption, Guid& cmdUIGuid, Int32& result)
at System.Runtime.InteropServices.Marshal.ThrowExceptionForHRInternal(Int32 errorCode, IntPtr errorInfo)
at Microsoft.SqlServer.Management.UI.VSIntegration.Editors.ScriptFactory.CreateNewScript(String strFullPathToScript, IVsProject projectToAddScriptTo, UIConnectionGroupInfo connectionInfoList, IDbConnection liveCon, String rootName)
at Microsoft.SqlServer.Management.UI.VSIntegration.Editors.ScriptFactory.CreateNewScript(String strFullPathToScript, IVsExternalFilesManager extFileMgr, UIConnectionGroupInfo connectionInfoList, IDbConnection liveCon, String rootName)
at Microsoft.SqlServer.Management.UI.VSIntegration.Editors.ScriptFactory.CreateNewScript(String strFullPathToScript, UIConnectionGroupInfo connectionInfoList, IDbConnection liveCon, String fileRoot)
at Microsoft.SqlServer.Management.UI.VSIntegration.Editors.ScriptFactory.CreateNewScript(String strFullPathToScript, UIConnectionInfo ci, IDbConnection liveCon)
at Microsoft.SqlServer.Management.UI.VSIntegration.ObjectExplorer.LaunchFormHost.CreateScriptWindow(String text, String scriptType, String dbName)
at Microsoft.SqlServer.Management.UI.VSIntegration.ObjectExplorer.LaunchFormHost.Microsoft.SqlServer.Management.SqlMgmt.ILaunchFormHost3.ScriptToNewDatabaseWindowAndExecute(String text, String scriptType, String dbName)
at Microsoft.SqlServer.Management.UI.VSIntegration.ObjectExplorer.OpenTableHelperClass.SelectTopNRows(NodeContext parentContext, Int32 topNValue)
at Microsoft.SqlServer.Management.UI.VSIntegration.ObjectExplorer.SelectTopNRows.Invoke()
at Microsoft.SqlServer.Management.UI.VSIntegration.ObjectExplorer.ToolsMenuItemBase.MenuInvokedHandler(Object sender, EventArgs args)