Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Can a VS 4.0 framework app consume a VS 4.5 framework DLL?

Posted on 2014-03-13
4
Medium Priority
?
308 Views
Last Modified: 2014-03-19
I am building a DLL for my office and it needs to use Async (a 4.5 framework tool).  Many of our programs that use this DLL are 4.0 framework apps.  So can I put async in the DLL and still have those programs use the methods that have async in them (BTW, no 4.5 objects will be returned to the calling program)?
0
Comment
Question by:David L. Hansen
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 21

Accepted Solution

by:
Craig Wagner earned 2000 total points
ID: 39927801
Unless the machine on which the code is running has been upgraded to 4.5 then no, it won't work. The CLR has to be able to understand and execute the code in the assembly. If the execution environment only has 4.0 then you'll have to use one of the older approaches to doing asynchronous operations.
0
 
LVL 75

Expert Comment

by:käµfm³d 👽
ID: 39928350
This is total speculation, but the async and await keywords are just syntactic sugar for the compiler to create a state machine for you. Since async methods return Task<T>, and Task was introduced in .NET 4.0, it may be possible. It could be worth putting together a quick throw-away project to test.
0
 
LVL 15

Author Comment

by:David L. Hansen
ID: 39935618
I'm thinking that the machine running the consuming program would implement the DLL alright, even if that program was a 4.0 framework program, so long as the 4.5 framework was installed on that machine.

Sorry for the delay in responding guys.
0
 
LVL 15

Author Closing Comment

by:David L. Hansen
ID: 39940675
Thank you very much
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone 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

Entity Framework is a powerful tool to help you interact with the DataBase but still doesn't help much when we have a Stored Procedure that returns more than one resultset. The solution takes some of out-of-the-box thinking; read on!
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
Monitoring a network: how to monitor network services and why? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the philosophy behind service monitoring and why a handshake validation is critical in network monitoring. Software utilized …
We’ve all felt that sense of false security before—locking down external access to a database or component and feeling like we’ve done all we need to do to secure company data. But that feeling is fleeting. Attacks these days can happen in many w…

704 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