1

Closed

No element is selected in the solution explorer

description

I have completed the installation on three different systems Win7, Windows server 2008 Windows server 2008 R2. The error occurs everytime you build a new project with the SharePoint Software Factory. More specifically it occurs everytime the tool adds an artifact to the project is there a reason you open the artifacts as a way of adding them to the project. It takes thiry or more clicks per artiact that is added.. So not fun... Please let me know if there is any way I can be service in getting this issue resolved
 
Issue
(*) Error: 0 : System.InvalidOperationException: No element is selected in the solution explorer.
at Microsoft.Practices.RecipeFramework.VisualStudio.Library.DteHelper.GetTarget(_DTE vs)
at Microsoft.Practices.RecipeFramework.VisualStudio.AssetMenuCommand.GetTarget()
at Microsoft.Practices.RecipeFramework.VisualStudio.RecipeMenuCommand.OnQueryStatus()
at Microsoft.Practices.RecipeFramework.VisualStudio.AssetMenuCommand.OnBeforeQueryStatus(Object sender, EventArgs eventArgs)
 
Environment
Visual Studio 2008 SP1 as Installed
Microsoft Visual Studio 2008
Version 9.0.30729.4462 QFE
Microsoft .NET Framework
Version 3.5 SP1
 
Installed Edition: Enterprise
Microsoft Visual Basic 2008
Microsoft Visual C# 2008
Microsoft Visual C++ 2008
Microsoft Visual Studio 2008 Team Explorer Version 9.0.30729.1
Microsoft Visual Studio 2008 Tools for Office
Microsoft Visual Studio Team System 2008 Architecture Edition
Microsoft Visual Studio Team System 2008 Database Edition
Microsoft Visual Studio Team System 2008 Development Edition
Microsoft Visual Studio Team System 2008 Test Edition
Microsoft Visual Web Developer 2008
 
SQL Server Analysis Services Microsoft SQL Server Analysis Services Designer Version 10.50.1600.1
SQL Server Integration Services Microsoft SQL Server Integration Services Designer Version 10.50.1600.1
SQL Server Reporting Services Microsoft SQL Server Reporting Services Designers Version 10.50.1600.1
 
CodeRush for Visual Studio 10.1
Crystal Reports Basic for Visual Studio 2008
Extensions for SharePoint Svcs 1.3
Visual Studio 2008 extensions for Windows SharePoint Services 3.0 (version 1.3)
JetBrains ReSharper 5 Full Edition build 5.0.1659.36 on 2010-04-13T03:19:06
Microsoft Recipe Framework Package 8.0
Microsoft StyleCop 4.3
Refactor! for Visual Studio 10.1
Refactor! for Visual Studio
Telerik WebUI VSExtensions 2010.02.826.0 Telerik RadControls for ASP.NET AJAX VSExtensions Package
Telerik WinForms VSExtensions 2010.02.914.0 Telerik RadControls for WinForms VSExtensions Package
.NET Reflector Visual Studio add-in that integrates .NET Reflector into Visual Studio
ANTS Memory Profiler 5 Add-in
ANTS Profiler 5 Add-in
Application Styling Configuration Dialog
SPVisualDev
WSPBuilder
SPALM.SharePointSoftwareFactory.3.1.SetupHelper,
GuidanceAutomationExtensions,
gaxp1409.exe
 
Microsoft Visual Studio Team System 2008 Team Suite - ENU Service Pack 1 (KB947888) KB947888
Microsoft Visual Studio Team System 2008 Team Suite - ENU Service Pack 1 (KB948484) KB948484
Microsoft Visual Studio Team System 2008 Team Suite - ENU Service Pack 1 (KB948560) KB948560
Microsoft Visual Studio 2008 Team Explorer - ENU Service Pack 1 (KB945140) KB945140
Security Update for Microsoft Visual Studio Team System 2008 Team Suite - ENU (KB972222) KB972222
Security Update for Microsoft Visual Studio Team System 2008 Team Suite - ENU (KB973675) KB973675
Update for Microsoft Visual Studio Team System 2008 Team Suite - ENU (KB956453) KB956453
Update for Microsoft Visual Studio Team System 2008 Team Suite - ENU (KB967143) KB967143
Update for Microsoft Visual Studio Team System 2008 Team Suite - ENU (KB972221) KB972221
Update for Microsoft Visual Studio Team System 2008 Team Suite - ENU (KB974558) KB974558
Hotfix for Microsoft Visual Studio 2008 Shell (integrated mode) - ENU (KB945282) KB945282
Hotfix for Microsoft Visual Studio 2008 Shell (integrated mode) - ENU (KB946040) KB946040
Hotfix for Microsoft Visual Studio 2008 Shell (integrated mode) - ENU (KB946308) KB946308
Hotfix for Microsoft Visual Studio 2008 Shell (integrated mode) - ENU (KB946344) KB946344
Hotfix for Microsoft Visual Studio 2008 Shell (integrated mode) - ENU (KB946581) KB946581
Hotfix for Microsoft Visual Studio 2008 Shell (integrated mode) - ENU (KB947173) KB947173
Hotfix for Microsoft Visual Studio 2008 Shell (integrated mode) - ENU (KB947540) KB947540
Hotfix for Microsoft Visual Studio 2008 Shell (integrated mode) - ENU (KB947789) KB947789
Hotfix for Microsoft Visual Studio 2008 Team Explorer - ENU (KB946260) KB946260
Hotfix for Microsoft Visual Studio 2008 Team Explorer - ENU (KB946458) KB946458
Hotfix for Microsoft Visual Studio 2008 Team Explorer - ENU (KB947171) KB947171
Hotfix for Microsoft Visual Studio 2008 Team Explorer - ENU (KB947180) KB947180
Hotfix for Microsoft Visual Studio 2008 Team Explorer - ENU (KB948816) KB948816
Hotfix for Microsoft Visual Studio Team System 2008 Team Suite - ENU (KB944899) KB944899
Hotfix for Microsoft Visual Studio Team System 2008 Team Suite - ENU (KB946673) KB946673
Hotfix for Microsoft Visual Studio Team System 2008 Team Suite - ENU (KB948127) KB948127
Hotfix for Microsoft Visual Studio Team System 2008 Team Suite - ENU (KB953256) KB953256
Hotfix for Microsoft Visual Studio Team System 2008 Team Suite - ENU (KB971091) KB971091
Hotfix for Microsoft Visual Studio Team System 2008 Team Suite - ENU (KB971092) KB971092
Hotfix for Microsoft Visual Studio Team System 2008 Team Suite - ENU (KB973674) KB973674
 
 
Cheers,
 
 
-Ivan

