Unittest is throwing "Common language runtime Exception in an Invalid Program" using 4.8 Target Framework and 17.6.4 Visual Studio

TejaSai-Varma Borukati 0 Reputation points
2023-08-31T05:53:48.92+00:00

Team,

I had Created one unit test and added some dll references to it. my unit test calls one of the method of my referred dll, At some point I was getting "Common language runtime Exception in an Invalid Program" Exception. This Was occurring when we referred dll which built with release mode, if We refer dll built with debug mode - we are not seeing this issue. This might because of Optimize setting in project, if we made optimize to false in release mode, issue is not reproduced.

We are not seen this when we are using 4.6.1 Framework. After updating to framework 4.8 , we are getting this issue

Please Provide some helpful Information for above issue?

Thanks,

Teja Sai Varma.

ASP.NET Core
ASP.NET Core
A set of technologies in the .NET Framework for building web applications and XML web services.
4,400 questions
{count} votes