【问题标题】:Error when saving entities using breezejs(missing ScriptAssemblyAttribute )使用breathjs保存实体时出错(缺少ScriptAssemblyAttribute)
【发布时间】:2012-11-30 23:00:11
【问题描述】:

单击 breezejs nuget 示例中的保存按钮时出现以下错误:

无法从程序集“mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089”中加载类型“System.Runtime.CompilerServices.ScriptAssemblyAttribute”

当调用下面代码中的 SaveChanges 时出现错误:

[HttpPost]
public SaveResult SaveChanges(JObject saveBundle) {
   return _contextProvider.SaveChanges(saveBundle);
}

实际上,当我在代码编辑器中查找 System.Runtime.CompilerServices 并且我的目标是 .NET 4.5 时,智能感知中不存在 ScriptAssemblyAttribute

我错过了什么?

提前致谢。

【问题讨论】:

  • 您运行的是最新的 .NET 4.5(不是 RC2)吗?我在网上的简短搜索表明这种错误发生在不在 RTM 上的机器上。 (见github.com/ninject/Ninject.Web.Common/issues/3
  • 我有 .NET 4.5(v4.5.50709),它随 VS2012 的最终版本一起提供。所以它是RTM。我还引用了“C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5\System.Core.dll”

标签: javascript asp.net asp.net-mvc-4 breeze script#


【解决方案1】:

原来 Script# 与它有关。我卸载了它,错误消失了。

【讨论】:

  • 您不应在非脚本# 项目中引用脚本# 程序集。解决方案可能就这么简单......
猜你喜欢
  • 2012-10-01
  • 1970-01-01
  • 1970-01-01
  • 2014-09-25
  • 2021-08-05
  • 2020-08-20
  • 2017-10-01
  • 1970-01-01
  • 2019-02-18
相关资源
最近更新 更多