[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Runtime version in 3rd party controls

Posted on 2011-05-06
4
Medium Priority
?
515 Views
Last Modified: 2012-06-27
Hi,

I'm starting my first .Net WinForms application and I'm using two 3rd party components suite:
- DevExpress XtraEditors, the free short version
- PureComponets, got it on sale for $19

Both DevExpress dlls and PureComponents dlls show "Runtime Version" as v2.0.50727 in the properties windows.
All their dll's.

For PureComponents I can't speak a lot... actually nothing... but I liked the components and the price, with source code included was unbeatable.

Now, for DevExpress.... eventhough they say they support VS 2010, they're components are still a .net 2.0 binaries?

Well, if in my Winforms Application I set to target .Net 4.0... and this components are 2.0.. does it mean my users will have to have both 2.0 and 4.0 for their applications to run?
Will my application be using both .Net frameworks while the application is running?
Would it be better if I just target my application to use .Net 2.0, too?
(I don't think I'm using anything special right now that could not be available if I change it the older version)
0
Comment
Question by:fischermx
  • 2
4 Comments
 
LVL 13

Assisted Solution

by:iHadi
iHadi earned 400 total points
ID: 35710472
Net 3.5/2.0 Applications do not automatically run on the .Net 4.0 runtime. You have to specify explicitly for your application that it should run on .Net 4.0 in your App.config by adding:

<configuration>
  <startup>
    <supportedRuntime version="v4.0" />
  </startup>
</configuration>

In case you have third party components you also have to mark them as being ready for 4.0:

<configuration>
   ...
   <runtime>
      ...
      <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
         ...
         <dependentAssembly>
            <assemblyIdentity name="AssemblyName" publicKeyToken="31bf3856ad364e35"/>
            <bindingRedirect oldVersion="3.5.0.0-3.5.0.0" newVersion="4.0.0.0"/>
         </dependentAssembly>
         ...
      </assemblyBinding>
      ...
   </runtime>
   ...
</configuration>
0
 
LVL 33

Expert Comment

by:Todd Gerbert
ID: 35710854
I'm pretty sure that the .Net releases include all the previous versions - so if a user has .Net 4.0 installed they should be able to run applications built against 2.0, 3.0, 3.5, 4.0.  So no: your users won't need to install both runtimes separately, they'll just need to have .Net 4.0.

And you're going to want to keep your application targeted to .Net 4.0 - there are some performance enhancements in .Net 4.0 that'll help your application run a little bit quicker.
0
 
LVL 33

Accepted Solution

by:
Todd Gerbert earned 1600 total points
ID: 35712943
Okay, I made a simple test by building a Forms application targeted to .Net 4.0, and a Class Library targeted to .Net 2.0; the forms application references the class library and uses one of it's methods.

Then I installed only .Net Framework 4.0 on a clean install of Windows XP and the application ran fine. However, I could not run a application that was targeted only to .Net 2.0 - so my earlier comment was half-correct.

But the end result is that if your application is targeted to .Net 4.0, even if the third party component was written against an earlier .Net Framework, it should run fine on users' machines who have only .Net 4.0 installed.
0
 
LVL 1

Author Closing Comment

by:fischermx
ID: 35725901
Thank you very much!
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article is for Object-Oriented Programming (OOP) beginners. An Interface contains declarations of events, indexers, methods and/or properties. Any class which implements the Interface should provide the concrete implementation for each Inter…
This article aims to explain the working of CircularLogArchiver. This tool was designed to solve the buildup of log file in cases where systems do not support circular logging or where circular logging is not enabled
this video summaries big data hadoop online training demo (http://onlineitguru.com/big-data-hadoop-online-training-placement.html) , and covers basics in big data hadoop .
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an anti-spam), the admin…
Suggested Courses
Course of the Month19 days, 22 hours left to enroll

872 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question