file attachments

Closed Feb 28, 2013 at 2:44 PM by matein78
Issue is due to a bug in the GAX Recipe Framework and occurs when an item is selected in the source Control view, while creating a Project.

Resolution. Close source Control.
Seems to be fixed in OpenGAX for VS2012

comments

torman119 wrote Mar 20, 2011 at 8:36 AM

We had this issue in the past (see http://spsf.codeplex.com/workitem/3979).
Others are have the same error message with GAX and a VS add-in (see http://smartclient.codeplex.com/discussions/12546?ProjectName=smartclient).

Did you have the same problems with a previous release of SPSF too?

matein78 wrote Mar 22, 2011 at 10:39 AM

Hi Ivan,
I have tried to reproduce the error on a machine with VS2008 SP1 on a W2K8R2 Server but everything is working fine.
As mentioned by Torsten, the bug is known by several Software Factories based on GAX in conjunction with a Visual Studio Addin/Extension.

Unfortunately I don't have access to each of the addins you have installed (thanks for the detailed list BTW) but at least I can narrow it down

I have also installed all hotfixes currently available (didn't check everyone though :-( ) so I am pretty sure that it isn't related to these.
Other candidates I can exclude as a cause for the error
  • ReSharper
  • StyleCop
  • Team Explorer (though there is a problem when you create a new project with SPSF while the Source Control Explorer is open)
  • SQL Server Analysis Services
  • SQL Server Integration Services
  • SQL Server Reporting Services
  • Extensions for SharePoint Svcs 1.3
  • .NET Reflector
  • WSP Builder
So it comes down to:
  • Refactor! for VS
  • Microsoft Recipe Framework Package 8.0
  • Telerik WebUI VSExtensions (I have these on VS2010 though and they don't affect SPSF there)
  • Telerik WinForms VSExtensions (I have these on VS2010 though and they don't affect SPSF there)
  • ANTS Memory Profiler 5 Add-in
  • ANTS Profiler 5 Add-in
  • Application Styling Configuration Dialog
  • SPVisualDev
Could you also attach a failing sample project, to see if the project is already spoiled on creation or if the error only happens on your machine.

Regards
Matt

jimitndiaye wrote Mar 24, 2011 at 2:49 PM

It happens intermittently. One solution I've found is to delete your solution's gpstate file then reopen it and re-enable the SPSF guidance package.

iasanders wrote Mar 24, 2011 at 7:24 PM

No, the previous release wasnt an issue, the problem only occured when installing both VS2008 and VS2010 on the same system that had not been installed previously. The issue I was testing for was the the ability to not have SPSF installed on all team members development systems. I will have an opportunity to test again this weekend again, I will follow up and let you know what I find...

FYI I can reproduce this issue and have it happening now on 2 VMs only happens with VS2008. I like the VS2010 integration anyway and it isnt necessary for VS2008...


-Ivan

matein78 wrote Apr 7, 2011 at 1:11 PM

Hi Ivan,

did you get any further with your testing?

BTW, SPSF projects are fully self preserved, so you can always develop and build an SPSF project without having SPSF installed.
SharePoint 2010 projects also can be developed with both, SPSF and standard VS2010 Item Templates.

To get rid of all SPSF parts of an existing project (if you ever want to ;-) ) you just
  1. delete the "ApplicationConfiguration" solution folder with files
  2. delete the Application Deployment project
  3. edit the csproj file and remove the include for the "SharePointTargets.targets" file at the very end (2 lines, one for local one for team build)
After that SharePoint Hive projects can still be packaged with tools like WSPBuilder.
VS2010 projects work as ordinary SharePoint projects as if you have never used SPSF :-)

Of course this works also the other way, just open the existing SharePoint project, activate SPSF in Guidance Package Manager and execute the recipe "Migrate solution to current SPSF"

Best Regards

Matt

ACrush wrote Sep 26, 2011 at 2:24 PM

I'm having this too when opening previously created solution on the very same machine.

System.InvalidOperationException: No element is selected in the solution explorer.
at Microsoft.Practices.RecipeFramework.VisualStudio.Library.DteHelper.GetTarget(_DTE vs)
at Microsoft.Practices.RecipeFramework.VisualStudio.AssetMenuCommand.GetTarget()
at Microsoft.Practices.RecipeFramework.VisualStudio.RecipeMenuCommand.OnQueryStatus()
at Microsoft.Practices.RecipeFramework.VisualStudio.AssetMenuCommand.OnBeforeQueryStatus(Object sender, EventArgs eventArgs)

Sample attached.