我有一个nuget包,其中包含一个构建目标文件,该文件在项目发布到Azure时添加文件。
我已经开始工作了,但如果在按发布之前按下发布对话框中的“开始预览”按钮,则不会发布nuget-package-files,如果它们存在于服务器上,则会被删除。
这是构建目标文件的内容
<ItemGroup>
<LisaFrontendFiles Include="$(MSBuildThisFileDirectory)..\Web\**\*" />
<NativeBinaries Include="$(MSBuildThisFileDirectory)..\lib\native\*" />
</ItemGroup>
<Target Name="LisaFrontendPublishTarget" BeforeTargets="CopyAllFilesToSingleFolderForPackage">
<ItemGroup>
<FilesForPackagingFromProject Include="%(LisaFrontendFiles.Identity)">
<DestinationRelativePath>%(RecursiveDir)%(Filename)%(Extension)</DestinationRelativePath>
</FilesForPackagingFromProject>
</ItemGroup>
<ItemGroup>
<FilesForPackagingFromProject Include="%(NativeBinaries.Identity)">
<DestinationRelativePath>bin/%(Filename)%(Extension)</DestinationRelativePath>
</FilesForPackagingFromProject>
</ItemGroup>
</Target>
<PropertyGroup>
<CopyAllFilesToSingleFolderForMsdeployDependsOn>
LisaFrontendPublishTarget;
$(CopyAllFilesToSingleFolderForMsdeployDependsOn);
</CopyAllFilesToSingleFolderForMsdeployDependsOn>
</PropertyGroup>