Visual Studio包生成和私有bin路径中的DLL [英] Visual Studio Package build and DLLs in private bin path
问题描述
有没有办法告诉VS / MSBuild包含这些DLL?
他们住在/ bin /扩展。
干杯,
Rob
在这篇博文中找到答案。它的工作原理: http://sedodream.com/2010/05/01/WebDeploymentToolMSDeployBuildPackageIncludingExtraFilesOrExcludingSpecificFiles.aspx
基本上这里是我添加到我的项目文件中的代码。
<! -
由RSL添加以处理部署插件文件夹
遵循这里的教程:
http://sedodream.com/2010/05/01/WebDeploymentToolMSDeployBuildPackageIncludingExtraFilesOrExcludingSpecificFiles .aspx
- >
< PropertyGroup>
< CopyAllFilesToSingleFolderForPackageDependsOn>
CollectExtensionDLLs;
CollectExtensionViews;
$(CopyAllFilesToSingleFolderForPackageDependsOn);
< / CopyAllFilesToSingleFolderForPackageDependsOn>
< / PropertyGroup>
< Target Name =CollectExtensionDLLs>
< ItemGroup>
< _CustomFiles Include =bin \Extensions\ ** \ */>
< FilesForPackagingFromProject包含=%(_ CustomFiles.Identity)>
< DestinationRelativePath> bin\Extensions\%(RecursiveDir)%(Filename)%(Extension)< / DestinationRelativePath>
< / FilesForPackagingFromProject>
< / ItemGroup>
< / Target>
< Target Name =CollectExtensionViews>
< ItemGroup>
< _CustomFiles Include =Views\Extensions\ ** \ */>
< FilesForPackagingFromProject Include =%(_ CustomFiles.Identity)>
< DestinationRelativePath> Views\Extensions\%(RecursiveDir)%(Filename)%(Extension)< / DestinationRelativePath>
< / FilesForPackagingFromProject>
< / ItemGroup>
< / Target>
<! - //// End Rob的修改 - >
I am using MEF to do a sort of crude plugin architecture. This is working well. However, when I do a deployment using the visual studio package/publish build tasks (which I am calling via NAnt/MSbuild). My unreferenced plugin assemblies are not being included in the package and so are not deployed.
Is there a way to tell VS/MSBuild to include these DLLs?
They live in /bin/Extensions.
Cheers, Rob
I have found the answer in this blog post. It works perfectly: http://sedodream.com/2010/05/01/WebDeploymentToolMSDeployBuildPackageIncludingExtraFilesOrExcludingSpecificFiles.aspx
Basically here's the code I added to my project file.
<!--
Added by RSL to deal with deploying the plugins folder
Followed tutorial here:
http://sedodream.com/2010/05/01/WebDeploymentToolMSDeployBuildPackageIncludingExtraFilesOrExcludingSpecificFiles.aspx
-->
<PropertyGroup>
<CopyAllFilesToSingleFolderForPackageDependsOn>
CollectExtensionDLLs;
CollectExtensionViews;
$(CopyAllFilesToSingleFolderForPackageDependsOn);
</CopyAllFilesToSingleFolderForPackageDependsOn>
</PropertyGroup>
<Target Name="CollectExtensionDLLs">
<ItemGroup>
<_CustomFiles Include="bin\Extensions\**\*"/>
<FilesForPackagingFromProject Include="%(_CustomFiles.Identity)">
<DestinationRelativePath>bin\Extensions\%(RecursiveDir)%(Filename)%(Extension)</DestinationRelativePath>
</FilesForPackagingFromProject>
</ItemGroup>
</Target>
<Target Name="CollectExtensionViews">
<ItemGroup>
<_CustomFiles Include="Views\Extensions\**\*"/>
<FilesForPackagingFromProject Include="%(_CustomFiles.Identity)">
<DestinationRelativePath>Views\Extensions\%(RecursiveDir)%(Filename)%(Extension)</DestinationRelativePath>
</FilesForPackagingFromProject>
</ItemGroup>
</Target>
<!-- //// End Rob's modifications -->
这篇关于Visual Studio包生成和私有bin路径中的DLL的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!