例外的ugrading到ASP.NET MVC6同β7后打开现有项目 [英] Exception on opening existing project after ugrading to ASP.NET MVC6 beta7

查看:198
本文介绍了例外的ugrading到ASP.NET MVC6同β7后打开现有项目的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在使用Visual Studio 2015年社区版和更新现有的ASP.NET MVC6应用同β7。现在,我无法再打开该项目。 Visual Studio的崩溃,并显示以下异常:

  2015年9月8日二十时23分12秒
致残
系统发生一个或多个错误:.AggregateException。 ---> Microsoft.Assumes + InternalErrorException:指定默认的内容类型(默认值)未在项目项架构中定义。
在Microsoft.Assumes.Fail(字符串消息,布尔showAssert)
在Microsoft.VisualStudio.ProjectSystem.Items.ProjectItemSchemaManagerBase< ComputeCacheDataAsync> d__15.MoveNext()
---结束堆栈从以前的位置,引发异常---
跟踪的System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(任务任务)
在System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(任务任务)$ b 。CreateSchemaFromSnapshotDataAsync> d__21.MoveNext()
---内部异常堆栈跟踪的结尾---
--->在Microsoft.VisualStudio.ProjectSystem.Items.ProjectItemSchemaManager< $ b; (内部异常#0)Microsoft.Assumes + InternalErrorException:指定默认的内容类型(默认值)未在项目项架构中定义。
在Microsoft.Assumes.Fail(字符串消息,布尔showAssert)
在Microsoft.VisualStudio.ProjectSystem.Items.ProjectItemSchemaManagerBase< ComputeCacheDataAsync> d__15.MoveNext()
---结束堆栈从以前的位置,引发异常---
跟踪的System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(任务任务)
在System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(任务任务)
在Microsoft.VisualStudio.ProjectSystem.Items.ProjectItemSchemaManager< CreateSchemaFromSnapshotDataAsync> d__21.MoveNext()< ---

谷歌搜索错误消息的指定默认的内容类型(默认值)未在项目项架构中定义。的没有任何带来有用的提示。首先,我认为这事做的dnvm。所以这是我的 dnvm列表结果:

 活动版本运行架构OperatingSystem的别名
------ ------- ------- ------------ ------------- - -----
1.0.0 beta5的CLR 64赢
1.0.0 beta5的CLR 86赢
1.0.0 beta5的coreclr 64赢
1.0.0 -beta5 coreclr 86赢
1.0.0-beta6 CLR 64赢
1.0.0-beta6 CLR 86赢
1.0.0-同β7CLR 64赢
* 1.0.0-同β7CLR 86胜默认
1.0.0-同β7coreclr 64赢
1.0.0-同β7coreclr 86赢

我global.json看起来是这样的:

  {
项目:[ SRC,测试],
SDK:{
版本:1.0.0-同β7
}
}

拆卸的 SDK 的一部分,不会改变任何东西。



编辑:这是我的project.json

  {
根目录 wwwroot文件,
版本:1.0.0- *,

依赖:{
Microsoft.AspNet.Mvc:6.0.0 - *,
Microsoft.AspNet.Server.IIS:1.0.0- *,
Microsoft.AspNet.Server.WebListener:1.0.0- *,
Microsoft.AspNet.StaticFiles:1.0.0- *,
Microsoft.AspNet.Diagnostics:1.0.0- *,
Microsoft.Framework.Configuration.Json :1.0.0- *,
Microsoft.AspNet.Authentication:1.0.0- *
},

命令:{
网络:Microsoft.AspNet.Hosting --config hosting.ini
},

框架:{
dnx451:{},
dnxcore50:{}
},

compilationOptions:{
allowUnsafe:真正的
},

排除:[
的wwwroot,
node_modules,
bower_components
],
publishExclude:[
node_modules ,
bower_components,
**。xproj,
**。用户,
**。vspscc
]
}


解决方案

我有完全相同的问题。我试着重新安装Web工具以及修复VS(专业)。



文件 - >新建项目抛出了同样的错误。



我的解决办法是安装德语语言包(我用德国的Visual Studio)。问题是,当我第一次安装同β7语言包中止与我不记得了错误,但是当我重新尝试,它的工作。



问候丹尼尔


I'm using Visual Studio 2015 Community Edition and updated my existing ASP.NET MVC6 application to beta7. Now I'm not able to open the project anymore. Visual Studio crashes with the following Exception:

08.09.2015 20:23:12
Crippling
System.AggregateException: One or more errors occurred. ---> Microsoft.Assumes+InternalErrorException: The specified default content type (Default) is not defined in the project item schema.
   at Microsoft.Assumes.Fail(String message, Boolean showAssert)
   at Microsoft.VisualStudio.ProjectSystem.Items.ProjectItemSchemaManagerBase.<ComputeCacheDataAsync>d__15.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.VisualStudio.ProjectSystem.Items.ProjectItemSchemaManager.<CreateSchemaFromSnapshotDataAsync>d__21.MoveNext()
   --- End of inner exception stack trace ---
---> (Inner Exception #0) Microsoft.Assumes+InternalErrorException: The specified default content type (Default) is not defined in the project item schema.
   at Microsoft.Assumes.Fail(String message, Boolean showAssert)
   at Microsoft.VisualStudio.ProjectSystem.Items.ProjectItemSchemaManagerBase.<ComputeCacheDataAsync>d__15.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.VisualStudio.ProjectSystem.Items.ProjectItemSchemaManager.<CreateSchemaFromSnapshotDataAsync>d__21.MoveNext()<---

Googling for the error message The specified default content type (Default) is not defined in the project item schema. didn't brought any helpful hint. First I thought it has something to do with the dnvm. So this is my dnvm list result:

Active Version     Runtime Architecture OperatingSystem Alias
------ -------     ------- ------------ --------------- -----
       1.0.0-beta5 clr     x64          win
       1.0.0-beta5 clr     x86          win
       1.0.0-beta5 coreclr x64          win
       1.0.0-beta5 coreclr x86          win
       1.0.0-beta6 clr     x64          win
       1.0.0-beta6 clr     x86          win
       1.0.0-beta7 clr     x64          win
  *    1.0.0-beta7 clr     x86          win             default
       1.0.0-beta7 coreclr x64          win
       1.0.0-beta7 coreclr x86          win

My global.json looks like this:

{
    "projects": [ "src", "test" ],
    "sdk": {
        "version": "1.0.0-beta7"
    }
}

Removing the sdk part does not change anything.

EDIT: this is my project.json

{
    "webroot": "wwwroot",
    "version": "1.0.0-*",

    "dependencies": {
        "Microsoft.AspNet.Mvc": "6.0.0-*",
        "Microsoft.AspNet.Server.IIS": "1.0.0-*",
        "Microsoft.AspNet.Server.WebListener": "1.0.0-*",
        "Microsoft.AspNet.StaticFiles": "1.0.0-*",
        "Microsoft.AspNet.Diagnostics": "1.0.0-*",
        "Microsoft.Framework.Configuration.Json": "1.0.0-*",
        "Microsoft.AspNet.Authentication": "1.0.0-*"
    },

    "commands": {
        "web": "Microsoft.AspNet.Hosting --config hosting.ini"
    },

    "frameworks": {
        "dnx451": { },
        "dnxcore50": { }
    },

    "compilationOptions": {
        "allowUnsafe": true
    },

    "exclude": [
        "wwwroot",
        "node_modules",
        "bower_components"
    ],
    "publishExclude": [
        "node_modules",
        "bower_components",
        "**.xproj",
        "**.user",
        "**.vspscc"
    ]
}

解决方案

I had exactly the same problem. I tried reinstalling the Web Tools as well as repairing VS (Professional).

File->New Project threw the same error.

My solution was to install the german language pack (I am using german Visual Studio). The problem was, that when I first installed beta7 the language pack aborted with an error that I cannot remember, but when I retried, it worked.

Regards Daniel

这篇关于例外的ugrading到ASP.NET MVC6同β7后打开现有项目的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