tags:

views:

32

answers:

1

Hi, I have the following

echo off
set installType = /t
set msBuild=c:\Windows\Microsoft.NET\Framework\v4.0.30319\MSBuild.exe
set adminBuild = %msBuild% "d:\Projects\Test\Test.csproj" /T:Package /P:PackageLocation="d:\Projects\MSBuild\Package\Test.zip"
set adminDeploy = d:\Projects\MSBuild\Package\Test.deploy.cmd %installType%
echo %msBuild%
echo %adminBuild% 
echo %adminDeploy%

The first echo works correct, next ones don't return anything. Could you tell me what's wrong? Thank you

+1  A: 

You should not have spaces on either side of the = in your set statements.

Use:

echo off
set installType = /t
set msBuild=c:\Windows\Microsoft.NET\Framework\v4.0.30319\MSBuild.exe
set adminBuild=%msBuild% "d:\Projects\Test\Test.csproj"...
set adminDeploy=d:\Projects\MSBuild\Package\Test.deploy.cmd %installType%
echo %msBuild%
echo %adminBuild% 
echo %adminDeploy%

which produces what you want:

c:\Windows\Microsoft.NET\Framework\v4.0.30319\MSBuild.exe
c:\Windows\Microsoft.NET\Framework\v4.0.30319\MSBuild.exe "d:\Projects\Test\Test.csproj"...
d:\Projects\MSBuild\Package\Test.deploy.cmd
paxdiablo