SolutionDir macro in post build event
copy $(SolutionDir)$(ProjectName)\$(OutDir)*.dll $(SolutionDir)DestFolder
My MSBuild file lookes like:
<Project DefaultTargets="Build"
xmlns=http://schemas.microsoft.com/developer/msbuild/2003>
<PropertyGroup>
<SolutionFile>MSBuildIssue.sln</SolutionFile>
</PropertyGroup>
<Target Name="Build">
<!-- Clean, then rebuild entire solution -->
<MSBuild Projects="$(SolutionFile)" Targets="Clean;Rebuild" />
</Target>
</Project>
when I run it from VStudio it works fine but when I try to build the project
from the command line using an msbuild project it seems that it can't
resolve the SoulutionDir macro (it desiplays as *Undefined*). here is the
the error I see:
Target PostBuildEvent:
copy*Undefined*SomeProject\bin\Debug\*.dll *Undefined*DestFolder
The filename, directory name, or volume label syntax is incorrect.
*Undefined*SomeProject\bin\Debug\*.dll
0 file(s) copied.
C:\WINDOWS\Microsoft.NET\Framework\v2.0.50215Microsoft.Common.targets(3007,13):
error MSB3073: The command "copy *Undefined*SomeProject\bin\Debug\*.dll
*Undefined*DestFolder" exited with code 1.
Do you know what the issue could be?
Thanks
Gabo

