asp.net mvc 4 - MSBuild target failing on server, yet succeeding locally -
for our web project, require assembly version of project version our static content.
i have declared target in web project file assembly identity , retrieve version number it, like:
<propertygroup> <ivanhowebversion> </ivanhowebversion> </propertygroup> <target name="setivanhowebversion" aftertargets="afterbuild"> <message text="-----------------"> </message> <message text="entering target setivanhowebversion"> </message> <message text="-----------------"> </message> <getassemblyidentity assemblyfiles="$(outputpath)$(assemblyname).dll"> <output taskparameter="assemblies" itemname="assemblyidentities" /> </getassemblyidentity> <createproperty value="%(assemblyidentities.version)"> <output taskparameter="value" propertyname="ivanhowebversion" /> </createproperty> <message text="assembly version = v$(ivanhowebversion)"> </message> <exec command=" "$(solutiondir)ivanho.lib\translationgenerator\translationgenerator.exe" "$(projectdir)areas\ui\static\locales\translationsrc\translations-en-nl-ar.xlsx" "$(projectdir)areas\ui\static\locales\v.$(ivanhowebversion)"" /> </target> this works charm when building locally, when trying check in our tfs build server fails following error:
cannot assembly name "bin\ivanho.web.dll". not load file or assembly 'ivanho.web.dll' or 1 of dependencies. system cannot find path specified.
this error thrown @ same line of getassemblyidentity call.
i can't figure out why isn't working on build server, i'm pretty new msbuild, can point me in right direction? many in advance!
either file not there or path wrong. have on build server see if file's there. can use converttoabsolutepath task of paths see:http://msdn.microsoft.com/en-us/library/bb882668(v=vs.100).aspx. put in error statement check file e.g.
<error condition="!exists('$(outputpath)$(assemblyname).dll')" text="filenotfound"/>
Comments
Post a Comment