RegAsm failing for a .NET 4.0 assembly using Microsoft.Bcl.Async with the following message:
RegAsm : error RA0000 : Could not load file or assembly
The solution I have come up with is a hack:
copied RegAsm.exe and RegAsm.exe.config from C:\Windows\Microsoft.NET\Framework\v4.0.30319\RegAsm.exe to a local folder where MyAssembly.dll is;
edited RegAsm.exe.config to look like this:
RegAsm.exe /codebase MyAssembly.dll works fine as expected.Interestingly, useLegacyV2RuntimeActivationPolicy="true" has already been there in the standard RegAsm.exe.config, but alone it did not help.
I think this is the same bug reported here: https://connect.microsoft.com/VisualStudio/feedback/details/789318/asyncpack-system-io-fileloadexception-could-not-load-file-or-assembly-system-threading-tasks-version-1-5-11-0.