• Post Calendar

    October 2010
    S M T W T F S
    « Sep   Nov »
     12
    3456789
    10111213141516
    17181920212223
    24252627282930
    31  

Getting Silverlight 4 Business Application to Run on TFS Build Server

Headline: There is a folder that does not display by default in a Silverlight Business Application project called Generated_Code. That has to be added to the project and checked into the solution in order for your Silverlight application to run on your TFS Build Server.

I was trying to get my Silverlight 4 test application to build on a TFS (Team Foundation Server) environment. I installed Silverlight 4, and WCF RIA Services for Visual Studio 2010 (locally and on the build machine). This gives me access to the Silverlight Business Application template. I created a project from that template and ran into numerous issues. Here were the last ones I encountered to get my TFS build to work.

Yes, there are some other issues that are documented other places such as the fact that you have to run the build as x86 on the server:

image

But even after that I kept getting the message: Views\Login\RegistrationForm.xaml.cs (22): The type or namespace name ‘UserRegistrationContext’ could not be found (are you missing a using directive or an assembly reference?)

and: Views\Login\RegistrationForm.xaml.cs (133): The type or namespace name ‘CreateUserStatus’ could not be found (are you missing a using directive or an assembly reference?)

What am I doing wrong?

After lots of steps I finally discovered there is a folder called Generated_Code in the Silverlight project (not the .Web project). I turned on the “Show all Files” and then selected that entire folder and Included it in the project. After that it looked like this (with yellow plus signs instead of the little blue locks you see below):

image

I checked that in and the build finally worked.

image

I hope this saves someone the almost 2 hours this cost me…

1 Comment  »

RSS feed for comments on this post, TrackBack URI

Leave a Comment