Is it possible to specify the .NET service pack in "supportedRuntime" in app.config?

I have an application that works fine on .Net 2.0 SP2 but does not work properly in RTM.NET 2.0. (FYI: it does not work when calling the managed DLL method, which is the shell for the native DLL for USB programming).

I know that you can support supported runtimes in app.config of a C # .NET application

<startup> <supportedRuntime version="v2.0.5727" /> <supportedRuntime version="v4.0" /> </startup> 

However, is it possible to also specify a specific version of a service pack?

Thanks!

Edit: I have now figured out which method fails between 2.0 and 2.0 SP2. This is WaitHandle.WaitOne (int), which was added in 2.0 SP1.

Advice for everyone who has a problem, the compiler does not say anything, but if you execute an executable file with a problematic runtime, it gives an exact error.

eg:.

 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 

Rogier

+6
c #
source share
2 answers

Here you can find a great explanation of why this is not possible. You can find the SO <answer here to suit your needs.

<supportedRuntime> doesn’t actually work that way, since environment 3.5 uses runtime 2.0. You can specify only the runtime, not the frameworks, and the element expresses only preference, not a requirement.

+1
source share

Try this (for .net 2.0 sp2):

 <supportedRuntime version="2.0.50727.1433" /> 

. version of the .NET Framework here.

0
source share

All Articles