Breakpoint is not enabled for RIA Services Class Library - silverlight

I have a RIA Services Class Library in my Silverlight OOB solution. Breakpoints are not enabled in any code in this library when debugging the solution. The module is not listed in the Debug/Modules window. Is it possible to debug your Class library services while running the Silverlight OOB solution?
Using:
Silverlight 5 Beta
VS 2010 10.0.40219.1
.NET Framework 4.0
C#

Have you checked which Debuggers are enabled in the Project properties?

When I can't get in any other way, I insert this code:
System.Diagnostics.Debugger.Break();
in the service layer. And you will be able to open that in a new instance of Visual Studio to step through.

Related

Creating a TFS project from a silverlight application

I am developing a Silverlight application that displays a dashboard of builds from TFS and I just found out that I cant reference TFS libraries from Silverlight as they are built with different runtime. Whats the workaround? Is their a Silverlight clr version of TFS libraries I can reference?
Thanks
You might be able to accomplish this by using the TFS OData API available here: https://tfsodata.visualstudio.com/

Including WCF RIA Services to an existing Silverlight Project

I want to include WCF RIA services to an already existing Silverlight Pproject that was created with MS Expression Blend. Whenever I search the web for information about creating WCF RIA services I only find tutorials about creating a solution by creating a new project with Visual Studio 2010.
I know how to create a new Silverlight application with RIA services using Visual Studio 2010, but I can't find a tutorial on how to include a RIA service after creating a Silverlight project. Is it maybe not possible to do so?
Every bit of help is welcome. Thank you in advance and please excuse my bad english.
Open your Silverlight project configuration and add a "WCF RIA Services link".
See MSDN.

How to upgrade from WCF RIA Service 1.0 to SP2 - Silverlight and Entity Framework

Can anyone provide a step by step guide for upgrading a VS2010 solution from RIA Services 1.0 + Silverlight 4 to RIA Services 1.0 SP2 + Silverlight 5?
My solution is set up in the normal fashion:
MyApp.Web - ASP.NET Server project (entity framework here)
MyApp - Silverlight client project (RIA Services "connects" this with MyApp.Web)
Here is what I have so far:
Uninstall WCF RIA Services Toolkit and WCF RIA Services V1.0 for VS2010
Install VS2010 SP1
Install Entity Framework 4.1
Install Silverlight 5 Tools (contains RIA Services 1.0 SP2)
Here is where I am lost. What do I do next? In particular:
What project references do I need to remove/add from my client and server projects?
to go from Entity Framework 4.0 to 4.1
to go from RIA Services 1.0 to RIA Services 1.0 SP2
to go from Silverlight 4 to 5
Anything else I am missing?
What do I need to do on my production server (running Win XP) where my solution is deployed to?
I remember installing .NET Framework 4.0 and RIA Services distributable (awhile back)
Thanks in advanced.
1.1 When I start a new Project and add a ADO.NET Entity Data Model it automatically adds the following assemblies:
System.Data.Entity
System.Runtime.Serialization
System.Security
So I would remove them from the Project and add them again just to make sure using the highest version.
1.2 There can be only one version of Ria on your machine. So your project automatically uses the last installed version.
1.3 Go to the Properties page of your Silverlight Project and open the Tab 'Silverlight'. Change the version to Silverlight 5 under Target Silverlight Version: Important note: If you have a large project this will take very VERY long to complete. Make yourself some coffee and wait. The UI can become unresponsive when changing it, however don't touch it. Even when you loose your patience. If you do abort than there will probably remain some faults in your .csproject file.
First point 3: Install the Silverlight 5 Tools also on your server along with the Entity FrameWork 4.1 this way it won't matter if your forgetting to set Copy Local to True for a new Silverlight assembly. ( Which means you won't have to republish again if you forgot. )
Point 2: Make sure your project works with the new installed versions by checking/doing the following things:
- Remove the bin and obj folders in both projects.
- Remove the hidden GenerateCode folder in your Silverlight Project.
- Make sure your own referenced assemblies are also targeting Silverlight 5.
- After ReBuilding when doing all of this I would do something that looks odd but has proven to solve stupid errors: In the properties page of your Silverlight project disable the WCF Ria Services link by setting it to <No Project Set> Build your project (resulting in a lot of errors, I know) Switch the link back and rebuild. Remember that Ria supports Complex-Object Serialization since SP1 which they wanted to be there from the first version but couldn't finish it in time. This can give you a headache if you included assemblies to the silverlight client that includes object types also existent on the server side.
Good luck and if you get any troubles than just ask.

Visual Studio project type for DTOs that should be accessible in Silverlight

What VS project type should I choose so that the data-transfer-objects that I create in it can be accessible in both in my Silverlight project as well as my WCF service project.
(I want to be able to reuse the DTOs that I define in both projects instead of having VS generate a new set in my Silverlight project when I create a web-service reference to the WCF service).
IE, my question is can the project be a Windows class library, or should it be a Silverlight class library (so as to reference it in both my Silverlight project as well as the WCF project).
You've got three main options:
Create two class library projects (one targeting Silverlight, the other the .NET Framework), and share the files between them, as I discuss in this article: http://www.silverlightshow.net/items/Building-a-Silverlight-Line-Of-Business-Application-Part-3.aspx
Create your class library as a Silverlight class library. Silverlight applications can't reference class libraries that target the full .NET Framework, but applications targeting the full .NET Framework (such as you WCF Service) can (generally) reference class libraries that target the Silverlight runtime.
Try out the Portable Library Tools (currently in beta): http://blogs.msdn.com/b/sburke/archive/2011/01/23/3-screen-coding-is-here-portable-library-tools-allow-you-to-target-multiple-net-platforms-with-one-binary.aspx
Have you thought of using RIA Services (or WCF Data Services) instead of a plain WCF service? RIA Services / WCF Data Services handles this problem for you, and adds other great functionality into the mix.
Hope this helps...
Chris Anderson

Can Silverlight Out-of-Browser app call .NET DLLs?

This might be a stupid question (I'm new to Silverlight!), but if I develop a .NET DLL with methods, can my Silverlight Out-of-browser app call and use this DLL and its methods if it is provided in the IsolatedStorage area of my Silverlight OOB install? Or does all code have to be contained in the Silverlight package?
Thanks!
How to: Use Automation in Trusted Applications

Resources