Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can't build silverlight app on appharbor

I have an issue with building silverlight project on appharbor (some dll are missed). I had following error before:

"error MSB4019: The imported project "C:\Program Files\MSBuild\Microsoft\Expression\Blend\Silverlight\v4.0\Microsoft.Expression.Blend.Silverlight.targets" was not found". 

Thats why I comment 1 line on csproj file:

"Import Project="$(MSBuildExtensionsPath)\Microsoft\Expression\Blend\Silverlight\v4.0\Microsoft.Expression.Blend.Silverlight.targets""

And now I receiving new errors during building. Here you can take a look at the stack trace: http://pastebin.com/bKYkDzRa Does anybody know how I can fix this?

Regards, Yaroslav

like image 927
Yaroslav Bigus Avatar asked Dec 05 '11 13:12

Yaroslav Bigus


2 Answers

You will need to add the required dll's to a Lib folder and publish the lib folder to the AppHarbor site.

Have a look at this example step 24 which solves the same problem:

  • In Visual Studio, create a Folder in the DemoApp.Web project called Lib. This folder will contain all assemblies that the web application is dependent on and are not part of the .NET Framework. By putting them into this folder and marking them with “Copy to output” the assemblies will be deployed and available on AppHarbor. If you do not add the assemblies to this folder they will not be a part of the files in version control and not be uploaded to BitBucket and AppHarbor.

  • Copy the DLLs from the zip with Hammock to the Lib folder.

  • Open a command prompt in the folder that contains the solution. Execute the following command: subst S: DemoApp.Web\Lib This maps the Lib folder to a virtual S: drive. The reason to do this is that the Visual Studio projects will contain an absolute path to the dll’s and when the sources are downloaded to multiple computers these paths will be different. The subst will fix that. I even created a little batch file that does this for me and put it in the solution folder.

  • In Visual Studio right-click the Lib folder and select Add | Existing items and add the Hammock and JSON dll’s to the project. Make sure you mark them both as “Copy to output”. Right-click the DemoApp.Web project and select “Add Reference”. Click Browse and navigate to the S: drive and add both dll’s.

like image 71
Emond Avatar answered Oct 12 '22 00:10

Emond


The error you've shown above is because the Expression Blend SDK isn't installed on the build server. Since it's not installed, MSBuild can't find the Blend build target. I'm not sure if this is something AppHarbor supports or plans to support, but I'd recommend you contact them to see if they can install this SDK for you.

like image 3
chris.house.00 Avatar answered Oct 11 '22 23:10

chris.house.00