Smart Client Development - problem whit context menu in Solution Explorer VS2005

Topics: CAB & Smart Client Software Factory
Sep 6, 2007 at 9:40 PM
One month ago I create new project Smart Client Softwer Factory v. 1.0.
I dont`t know when, but something has corrupted and now I can`t use menu items related with Smart Client Development (example: Add View (with presenter)) in context men in Solution Explorer because this menu items disappear (I have turn on Guidance Package Smart Client Development) - when I want expand menu in some folder in Solution Explorer I get this message:

"
Microsoft.Practices.RecipeFramework.RecipeExecutionException: An exception
occurred during the binding of reference or execution of recipe CreateView.
Error was: Function IsEnabledFor is not correctly implemented because it
threw an exception.
You can remove the reference to this recipe through the Guidance Package
Manager. ---> System.NullReferenceException: Object reference not set to an
instance of an object.
at
Microsoft.Practices.GuidanceAutomation.SmartClient.References.ViewTemplateReference.ContainsRequiredReferences(Project
project) in
c:\Dev\scbat\GuidanceAutomation\SmartClientDevelopment\References\ViewTemplateReference.cs:line
51
at
Microsoft.Practices.GuidanceAutomation.SmartClient.References.ViewTemplateReference.IsEnabledFor(Object
target) in
c:\Dev\scbat\GuidanceAutomation\SmartClientDevelopment\References\ViewTemplateReference.cs:line
35
at
Microsoft.Practices.RecipeFramework.Services.AssetReferenceService.IsAssetEnabledFor(String
asset, Object target)
--- End of inner exception stack trace ---
at
Microsoft.Practices.RecipeFramework.Services.AssetReferenceService.IsAssetEnabledFor(String
asset, Object target)
at
Microsoft.Practices.RecipeFramework.VisualStudio.RecipeMenuCommand.OnQueryStatus()
at
Microsoft.Practices.RecipeFramework.VisualStudio.AssetMenuCommand.OnBeforeQueryStatus(Object
sender, EventArgs eventArgs)
"

I haven`t path "c:\Dev" in my computer!!! When I created new SCSF project all things are good. What shell I do to repair my old project?
Sep 7, 2007 at 7:19 PM
Hi!

It seems that in the past you register a custom package and it's not available in your box so far. Maybe, registering again your Guidance Package does the trick. If not please let me know, because the stack trace of the exception is showing an error in the ContainsRequiredReferences method of the ViewTemplateReference class.

BTW - I recommend you to install the latest SCSF version (May 2007, download here

For SC-SF upgrade, please read the following post: Enable Smart Client Software Factory 2006 Solutions to use SCSF 2007

Hope it helps!

Sebastian Iacomuzzi
http://staff.southworks.net/blogs/siacomuzzi
Sep 7, 2007 at 8:12 PM
Hi!

I have enable Smart Client Development in Guidance Package Manager.
How can I again register my Guidance Package? Are you suggest that I shall rebuild Guidance Package?

I dont`t know if it helps because: "When I created new SCSF project all things are good.", so I think that the problem is in my project.

I check this way in two days (Monday) because I don`t have this project in my home.

Regards.