rbasniak
rbasniak

Reputation: 4964

Unit test exception in VS2015 Community

I created a new unit test project in VS 2015 Community, created a simple test method:

int a = 1;
int b = 2;

int c = a + b;

Then when I right click this test in the Test Explorer and select 'Debug Selected Test' I get the following exception:

System.IO.FileNotFoundException occurred Message: Exception thrown: 'System.IO.FileNotFoundException' in mscorlib.dll Additional information: Não foi possível carregar arquivo ou assembly 'file:///C:\PROGRAM FILES (X86)\MICROSOFT VISUAL STUDIO 14.0\COMMON7\IDE\COMMONEXTENSIONS\MICROSOFT\TESTWINDOW\Extensions\Microsoft.VisualStudio.TestPlatform.Extensions.VSTestIntegration.resources.dll' ou uma de suas dependências. O sistema não pode encontrar o arquivo especificado.

The dll file is there, but there's not .resources.dll file in that path.

Does anyone know why is it happening or how to solve it? I could just ignore, but the console is getting very messy with many of this exception being thrown.

Upvotes: 1

Views: 700

Answers (2)

Holger
Holger

Reputation: 21

I ran into the same problem after running my tests a few times. I even tried running empty test methods, but the exception kept getting thrown. Creating a new solution and adding the existing projects worked for me.

Upvotes: 0

Tommaso Cerutti
Tommaso Cerutti

Reputation: 495

I put the 3 code rows written in a test method in an empty project and it runs with Passed result and with no exception so the problem is not in code but in your Setup

If there is not that file in that path I think you already get the point :-)

Upvotes: 3

Related Questions