Search This Blog

Showing posts with label Jenkins. Show all posts
Showing posts with label Jenkins. Show all posts

Monday, September 29, 2014

Microsoft.WebApplication.targets" was not found error when building VS 2012 solution on Jenkins build server


Encountered an odd error in an automated build.
One solution was failing with this error:

Here is the error:
The imported project "E:\Build\RXS\external\microsoft\Microsoft.WebApplication.targets" was not found. Confirm that the path in the declaration is correct, and that the file exists on disk. E:\Build\RXS\DirectAdministrativeApplication\service\config.service.VS2012.csproj


Open the solution locally (not on the build server) no problem.
Open the solution on the build server, one project failed to load....
Ah, a missing reference perhaps....

Based on this link:


I copied the project file
And changed the following V9.0 to V11.0
These are the imports in the .proj file:
 
  v9.0\WebApplications\Microsoft.WebApplication.targets" Condition="false" />

  v9.0\WebApplications\Microsoft.WebApplication.targets')" Project="..\..\external\microsoft\Microsoft.WebApplication.targets" />

The build machine never had VS 2008 installed on it but the reference in the project came off a dev machine and was only missing off.

Lucky blind guess worked....
Solution opens and builds now.

Wednesday, May 7, 2014

Thursday, September 19, 2013

Creating a Jenkins Build machine


Recently, I had to recreate a Jenkins build server due to a hardware failure.
The process was straightforward but not without issues...


VM started with
WIN2008 R2 server
VS 2010 Pro

Software to be installed:
1) TortoiseSVN 1.7.6, Build 22632 - 64 Bit , 2012/03/08 18:29:39
2) Winrar - wrar420.exe
3) Jenkins 1.531 from  http://jenkins-ci.org/


Steps:
1) Installed TortoiseSVN
2) Pulled local project code in SVN down
3) Install ASP.net/MVC3 (its a MVC3 ASP.NET App)
4) Install IIS 6 Metabase and IIS 6 Configuration Compatibility
         (Needed to for 3 projects in the solution)
        http://technet.microsoft.com/en-us/library/bb397374(v=exchg.80).aspx
5) Install WIF files (Windows Identity Foundation) (used by the project)
a. Windows6.1-KB974405-x64
b. WindowsIdentityFoundation-SDK-4.0
6) Install Jenkins 1.531.
a. Add Text Finder Plugin to Jenkins install.
b. Downgrade SVN plugin to version 1.45
c. Install Active Directory Plugin
d. Give anonymous read access
e. Define other users.
f. Add SVN login as /
g. Manually added subversion.credentials file to 'My Project' task folder  and restarted jenkins
C:\Program Files (x86)\Jenkins\jobs\My Project

7) Turn firewall off.

Issues entered:
1) VS 2012 cannot be used to build 'My Project' .
a. Solution contains is a .net deployment project which is no longer supported by current versions of Visual Studio.  Last supported in VS2010 
b. Had to uninstallVS2012 Pro and install VS2010 Pro
2) After configuring Jenkins and confirming that project code could be fetched from SVN locally on the build server and manually compiled, attempts to set user credentials for SVN resulted in failure: with code SVN E175002
a. Manually added subversion.credentials file to 'My project folder task folder and restarted jenkins

C:\Program Files (x86)\Jenkins\jobs\My Project