English 中文(简体)
“不应装载类型系统。 Action from Assembly mscorlib, edition=3.7.0.0" exception
原标题:"Could not load type System.Action from assembly mscorlib, Version=3.7.0.0" exception

I m 经历一个非常奇怪的问题:

我在WP7项目中利用了Unit测试框架。 目前,正在尝试利用银团测试框架对装置进行测试(使用<条码>《联合国免疫缺陷病毒/信号>)。

除使用<条码>的测试外,所有工作均得罚款。 系统. 行动。 在这些测试中,我发现runtime差错:

Could not load type System.Action from assembly mscorlib, Version=3.7.0.0

例如,这种工作(非基因系统。

public void MethodThatAcceptsRawAction(System.Action callback);
...
MethodThatAcceptsRawAction( () => Console.WriteLine("Hi"));

但这项工作将继续下去。

public void MethodThatAcceptsOneArgAction(System.Action<object> exCallback);
...
MethodThatAcceptsOneArgAction( (ex) => Console.WriteLine(ex.ToString()));

我在www.strong>mscorlib.dll上检查了公众类型,记忆中,没有。 System.Action,但System.Action 1打字。 参看System.Core.dll

微软决定分立系统。 两个图书馆之间的行动差异,但操作时间约束器不知道哪里去看这种类型。

Maybe someone had the same problem or at least knows something to look at?

预 收

最佳回答

奥凯找到了解决办法。

Default WP7项目模板界定了mscorlib参考资料。 这是一个不容置疑的轨道,即认为总是由汇编者(如果没有/未定钥匙使用)提及。

我删除了这一提法,现在一切都证明了这一点。

P.S.I dont把这一职位作为答案,也许有人可以解释这一行为。 这将是一个真正的答案。

问题回答

暂无回答




相关问题
Anyone feel like passing it forward?

I m the only developer in my company, and am getting along well as an autodidact, but I know I m missing out on the education one gets from working with and having code reviewed by more senior devs. ...

NSArray s, Primitive types and Boxing Oh My!

I m pretty new to the Objective-C world and I have a long history with .net/C# so naturally I m inclined to use my C# wits. Now here s the question: I feel really inclined to create some type of ...

C# Marshal / Pinvoke CBitmap?

I cannot figure out how to marshal a C++ CBitmap to a C# Bitmap or Image class. My import looks like this: [DllImport(@"test.dll", CharSet = CharSet.Unicode)] public static extern IntPtr ...

How to Use Ghostscript DLL to convert PDF to PDF/A

How to user GhostScript DLL to convert PDF to PDF/A. I know I kind of have to call the exported function of gsdll32.dll whose name is gsapi_init_with_args, but how do i pass the right arguments? BTW, ...

Linqy no matchy

Maybe it s something I m doing wrong. I m just learning Linq because I m bored. And so far so good. I made a little program and it basically just outputs all matches (foreach) into a label control. ...

热门标签