Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/asp.net-core/3.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
Visual studio 2015 当ASP.NET核心视图位于某个区域时,Visual Studio不会部署这些视图 安装程序 Visual Studio 2015(更新3和最新修补程序,截至今日) 已安装.NET核心SDK(预览版2) 创建新的ASP.NET核心项目 添加一个新区域,注册它并在其中添加视图 在VisualStudio中使用web部署将其部署到IIS myproject.json的一部分 我的发布配置文件 MSDeploy 释放 任何CPU http://somedomain/ 真的 假的 netcoreapp1.0 真的 真的 http://someip 站点名称 真的 远程代理 假的 用户名 真的 假的 NTLM 问题_Visual Studio 2015_Asp.net Core_Webdeploy_Asp.net Mvc Areas_Asp.net Mvc Views - Fatal编程技术网

Visual studio 2015 当ASP.NET核心视图位于某个区域时,Visual Studio不会部署这些视图 安装程序 Visual Studio 2015(更新3和最新修补程序,截至今日) 已安装.NET核心SDK(预览版2) 创建新的ASP.NET核心项目 添加一个新区域,注册它并在其中添加视图 在VisualStudio中使用web部署将其部署到IIS myproject.json的一部分 我的发布配置文件 MSDeploy 释放 任何CPU http://somedomain/ 真的 假的 netcoreapp1.0 真的 真的 http://someip 站点名称 真的 远程代理 假的 用户名 真的 假的 NTLM 问题

Visual studio 2015 当ASP.NET核心视图位于某个区域时,Visual Studio不会部署这些视图 安装程序 Visual Studio 2015(更新3和最新修补程序,截至今日) 已安装.NET核心SDK(预览版2) 创建新的ASP.NET核心项目 添加一个新区域,注册它并在其中添加视图 在VisualStudio中使用web部署将其部署到IIS myproject.json的一部分 我的发布配置文件 MSDeploy 释放 任何CPU http://somedomain/ 真的 假的 netcoreapp1.0 真的 真的 http://someip 站点名称 真的 远程代理 假的 用户名 真的 假的 NTLM 问题,visual-studio-2015,asp.net-core,webdeploy,asp.net-mvc-areas,asp.net-mvc-views,Visual Studio 2015,Asp.net Core,Webdeploy,Asp.net Mvc Areas,Asp.net Mvc Views,成功部署后,服务器上缺少区域视图。没有区域文件夹,该区域的视图也不在视图文件夹中。所有其他视图(区域外)都存在 我是做错了什么还是这个问题已经知道了?是否有人有相同的问题?如果有,解决方案是什么?在web应用程序的project.json文件中,您需要告诉它要包含什么: "publishOptions": { "include": [ "wwwroot", "Views", "Areas/**/Views", "appset

成功部署后,服务器上缺少区域视图。没有
区域
文件夹,该区域的视图也不在
视图
文件夹中。所有其他视图(区域外)都存在


我是做错了什么还是这个问题已经知道了?是否有人有相同的问题?如果有,解决方案是什么?

在web应用程序的project.json文件中,您需要告诉它要包含什么:

"publishOptions": {
    "include": [
        "wwwroot",
        "Views",
        "Areas/**/Views",
        "appsettings.json",
        "navigation.xml",
        "web.config"
    ]
},

如所述的临时修复将添加

"**/*.cshtml",
发布选项中。包括


在我的情况下工作。

我发现使用VS 2015 Update 3到Azure的ASP.NET应用程序的webdeploy无法正确地获取所有必需的文件;特别是我添加到项目中的新视图、新字体和新CSS文件

操作项目属性>>打包/发布Web>>[要部署的项目]没有帮助-这些新项目将被忽略

查看我的网站并使用Chrome控制台,我注意到缺少的项目,并编辑.csproj文件以添加缺少的项目;就我而言:

<Content Include="Views\Dashboard\Index.cshtml" />
<Content Include="fonts\glyphicons-halflings-regular.woff" />
<Content Include="Content\jquery-confirm.min.css" />

在明显的地方-例如找到其他视图文件并插入我的

然后我发现Azure会假装*.woff文件丢失(404)。它们不是,因此我必须在web.config中添加以下内容:

<system.webServer>
    <staticContent>
        <mimeMap fileExtension="woff" mimeType="application/font-woff" />
    </staticContent>
</system.webServer>


可怜的表演伙伴。

它已经在那里了。我有一行:
“Areas/**/Views”,在我的
publishOptions中有
。在
project.json中包含
。你把它们复制到输出目录了吗?(在
copyToOutput
中的
buildOptions
下)
<Content Include="Views\Dashboard\Index.cshtml" />
<Content Include="fonts\glyphicons-halflings-regular.woff" />
<Content Include="Content\jquery-confirm.min.css" />
<system.webServer>
    <staticContent>
        <mimeMap fileExtension="woff" mimeType="application/font-woff" />
    </staticContent>
</system.webServer>