views:

306

answers:

2

I'm new to MSBuild, but I managed to setup the following simple script:

<Project ToolsVersion="3.5" DefaultTargets="Compile" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"&gt;
    <PropertyGroup>
        <Configuration Condition="'$(Configuration)' == ''">Debug</Configuration>
    </PropertyGroup>
    <ItemGroup>
        <SolutionRoot Include=".." />
        <BuildArtifacts Include=".\Artifacts\" />
        <SolutionFile Include="..\SolutionName.sln" />
    </ItemGroup>
    <Target Name="Clean">
        <RemoveDir Directories="@(BuildArtifacts)" />
    </Target>
    <Target Name="Init" DependsOnTargets="Clean">
        <MakeDir Directories="@(BuildArtifacts)" />
    </Target>
    <Target Name="Compile" DependsOnTargets="Init">
        <MSBuild Projects="@(SolutionFile)" Properties="OutDir=%(BuildArtifacts.FullPath);Configuration=$(Configuration)" />
        <MakeDir Directories="%(BuildArtifacts.FullPath)\_PublishedWebsites\RDE.XAP.UnifiedGui.Web\Temp" />
    </Target>
</Project>

The solution has 23 projects, 4 of which are WebApps. Now, the script works fine and the output is generated correctly. The only problem I counter is with two WebApp projects in the solution that use the AJAX Control Toolkit. The toolkit has a set of folders (e.g. ar, it, es, fr) that contain localized resources. These folders are not copied in the bin directory of the WebApps when the solution is built in MSBuild, but they are copied when it is built in Visual Studio.

How can I solve this in a clean manner? I know I could write a (quite convoluted) task that copies the directories after the compile, but it does not seem the right solution to me. Also, neither Google, SO and MSDN could provide more details on this kind of issue.

A: 

I have the same problem :(

Marcos
A: 

Make sure the ajaxcontroltoolkit.dll from the bin directory was added to your source control repository. (ie SVN, GIT, CNV, etc.)

David Wanat