Reputation: 9583
I am looking to rent a server that has IIS 7.5 and .NET 4.0 installed. Is it possible somehow to use .NET 4.5 features (async for example), perhaps by including the respective DLLs in the bin folder or some other way?
Thank you very much for your time and help,
Richard Hughes
Upvotes: 2
Views: 162
Reputation: 108790
You can't use .net 4.5 features on .net 4.0.
Luckily for you, async-await
is mainly a C# 5.0 feature, and less a .net 4.5 feature. You can use the Async Targeting Pack to use this C# 5.0 feature on .net 4.0 (with some minor changes compared to .net 4.5). Check my related question: Using async-await on .net 4
Upvotes: 2
Reputation: 10012
I would advise against that, if you are renting a server then I would assume you have full access to it? In that case simply install .net 4.5 on the server as well.
Despite the .5 change to the name it's not a simple change the dll's and get different feature set style of release.
So in simple terms, no. You will need to install .net 4.5 to get those features.
Upvotes: 3