When I run my Unit Tests, all tests pass, but instead of "Test run succeeded" or whatever the success message is, I get "Test run error" in the little bar that tells me how many of my tests pass, even though all my tests passed.
When i click the text, I'm taken to a page that tells me the following two things happened:
Warning: conflict during test run deployment: deployment item '[...]\Booking.Web.dll' directly or indirectly referenced by the test container [...]\Booking.Web.Tests.dll cannot be deployed to 'Booking.Web.dll' because otherwise the file '[...]\Booking.Web.dll' would override deployment item '[...]\Booking.Web.dll' directly or indirectly referenced by '[...]\Booking.Web.Tests.dll'
Error: Cannot initialize the ASP.NET project 'Booking.Web' Exception was thrown: The website could not be configured correctly; getting ASP.NET proccess information failed. Requesting 'http://localhost:54131/VSEnterpriseHelper.axd' returned an error: The remote server returned an error: (500) Internal Server Error.
I don't understand half of what it's complaining about. How do I get rid of these errors?
(And for reference: Booking.Web is an ASP.NET MVC 2 project, Booking.Web.Tests is a Test project, [...] is the full local path to the projects in my environment, in most of the cases above to the /bin/debug/ folder inside the Booking.Web project)
Update: As instructed, I looked for more info in Event Viewer. Here's what I found:
3008 A configuration error has occurred.
5/8/2010 2:26:15 AM
5/8/2010 12:26:15 AM
Could not load file or assembly 'Ninject.Web.Mvc, Version=22.214.171.124, Culture=neutral, PublicKeyToken=79764a4ef1548af1' or one of its dependencies. Strong name signature could not be verified. The assembly may have been tampered with, or it was delay signed but not fully signed with the correct private key. (Exception from HRESULT: 0x80131045) at
System.Web.Configuration.CompilationSection.LoadAssemblyHelper(String assemblyName, Boolean starDirective) at
System.Web.Configuration.CompilationSection.LoadAssembly(AssemblyInfo ai) at
System.Web.Compilation.BuildManager.GetReferencedAssemblies(CompilationSection compConfig) at
...stack trace in absurdum.
How to conditionally execute a jquery validation?
Edit and Continue does not Work in VS 2010 / ASP.Net MVC 2
specified size of td
You can read here about it.
Newbie question on MvcContrib TestHelpers
So there is no problems with Unit Tests.
How to reference other Areas?
This is code coverage problem..
How to intercept 401 from Forms Authentication in ASP.NET MVC?
Second thing - this warning is ok - never mind about it..
DataAnnotations - Disallow Numbers, or only allow given strings
Third thing - this error - this is the key problem..
Conflict between Jquery Validate and Asp.net MVC
There can be different problems - most common is that you should refference more assemblies.
To find out what exactly should be loaded you must go to Event Viewer and look at at Windows Logs->Application .
. This was happening because I was running MS-Test for multiple DLL's at once like so:.
When MS-Test was running this, it tried to take all the output DLL's from the tests and place them in out /Out directory of the test run.
mstest.exe /testcontainer:Tests.web.dll /testcontainer:Tests.svcs.dll /testcontainer:Tests.core.dll
In my case, Tests.svcs.dll and Tests.core.dll both referenced the same assembly (Core.dll) and therefore it tried to copy that DLL to the same spot twice (thus causing the warning).
. To resolve this, I separated the test runs for each assembly which gave each test run it's own /Out folder for output DLL's.
mstest.exe /testcontainer:Tests.web.dll mstest.exe /testcontainer:Tests.svcs.dll mstest.exe /testcontainer:Tests.core.dll