English 中文(简体)
Error After Migration from .NET3.5 to .NET4.0
原标题:Error After Migrating from .NET3.5 to .NET4.0

我被宣布为:

    [Test]
    [ExpectedException(typeof(FaultException<ArgumentException>))]
    public void ShouldNotBeAbleToDeleteASystemList()

在2008年VS-3中,当我以3.5.net为对象时,由于该例外被推翻,所有工作罚款和检测通行证都是用的。

我已将解决办法移至2010年全球抽样调查,并将目标框架改变为4.0,而现在测试没有得出以下细节:

System.ServiceModel.FaultException`1[[System.ArgumentException, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]] was expected

当我向青少年发出实际信息时:

System.ServiceModel.FaultException`1[System.ArgumentException]: This is a system list and cannot be deleted (Fault Detail is equal to System.ArgumentException: Value does not fall within the expected range.).

我进行了检查,所有项目都以4.net为对象。

什么是错的?

最佳回答

对任何可能遭受这一问题的人而言。 造成这一错误的原因是,根据2.0网框架汇编的第三党部分推翻了这一例外,所投的例外情况是2.0元。 我的法典没有把这解释为同一类。 解决办法是将第3部分的组合改为:<supportRuntime ... />行至<startup> section。

问题回答

暂无回答




相关问题
handling exceptions IN Action Filters

Is there a better way to handle exceptions that occur inside an Action Filter itself in ASP .NET MVC? There re 2 ways I can think of at the moment. Using a try catch and setting the HTTP Status ...

既可捕获,又可举出例外。

我有一种办法,可以进入亚洲开发银行,因此,我国的亚行在多瑙河航道中的所有 st子都位于一个试捕区。 它正在追捕Kexception

Cross compiler exception handling - Can it be done safely?

I am doing some maintenance on a C++ windows dll library that is required to work with different VC++ compilers (as I don’t want to address different mangling schemes). I have already eliminated any ...

File Handling Issue

I am developing a tool in c#, at one instance I start writing into a xml file continuously using my tool,when i suddenly restart my machine the particular xml file gets corrupted, what is the reason ...

Watch a memory location/install data breakpoint from code?

We have a memory overwrite problem. At some point, during the course of our program, a memory location is being overwritten and causing our program to crash. the problem happens only in release mode. ...

Unit Test for Exceptions Message

Is there a simple (Attribute-driven) way to have the following test fail on the message of the exception. [TestMethod()] [ExpectedException(typeof(ArgumentException))] public void ExceptionTestTest() ...

热门标签