1

I'm trying to build a publish script that doesn't use VS2010 -- I want it to be automated and in powershell (may use Psake soon). The biggest issue that I run into is that a project that will build and publish fine in VS2010 will either not build or not publish via the msbuild command. The closest I can get is (anonymized code):

msbuild /p:OutDir=c:\temp\publish\staging\myProj\myProj_1481\;Configuration=Debug;UseWPP_CopyWebApplication=True;PipelineDependsOnBuild=False C:\TEMP\export\myProj\1481\src\myProj.com\myProj.csproj

That one is failing for a Could not find file error in one of the DLLs. Naturally it publishes fine from VS2010. Is there some sort of recursion that I need to do? I'm burning up quite a bit of time on this one particular portion of my script -- the one part I have the least control over.

Requirements:

  1. if the proj will build in VS2010 I shouldn't need to modify the csproj file -- I don't want to hand this script off to someone else and have them stick in "fix your csproj" land for hours per project
  2. have to be able to script it entirely at the command line
  3. hopefully no additional installs needed

Related:

Trying to Build and Publish Asp.net website from command line using aspnet_compiler (old) _CopyWebApplication with web.config transformations (didn't fix my issue)

Community
  • 1
  • 1
jcollum
  • 43,623
  • 55
  • 191
  • 321
  • Does it work any better if you run it from a Visual Studio 2010 Command Prompt? (You're specifying the full path to MSBuild.exe, so I'm assuming you're not currently running from a VS command prompt.) – Joe White Nov 01 '11 at 20:34
  • well I was specifying the full path because i was doing this via a powershell script but I also tried that command in VS2010 Prompt -- same results – jcollum Nov 01 '11 at 20:42
  • And now I'm getting "MSBuild is not a valid Win32 application" when I run it from any command prompt. Fun. – jcollum Nov 01 '11 at 20:43
  • @JoeWhite ok, fixed the "win32 application" issue; updated the command line that I'm using to be my current "best guess" – jcollum Nov 01 '11 at 21:56

0 Answers0