Print Page | Close Window

Silverlight template - no Shared Code

Printed From: IdeaBlade
Category: DevForce
Forum Name: DevForce 2012
Forum Discription: For .NET 4.5
URL: http://www.ideablade.com/forum/forum_posts.asp?TID=3714
Printed Date: 25-Oct-2025 at 11:12pm


Topic: Silverlight template - no Shared Code
Posted By: zbig
Subject: Silverlight template - no Shared Code
Date Posted: 13-Oct-2012 at 2:27pm
Hi All,
 
Windows 8 (all updates installed), VS 2012 Premium (all updates installed, Silverlight Toolkit installed), no previous version of DevForce installed (relatively new, clean Windows 8 test environment).
 
After installing DevForce 2012 Silverlight template, and after installing Northwind model (localdb), there is no linked file under Shared Code folder (client side) as decribed here: http://drc.ideablade.com/devforce-2012/bin/view/Documentation/tour-devforce-silverlight-part1 - http://drc.ideablade.com/devforce-2012/bin/view/Documentation/tour-devforce-silverlight-part1  .
 
Is there any workaround (to let me continue education)?
 
Zbig
 
 



Replies:
Posted By: kimj
Date Posted: 13-Oct-2012 at 3:35pm
Make sure that after creating the model you "enable" DevForce:  in the properties window for the model set the "DevForce Enabled" property to true.  When you save the model it will generate the DevForce code, in this case NorthwindIB.IB.Designer.cs.  It should also automatically add this file to the Silverlight project as a link.  If it didn't, you can manually add the file to the SL project, making sure to "add as link":
 
 


Posted By: zbig
Date Posted: 15-Oct-2012 at 12:35am
 There is no such property on the model ("DevForce Enabled").


Posted By: kimj
Date Posted: 15-Oct-2012 at 8:21am
In the Extension Manager, check that the DevForce 2012 EDM Extension is installed and enabled.  The extension is automatically installed when the DevForce 2012 Client NuGet package is installed.  If it wasn't installed, re-install the package.
 
Also check that the target framework of the web project in the solution is .NET 4.5, as this extension doesn't work with .NET 4.0 models.


Posted By: zbig
Date Posted: 16-Oct-2012 at 12:10am
DevForce 2012 EDM Designer Extension is installed.
Web project is targeted to .NET Framework 4.5.
(Windows 8 / VS 2012 Premium).
 


Posted By: kimj
Date Posted: 16-Oct-2012 at 8:23am
When the EDM extension is enabled for a model in a .NET 4.5 project, if you click the "Categorized" button in the properties window you'll then see a category named "DevForce Code Generation".  Set the "DevForce Enabled" flag here.
 
If you still don't see these properties, then open the "Extensions and Updates" item from the "Tools" menu in VS and check the extension.  More here - http://drc.ideablade.com/devforce-2012/bin/view/Documentation/edm-designer-extension - http://drc.ideablade.com/devforce-2012/bin/view/Documentation/edm-designer-extension .
 


Posted By: zbig
Date Posted: 16-Oct-2012 at 12:06pm
Great!
Now it works, shared code exists.

I didn't click on the model 'board' (no experience with Model First approach, only with Code First).

Thank you.



Print Page | Close Window