Derik Whittaker

Syndication

News


VS11, Silverlight and Ria Services Command line build issue (MSB4006)

I just upgraded my dev laptop to Vs11 and all was great with the world….. Until I ran my command line build script on my Silverlight project.  When my script failed with the following error I was perplexed because of course everything ran fine from INSIDE VS

  C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v11.0\WebApplications\Microsoft.WebApplication.targets(289,9): error
MSB4006: There is a circular dependency in the target dependency graph involving target "CopySilverlightApplications". [C:\
Development\Source\\Main\Website\Thunderbird\ThunderbirdServer\ThunderbirdServer.csproj]

At first I tried to diff the Microsoft.WebApplication.targets file to see what changed there but nothing looked out of place…hum.

Finally when chatting about this issue with a co-worker it dawned on me what my issue was.  Our silverlight project uses RIA Services and because of this there is technically a circular dependency between the web project and the client project. 

How? 

The client knows about the server because the RIA services end points are created inside the web project and post build the client side RIA endpoints are pushed into the Client project.

The server knows about the client because as a silverlight project we had the server setup to copy the .xap file into the ClientBin folder

How did I resolve this?

I removed the Silverlight copy dependency inside my server project as seen below

image

I added a post build event inside my Silverlight client project do xcopy the .xap into the correct ClientBin folder in the web project.

Once I made this change I was able to do the following

  1. Compile inside of VS with NO issues
  2. Compile via MSBuild on the command line
  3. F5 my application and run the silverlight client

Hope this helps someone else

Till next time,


Posted 03-20-2012 9:43 AM by Derik Whittaker

[Advertisement]

Comments

Community Blogs wrote Windows Dev News for March 21, 2012 - #0054
on 03-22-2012 2:45 AM

Windows Dev News for March 21, 2012 - #0054 [SC1230] In This Issue: Peter Kuhn , Michael Washington

About The CodeBetter.Com Blog Network
CodeBetter.Com FAQ

Our Mission

Advertisers should contact Brendan

Subscribe
Google Reader or Homepage

del.icio.us CodeBetter.com Latest Items
Add to My Yahoo!
Subscribe with Bloglines
Subscribe in NewsGator Online
Subscribe with myFeedster
Add to My AOL
Furl CodeBetter.com Latest Items
Subscribe in Rojo

Member Projects
DimeCasts.Net - Derik Whittaker

Friends of Devlicio.us
Red-Gate Tools For SQL and .NET

NDepend

SlickEdit
 
SmartInspect .NET Logging
NGEDIT: ViEmu and Codekana
LiteAccounting.Com
DevExpress
Fixx
NHibernate Profiler
Unfuddle
Balsamiq Mockups
Scrumy
JetBrains - ReSharper
Umbraco
NServiceBus
RavenDb
Web Sequence Diagrams
Ducksboard<-- NEW Friend!

 



Site Copyright © 2007 CodeBetter.Com
Content Copyright Individual Bloggers

 

Community Server (Commercial Edition)