I created a MSBuild script for our CI process and in this script I use a MSBuild task to compile the solution:
<PropertyGroup>
<MyOutPath>Output</MyOutPath>
</PropertyGroup>
<MSBuild
Projects="MySolution.sln"
Targets="Clean;Rebuild"
Properties="OutputPath=$(MyOutPath)\%24(AssemblyName)">
</MSBuild>
I want the c# project files to use an output path like
- Output\MyAssemblyName1 for the project MyAssemblyName1
- Output\MyAssemblyName2 for the project MyAssemblyName2
The AssemblyName property is from the C# project file and I want it to be expanded in the OutputPath property when building the project.
Right now, %24(AssemblyName) just produce Output\$(AssemblyName) on the filesystem which is not what I want.
Not surprisingly, using $(AssemblyName) expands to nothing in the "parent" MSBuild file.
Is there any way to defer the resolution of the AssemblyName property later in the target project file?
Also, I do not want to modify the .csproj file as I want the least impact from the CI system.