Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/azure/12.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Web部署到azure时EscapeTextForRegularExpressions错误_Azure_Asp.net Mvc 4_Azure Web App Service_Webdeploy - Fatal编程技术网

Web部署到azure时EscapeTextForRegularExpressions错误

Web部署到azure时EscapeTextForRegularExpressions错误,azure,asp.net-mvc-4,azure-web-app-service,webdeploy,Azure,Asp.net Mvc 4,Azure Web App Service,Webdeploy,在我的asp.ent MVC4项目中,我使用webdeploy部署到azure,并且我以前多次将此项目部署到azure上的应用程序服务。但是突然间我犯了这个错误 "EscapeTextForRegularExpressions" task was not given a value for the required parameter "Text" 我找到了一个答案: 将此文件添加到web项目的根文件夹中 File Name : *.wpp.targets <Project Tool

在我的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>
文件名:*.wpp.targets
*.wpp.targets
尽管如此,我还是无法理解问题的真正原因


根据您的描述,我在*.csproj中发现了类似的注释
includeIsSettings
。根据我的测试,如果我在csproj中指定了
true
,那么当我使用VS发布向导中的Web部署方法时,我可能会遇到类似的问题,如下所示:


删除
includeIsSettings
或将值设置为false后,我可以将我的web应用程序成功部署到azure web app。

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


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

我正在部署到azure,所以IIS复制不是一个问题,我一开始也没有选择它。尽管如此,非常感谢我已经修复了它,并在上面添加了答案。