Does anyone know if it is possible to "Bin deploy" the Async CTP?
Since a large part of Async is basically a compiler trick, I figured that precompiling my application and deploying it to a server without Async CTP installed might work. Unfortunately, it doesn't seem to be this simple. I get the following error message when I try to call an async method:
Task<Result> task = _checker.CheckAsync(input);
The type initializer for 'System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1' threw an exception.
This is not really the type of error that I would expect, but perhaps there are some replacement assemblies that I could deploy to my Bin directory to fix this? I cannot install the Async CTP on this (production) machine.
Update: I've included the InnerException details as well:
System.MethodAccessException: Attempt by security transparent method 'System.Runtime.CompilerServices.AsyncTaskMethodBuilder
1<TResult>..cctor()' to access security critical method 'System.Threading.Tasks.TaskScheduler.add_UnobservedTaskException(System.EventHandler
1)' failed. at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1..cctor()
This appears to be a medium trust issue, and not so much an async issue?