Version 14.0.25420.01 Update 3:
Steps to Reproduce:
[TestClass]
public class Class1
{
public dynamic GetResponse()
{
return null;
}
public async void GetResponseTest()
{
var result = await GetResponse();
}
}
Expected Behavior:
May be this is not the correct way of coding. But the other project types (class library project) compile successfully without an error.
Expecting to compile same as the class library project or give a compilation error with details to fix.
Actual Behavior:
Compile error only with the description.
"csc.exe" exited with code -2146232797
Thanks for taking the time to report this. Unfortunately I've been unable to reproduce this behavior. Tried on both Dev14 update 3 and Dev15 RTM but can't get the crash you've reported. Likely an issue with the set of references, compilation options being passed here.
Is there a minimal repro project that you can share out?
I could repro this with both VS2015.3 and VS2017
Microsoft.CodeAnalysis.CSharp.SyntheticBoundNodeFactory+MissingPredefinedMember: C:\UnitTestProject1\UnitTestProject1\UnitTest1.cs(17,24): error CS0656: Missing compiler required member 'Microsoft.CSharp.RuntimeBinder.CSharpArgumentInfo.Create'
The fix is to make sure Microsoft.CSharp.dll is part of all references passed to csc.exe (seems to be missing in UnitTest template)
@0xd4d ah good catch. Indeed that is the step I was missing.
This looks fixed in the latest internal build of Visual Studio. If there is no Microsoft.CSharp.dll, I get an error, but not a crash. Once reference is added, build succeeds.
In RTM there is a crash when there is no reference. Once reference is added the build succeeds.
TODO: add a test.