将* .resx文件添加到VS Publish - >

时间:2016-10-25 15:56:55

标签: visual-studio msdeploy

我们需要手动将* .resx文件包含在我们的发布流程中。它们通常不包括在内。
这通常可以通过将它添加到Debug.pubxml文件中来正常工作:

  <Target Name="CustomCollectResxFiles">
    <Message Text="=== CustomCollectResxFiles ===" Importance="high" />
    <ItemGroup>
      <_CustomFiles Include="**\*.resx" />
      <FilesForPackagingFromProject Include="%(_CustomFiles.Identity)">
        <DestinationRelativePath>%(RecursiveDir)%(Filename)%(Extension)</DestinationRelativePath>
      </FilesForPackagingFromProject>
    </ItemGroup>
  </Target>
  <PropertyGroup>
    <CopyAllFilesToSingleFolderForPackageDependsOn>
      CustomCollectResxFiles;
      $(CopyAllFilesToSingleFolderForPackageDependsOn);
    </CopyAllFilesToSingleFolderForPackageDependsOn>
    <CopyAllFilesToSingleFolderForMsdeployDependsOn>
      CustomCollectResxFiles;
      $(CopyAllFilesToSingleFolderForMsdeployDependsOn);
    </CopyAllFilesToSingleFolderForMsdeployDependsOn>
  </PropertyGroup>

但是最近它在我的电脑上失败了以下消息(它仍适用于我的同事):

3>Skip copying C:\Users\Source\Workspaces\Supertext\Supertext\SupertextMvcSQL\obj\Debug\ApplicationInsights.config to obj\Debug\Package\PackageTmp\bin\ApplicationInsights.config, File obj\Debug\Package\PackageTmp\bin\ApplicationInsights.config is up to date
3>Copying **\*.resx to obj\Debug\Package\PackageTmp\**\*.resx.
3>Create Folder obj\Debug\Package\PackageTmp\** failed. Illegal characters in path.
3>
========== Build: 2 succeeded, 0 failed, 6 up-to-date, 0 skipped ==========
========== Publish: 0 succeeded, 1 failed, 0 skipped ==========

我不知道Illegal characters in path来自哪里。我还从TFS刷新了整个项目。所以应该没有奇怪的文件挥之不去。

更新:
是的,我已经在详细级别上使用Build输出尝试了它。没什么好看的。

0 个答案:

没有答案