我有一个在.Net 2.0 SP2上运行良好的应用程序,但无法在.NET 2.0 RTM上正常运行.(仅供参考:当调用方法为托管DLL时,它会失败,该DLL是用于USB编程的本机DLL的包装器).
我知道你可以在C#.NET应用程序的app.config中提供支持的运行时
<startup>
<supportedRuntime version="v2.0.5727" />
<supportedRuntime version="v4.0" />
</startup>
Run Code Online (Sandbox Code Playgroud)
但是,是否也可以指定特定的Service Pack版本?
谢谢!
编辑:我现在确定哪个方法在2.0和2.0 SP2之间失败.它是在2.0 SP1中添加的WaitHandle.WaitOne(int).
对于遇到问题的其他人来说,编译器没有说什么,但如果你使用有问题的运行时确定可执行文件,它确实会给你确切的错误.
例如:
Warning: System.MissingMethodException: Method not found: 'Boolean System.Threading.WaitHandle.WaitOne(Int32)'. while resolving 0xa0000e1 - System.Threading.WaitHandle.WaitOne.
11/11/2010 01:54:07 [3620]: Method not found: 'Boolean System.Threading.WaitHandle.WaitOne(Int32)'. while compiling method XXX
Run Code Online (Sandbox Code Playgroud)
罗吉尔