Share via


Unexpected error detected. Check the Tests Output Pane for details.

Question

Wednesday, March 27, 2013 3:10 PM

When I build any project in my solution, message "Unexpected error detected. Check the Tests Output Pane for details." appear on bottom on vs window. The test explorer window is empty (no tests, although later all works).

In output window, for show output from : Tests  - this error

System.ArgumentNullException: Value cannot be null. Parameter name: source   at Microsoft.VisualStudio.Shell.ValidateArg.NotNull[T](T arg, String parameterName)    at Microsoft.VisualStudio.Shell.ValidateArg.NotNullOrEmpty[T](IEnumerable`1 arg, String parameterName)    at Microsoft.VisualStudio.Shell.Interop.VSProjectExtensions.CompareNormalizedPath(String source, String target)    at Microsoft.VisualStudio.Shell.Interop.VSProjectExtensions.GetKeyOutputForIVsOutputGroup(IVsOutputGroup outputGroup)    at Microsoft.VisualStudio.Shell.Interop.VSProjectExtensions.GetProjectOutputPath(IVsProjectCfg2 projectConfig, String groupName)    at Microsoft.VisualStudio.Shell.Interop.VSProjectExtensions.GetKeyOutputForGroup(IVsSolutionBuildManager buildManager, IVsProject project, String groupName)    at Microsoft.VisualStudio.Shell.Interop.VSProjectExtensions.GetProjectOutputPath(IVsProject project, IServiceProvider serviceProvider)    at Microsoft.VisualStudio.TestWindow.VsAdapters.VsTestContainer.get_Source()    at Microsoft.VisualStudio.TestWindow.VsAdapters.VsTestContainer.CreateTimeStamp()    at Microsoft.VisualStudio.TestWindow.VsAdapters.VsTestContainer..ctor(ITestContainerDiscoverer discoverer, ILogger log, IVsProject project, IServiceProvider serviceProvider, IVsAppContainerUtilities appContainerUtilities)    at Microsoft.VisualStudio.TestWindow.VsAdapters.VsProjectOutputContainerDiscoverer.<get_TestContainers>b__0(IVsProject p)    at System.Linq.Enumerable.WhereSelectEnumerableIterator`2.MoveNext()    at System.Linq.Enumerable.WhereEnumerableIterator`1.MoveNext()    at System.Collections.Generic.List`1..ctor(IEnumerable`1 collection)    at System.Linq.Enumerable.ToList[TSource](IEnumerable`1 source)    at Microsoft.VisualStudio.TestWindow.Controller.TestContainerDiscovererExtension.GetSortedContainers(ITestContainerDiscoverer discoverer)    at Microsoft.VisualStudio.TestWindow.Controller.TestContainerProvider.GetContainersFromDiscoverer(ITestContainerDiscoverer discoverer)

Any suggests? thanks.

All replies (6)

Thursday, March 28, 2013 5:09 AM âś…Answered

Hello,

Thank you for your post.

Just to make the issue clear, what version of VS2012 do you work with? What type of test are you doing?

Do you get this issue during building the test project?

I suggest that you can try to recreate a new unit test project including a simple unit test and then build the test project to check if the issue still occurs.

If yes, I am afraid that the issue is related to your VS. You could locate to the IDE folder then run these commands to check if it can help.

Please open Windows Explorer, and navigate to <Visual Studio Installation Path>\Common7\IDE:

Devenv.exe /SafeMode: Launches the IDE in safe mode loading minimal windows.

Devenv.exe /ResetSettings: Restores the IDE's default settings, optionally resets to the specified VSSettings file.

Devenv.exe /ResetAddin: Removes commands and command UI associated with the specified Add-in.

Devenv.exe /ResetSkipPkgs: Clears all SkipLoading tags added to VSPackages.

If still no help, please try to repair/reinstall VS to check the result.

Also I did some research and find some links with the similar issue.

http://stackoverflow.com/questions/10159828/vs-11-beta-cannot-start-process-because-a-file-name-has-not-been-provided

If you get this issue after you upgrade VS from developer preview build to VS11 beta, in this case please refer to the following thread to check if it is useful:

http://social.msdn.microsoft.com/Forums/en-US/vstest/thread/4035d43f-8581-4c76-9fd1-18b90df7035e

You can update the results after trying my suggestions above.

Best regards,

Amanda Zhu [MSFT]
MSDN Community Support | Feedback to us
Develop and promote your apps in Windows Store
Please remember to mark the replies as answers if they help and unmark them if they provide no help.


Tuesday, April 2, 2013 8:25 AM

Hello,

Since we haven't heard from you for a long time, I temporarily close this case. I mark useful reply as answer. If you have any concerns, please feel free to reopen it or submit a new question.

Thanks for your understanding.

Best regards,

Amanda Zhu [MSFT]
MSDN Community Support | Feedback to us
Develop and promote your apps in Windows Store
Please remember to mark the replies as answers if they help and unmark them if they provide no help.


Friday, September 6, 2013 3:21 PM

kill all instances of vstest.discoveryengine.exe and vstest.executionengine.exe

restart visual studio


Monday, September 9, 2013 8:25 AM

Hello, 

I have the same issue as the original poster. I have just upgraded to the latest version of Visual Studio and SQL Server Data Tools and have reset all settings as you suggested. When I open the solution containing the unit tests, it builds fine... until I try to run the tests, or open the Test Explorer. Then I get the "Unexpected error detected. Check the Tests Output Pane for details" error. The stack trace is exactly as originally posted. Any ideas?


Tuesday, November 4, 2014 7:46 AM | 1 vote

Hi,

I have the same issue in the same environment.
The solution contains an Integration Services project.
As I unload it, Tests work.

Any ideas how to fix it?


Friday, May 20, 2016 4:03 PM

It's worked for me.Thanks Attilla