Question

I converted my .net application to .net 4.0 and because im using async/await I installed NuGet packages Async for .Net 4 and dependencies Microsoft BCL...

When I build my application, everything goes well but when I move my app .exe to correct environment I get the error:

System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.Threading.Tasks, Version=1.0.12.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a or one of its dependencies.

If I include Microsoft.Threading.Tasks.dll to my applicatin directory everything works well (this .dll is copied to my app build directory).

So the question is do I need to include this Microsoft.Threading.Tasks.dll to my app installer or Is there way to bundle this to my app .exe?

Was it helpful?

Solution

When you build your app there will be a few DLL's in the output folder. Your exe potentially needs all of the DLL's in that folder in able to run.

You should include all of the dll's with the installer that the compiler puts in to the output directory.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top