I'm not quite sure what an βoff-siteβ build system is, but if you just need a copy of the compiled files (or other resources) to other directories, you can do this by linking to the MSBuild build tasks.
In our projects, we move the compiled dlls to the lib folders and put the files in the right places after the build is complete. To do this, we created a custom build.target file that creates Target , Property and ItemGroup , which are then used to populate our external output folder.
Our custom goal file looks something like this:
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <PropertyGroup> <ProjectName>TheProject</ProjectName> <ProjectDepthPath>..\..\</ProjectDepthPath> <ProjectsLibFolder>..\..\lib\</ProjectsLibFolder> <LibFolder>$(ProjectsLibFolder)$(ProjectName)\$(Configuration)\</LibFolder> </PropertyGroup> <Target Name="DeleteLibFiles"> <Delete Files="@(LibFiles-> '$(ProjectDepthPath)$(LibFolder)%(filename)%(extension)')" TreatErrorsAsWarnings="true" /> </Target> <Target Name="CopyLibFiles"> <Copy SourceFiles="@(LibFiles)" DestinationFolder="$(ProjectDepthPath)$(LibFolder)" SkipUnchangedFiles="True" /> </Target> <ItemGroup> <LibFiles Include=" "> <Visible>false</Visible> </LibFiles> </ItemGroup> </Project>
The .csproj file in Visual Studio then integrates with this custom target file:
<?xml version="1.0" encoding="utf-8"?> <Project ToolsVersion="3.5" ... > ... <Import Project="..\..\..\..\build\OurBuildTargets.targets" /> <ItemGroup> <LibFiles Include="$(OutputPath)$(AssemblyName).dll"> <Visible>false</Visible> </LibFiles> </ItemGroup> <Target Name="BeforeClean" DependsOnTargets="DeleteLibFiles" /> <Target Name="AfterBuild" DependsOnTargets="CopyLibFiles" /> </Project>
In short, this build script first tells MSBuild to load our build script, then adds the compiled file to the LibFiles ItemGroup, and finally binds our custom build targets DeleteLibFiles and CopyLibFiles to the build process. We set this for each project in our solution, so only files that are updated, deleted / copied, and each project is responsible for its own files (DLL, images, etc.).
Hope this helps. We apologize if I misunderstood what you mean by a system outside the assembly place, and this is completely useless to you!
source share