我正在尝试将自定义文件添加到我们的 Web 部署包中,根据此博客发布: http ://sedodream.com/2010/05/01/WebDeploymentToolMSDeployBuildPackageIncludingExtraFilesOrExcludingSpecificFiles.aspx
<Target Name="CustomCollectFiles">
<Message Text="AppBuildFolder = $(AppBuildFolder)"/>
<ItemGroup>
<_CustomFiles Include="..\*Repository*\**\*.dll;..\*Repository*\**\*.pdb" Condition="'$(AppBuildFolder)' == ''" />
<_CustomFiles Include="$(AppBuildFolder + '*.dll');$(AppBuildFolder + '*.pdb')" Condition="'$(AppBuildFolder)' != ''" />
<FilesForPackagingFromProject Include="%(_CustomFiles.Identity)">
<DestinationRelativePath>bin\%(Filename)%(Extension)</DestinationRelativePath>
</FilesForPackagingFromProject>
</ItemGroup>
<Message Text="Files found: @(_CustomFiles)"/>
</Target>
我们在 AppBuildFolder 中还有一些其他引用,我们需要将它们复制到包中,但我从未在消息中看到任何找到的文件输出。有任何想法吗?
谢谢安迪