Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Use Async, Await with VS2013 Target - .NET 4

Tags:

c#

.net

I am working with a third party API that uses .NET 4. I would like to use Async/Await features in my class library. I installed Microsoft.Bcl.Async from NuGet. I have a few questions regarding deployment:

1) Upon installing Microsoft.Bcl.Async, I have a number of references added to my project (Microsoft.Threading.Tasks, Microsoft.Threading.Tasks.Extensions..). Also there is an app.config file that is created. What are the deployment requirements?

2) How would I deploy the app.config file for a class library that goes in the installation directory of the 3rd party app. Do I need to add xml from app.config to the application's config?

3) Do I need to install Microsoft.Bcl.Async on all projects that reference that project mentioned?

Environment:

Visual Studio Express 2013 .NET 4

like image 667
swiftcode Avatar asked Oct 06 '14 20:10

swiftcode


1 Answers

1) Upon installing Microsoft.Bcl.Async, I have a number of references added to my project (Microsoft.Threading.Tasks, Microsoft.Threading.Tasks.Extensions..). Also there is an app.config file that is created. What are the deployment requirements?

Deploy the dlls and the app.config.

2) How would I deploy the app.config file for a class library that goes in the installation directory of the 3rd party app. Do I need to add xml from app.config to the application's config?

Yes.

3) Do I need to install Microsoft.Bcl.Async on all projects that reference that project mentioned?

Possibly. As a best practice, install Microsoft.Bcl.Build in all your projects. That will generate build warnings notifying you if you need to install references to your other projects.

like image 82
Stephen Cleary Avatar answered Nov 07 '22 17:11

Stephen Cleary