With Visual Studio 2010 I used the _bin_deployableAssemblies folder to include third party assemblies which should be included in the bin folder on build and web deploy.
It’s about those third party assemblies which are needed for the website, but you don’t want to reference them.
This worked awesome…
Now with Visual Studio 2012 it stopped working… Well, a part of it stopped working.
When I build, the contents of the _bin_deployableAssemblies folder are copied to the bin folder.
But when I execute webdeploy, for instance to my local disk, those files are not published to the output folder’s bin folder.
I’m using this in my .csproj file:
<PropertyGroup>
<OnAfterCopyAllFilesToSingleFolderForPackage>
__MoveFilesFromUmbracoSubdirsToBinPackageTemp
</OnAfterCopyAllFilesToSingleFolderForPackage>
</PropertyGroup>
<Target Name="_CopyBinDeployableAssemblies" Condition="Exists('$(MSBuildProjectDirectory)\_bin_deployableAssemblies')">
<CreateItem Include="$(MSBuildProjectDirectory)\_bin_deployableAssemblies\**\*.*" Condition="Exists('$(MSBuildProjectDirectory)\_bin_deployableAssemblies')" Exclude="$(MSBuildProjectDirectory)\_bin_deployableAssemblies\**\.svn\**\*">
<Output ItemName="_binDeployableAssemblies" TaskParameter="Include" />
</CreateItem>
<Copy SourceFiles="@(_binDeployableAssemblies)" DestinationFolder="$(OutDir)" SkipUnchangedFiles="true" Retries="$(CopyRetryCount)" RetryDelayMilliseconds="$(CopyRetryDelayMilliseconds)" />
</Target>
<Target Name="__MoveFilesFromUmbracoSubdirsToBinPackageTemp">
<Message Text="Moving files from bin\umbraco\ and bin\umbraco plugins\ to bin\" Importance="high" />
<CreateItem Include="$(_PackageTempDir)\bin\umbraco\*.*;$(_PackageTempDir)\bin\umbraco plugins\*.*">
<Output ItemName="_umbracoItems" TaskParameter="Include" />
</CreateItem>
<Move SourceFiles="@(_umbracoItems)" DestinationFolder="$(_PackageTempDir)\bin" />
<Message Text="Removing bin\umbraco\ and bin\umbraco plugins\ folders" Importance="high" />
<RemoveDir Directories="$(_PackageTempDir)\bin\umbraco;$(_PackageTempDir)\bin\umbraco plugins" />
</Target>
Could anyone help me out how I get those assemblies in the ouput folder’s bin folder?
Thanks to Alexey I found the solution to my problem, this is what I’m using now in my .csproj file to support copying third party assemblies for Filesystem- and Webdeploy:
From: MSBuild targets and Visual Studio 2012 issues