views:

627

answers:

1

Follwing is the batch file for doing a publish to a publish directory

@echo off
start /b C:\WINDOWS\Microsoft.NET\Framework\v3.5\MSBuild.exe /target:publish /p:SolutionDir="C:\cc\ttr\code\Com.IT.sln" /p:PublishDir="C:\cc\ttr\code\deploy\" /p:Configuration=Debug

It is not publishing it. ANy idea why?

A: 

When start gets multiple arguments the first one is the title for the new window. Try

start /B "" start /b C:\WINDOWS\Microsoft.NET\Framework\v3.5\MSBuild.exe ^
/target:publish ^
/p:SolutionDir="C:\cc\ttr\code\Com.IT.sln" ^
/p:PublishDir="C:\cc\ttr\code\deploy\" ^
/p:Configuration=Debug

(should work with the ^ at the end of the lines, for readability, but if not just put it all into one line again)

Joey
It keep giving the follwoing error MSB1003: Specify a project or solution
sam
Well, it is entirely correct. You apparently don't have a solution or project file in the current working directory so you need to specify one as an additional parameter.
Joey
It is building the project but says "Web projects do not support the Publish target. Continuing with the remaining projects....Any idea why it is not publishing to the specified directory
sam