Using _bin_deployableAssemblies with Visual Studio 2012

In Visual Studio 2010, I used the _bin_deployableAssemblies folder to include third-party assemblies, which should be included in the bin folder when building and deploying on the Internet. This is about those third-party meetings that are necessary for the website, but you do not want to link to them. It worked great ...

Now it stops working with Visual Studio 2012 ... Well, part of it has stopped working. When I create, the contents of the _bin_deployableAssemblies folder are copied to the bin folder. But when I execute webdeploy, for example, on my local disk, these files are not published in the bin folder of the output folder.

I use 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> 

Can someone help me find out how I get these assemblies in the folder folder with folders in the ouput folder?

+4
source share
2 answers

Thanks to Alexey, I found a solution to my problem, this is what I am currently using in my .csproj file to support copying third-party assemblies for Filesystem- and Webdeploy:

 <ItemGroup> <AvailableItemName Include="ThirdPartyAssemblies"> <Visible>false</Visible> </AvailableItemName> </ItemGroup> <Target Name="AfterBuild"> <Message Text="Build | Copying third party assemblies to output folder ($(OutputPath))" Importance="high" /> <Copy DestinationFolder="$(OutputPath)" SourceFiles="@(ThirdPartyAssemblies)" SkipUnchangedFiles="true" /> </Target> <Target Name="CopyBinFiles" AfterTargets="CopyAllFilesToSingleFolderForPackage" BeforeTargets="MSDeployPublish"> <Message Text="Deploy | Copying third party assemblies to output folder ($(_PackageTempDir)\bin\)" Importance="high" /> <Copy DestinationFolder="$(_PackageTempDir)\bin\" SourceFiles="@(ThirdPartyAssemblies)" SkipUnchangedFiles="true" /> </Target> 

From: MSBuild Targets and Issues with Visual Studio 2012

+4
source

Assuming that you have Only the files necessary to run this application , defined in the project properties, make sure that the files are included in the project and that their assembly action is the contents.

http://msdn.microsoft.com/en-us/library/ee942158.aspx#why_dont_all_files_get_deployed

-2
source

Source: https://habr.com/ru/post/1433809/


All Articles