【问题标题】:EscapeTextForRegularExpressions error while webdeploying to azureWeb部署到天蓝色时出现EscapeTextForRegularExpressions错误
【发布时间】:2017-09-26 16:50:47
【问题描述】:

在我的 asp.ent MVC4 项目中,我使用 webdeploy 部署到 azure,并且我之前多次将该项目部署到 azure 上的应用服务。但突然之间我出现了这个错误。

"EscapeTextForRegularExpressions" task was not given a value for the required parameter "Text"

我找到了答案:

将此文件添加到 Web 项目的根文件夹中。

File Name : *.wpp.targets


<Project ToolsVersion="4.0"  xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
      <ItemGroup>
        <ExcludeFromPackageFolders Include="Internal">
          <FromTarget>*.wpp.targets</FromTarget>
        </ExcludeFromPackageFolders>
      </ItemGroup>
    </Project>

我还是无法理解问题的真正原因

【问题讨论】:

    标签: azure asp.net-mvc-4 azure-web-app-service webdeploy


    【解决方案1】:

    根据您的描述,我发现了一个类似的issue 注意到*.csproj 中的IncludeIisSettings。根据我的测试,如果我用我的 csproj 指定了&lt;IncludeIisSettings&gt;true&lt;/IncludeIisSettings&gt;,那么当我使用 VS 发布向导中的 Web Deploy 方法时,我可能会遇到类似的问题,如下所示:

    删除IncludeIisSettings或将值设置为false后,我可以成功地将我的Web应用程序部署到Azure Web应用程序。

    【讨论】:

    • 我正在部署到 azure,所以 IIS 复制不是问题,我一开始没有选择它。
    • 从来没有,非常感谢你我已经修复它,我已经添加了上面的答案。
    【解决方案2】:

    我有另一个答案也许可以帮助某人:

    您必须打开解决方案资源管理器,然后右键单击项目,选择属性,在打包/发布 Web 上检查您的配置是否处于发布状态,而不是下拉菜单中的活动(调试),这就是我的解决方案.

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2017-02-13
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多