AjaxControlToolkit Resource Files Not Copied To Output in MSBuild Script
Posted
by Dario Solera
on Stack Overflow
See other posts from Stack Overflow
or by Dario Solera
Published on 2009-06-18T08:03:06Z
Indexed on
2010/04/21
19:13 UTC
Read the original article
Hit count: 441
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">
<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.
© Stack Overflow or respective owner