Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Unable to profile tests in Visual Studio 2013 when assembly path contains spaces

Whenever I try to profile a test in Visual Studio 2013, by Right-Clicking on the test in Test Explorer, and selecting the "Profile Test" option, the test successfully executes (and passes), but the performance analysis fails with the following messages.

File contains no data buffers
File contains no data buffers
Analysis failed

I am using Windows 7 64.

I can successfully profile the application itself (both Instrumentation and Sampling) with no problems.

like image 383
Todd Bowles Avatar asked Jan 27 '14 08:01

Todd Bowles


2 Answers

So it turns out the problem is that if any of the assemblies that you hope to instrument over have spaces in their names, the "Profile Test" option fails to instrument them, which in turn means that no data is collected (because "Profile Test" appears to only use Instrumentation).

Obviously the workaround is to just not have assemblies with spaces in their names.

I logged a bug on Microsoft Connect.

like image 92
Todd Bowles Avatar answered Sep 23 '22 18:09

Todd Bowles


Try to change the vstest processor architecture to x86 on Visual Studio.

It worked for me. I'm using VS2015.

Test > Test Settings > Default processor architecture > x86

like image 34
Felipe Souto Curvelo Avatar answered Sep 24 '22 18:09

Felipe Souto Curvelo