Ask a questionAsk a question
 

AnswerProblems with Performance tools

  • Friday, November 18, 2005 6:59 PMAndrewEames Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    Im having a few problems with the performance tools

    I created a performance session that uses sampling  - that seemed to work ok

    When I create one using instrumentation, when I launch it, I get the message that "A project with an Output Type of Class Library cannot be started directly". Well its not a class library project - its the same one that worked for sampling!

    Once I get this error I cannot find anyway of getting the Launch button to be enabled again - the only way I could get it to be enabled again was to restart Visual Studio

    And how do you delete a performance session from the treeview??

      Andrew

Answers

  • Monday, January 09, 2006 6:42 PMIan Huff Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     Answer

    Andrew,

    I'm a little concerned about this intermittant behaviour, but I'm glad that it seem to be working for now. When we launch the profiler (in project mode) we are depending on the build system to tell us if the project cannot be launched directly (such as if it is a DLL project). My guess for this situation would be that the EXE project that you were working with had some issue with its project file and was reporting an incorrect project type to the profiler on launch. Unfortunatly this is a little tricky for us to debug, as the error is being generated outside of the profiler code base.

    So the best answer that I have for now was that you were seeing some corruption with the project file of your EXE project. Please inform me if you start seeing this issue again and I'll do what I can to debug.

    Thanks much,

    Ian

All Replies

  • Monday, November 21, 2005 4:03 PMIan Huff Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    Andrew,

       In the instrumentation project I would make sure which of your profiling targets you have selected to launch. Under the targets folder the project or binary that you have selected to launch is marked with a green arrow. Try checking your binaries and projects to make sure that you are launching an .exe or exe project and not a .dll or .dll project. You can mark or unmark a binary or project as launch by right clicking on it and selecting "launch."

       You can remove a performance session by selecting it and pressing the delete key. Or by selecting "remove" from its right click context menu.

    Ian
  • Monday, November 21, 2005 4:26 PMAndrewEames Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    It *is* all set up correctly - if I do Add Target Binary instead of Add Target Project things seem to work fine

    The problems with removing projects only seem to happen after I get the error message after launching my project that was added with Add Target Project - once that happens, I can no longer remove targets or projects or launch anything
      Andrew
  • Friday, December 16, 2005 4:47 PMIan Huff Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     

    Hey Andrew,

        Sorry about the slow response to this, it ended up dropping off my radar as when I saw "if I do Add Target Binary instead of Add Target Project things seem to work fine" I thought that your question had been answered and I dropped the thread. Sorry about that.

    So I'm still  having a little trouble with parsing out exactly what are the steps that cause this issue. Here is what is sounds like to me:

    1. Create a performance session using sampling

    2. Add your target project and everything works as planned

    3. Create another performance session using instrumentation mode

    4. Add your target project to that session

    5. The session give you the "Unable to launch dll" error

    Is that the order of events that you are seeing? Or is there some other steps in there as I am unable to get this issue to repro myself.

     

    ~Ian

  • Friday, December 16, 2005 5:10 PMAndrewEames Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     

    I just tried it again

    1. Tools/Performance Tools/New Performance session

    2. Right click on Targets, select Add Project Target, select my project (its an exe project) (My solution has lots of projects)

    3. Right click on Performance1/ - Select Properties/General/Instrumentation

    4. Right click on Performance1/ Launch and I get the dialog

    "A project with an Output Type of Class Library can not be started directly"

     

      Andrew

     

  • Thursday, January 05, 2006 4:45 PMRobert Conde Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     

    Hi Andrew,

       I'm experiencing the same problem - ever find a solution?

  • Thursday, January 05, 2006 4:49 PMAndrewEames Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     

    Nope - I guess just using Add Target Binary is a workaround

      Andrew

  • Thursday, January 05, 2006 6:00 PMIan Huff Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     

    Hey Guys,

    The issue that we are having is that we have been unable to repro this issue in any form. So the best that we can offer as of now is to use the workaround of adding the target as a binary instead of a project. Since two people now seem to be having the same problem perhaps we can narrow down the cause a little better.

    Are both of you using solutions with a large number of projects as Andrew described?

    What type of executable projects (when you did File->New->Project what project did you select) are you both using?

     

    Thanks,

    Ian

  • Thursday, January 05, 2006 7:00 PMAndrewEames Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     

    My solution has 14 projects -

    1 c# application

    4 c# library

    3 c# unit test

    1 C++ Managed library

    1 C++ unmanaged library

    1 C++ unit test

    3 Makefile

    The target project is the c# application

      Andrew

  • Monday, January 09, 2006 4:30 PMAndrewEames Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     

    Well I just tried it again today and today it works!

      Andrew

  • Monday, January 09, 2006 6:42 PMIan Huff Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     Answer

    Andrew,

    I'm a little concerned about this intermittant behaviour, but I'm glad that it seem to be working for now. When we launch the profiler (in project mode) we are depending on the build system to tell us if the project cannot be launched directly (such as if it is a DLL project). My guess for this situation would be that the EXE project that you were working with had some issue with its project file and was reporting an incorrect project type to the profiler on launch. Unfortunatly this is a little tricky for us to debug, as the error is being generated outside of the profiler code base.

    So the best answer that I have for now was that you were seeing some corruption with the project file of your EXE project. Please inform me if you start seeing this issue again and I'll do what I can to debug.

    Thanks much,

    Ian

  • Monday, January 09, 2006 7:14 PMAndrewEames Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     

    I'm sorry, I confused myself - I  picked sampling which *does* work - I am still in the same situation - instrumentation does not work - sorry for the confusion

      Andrew

  • Thursday, October 08, 2009 11:42 PMCleverCoder Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    I have also been seeing this behavior, for some time. It was just now that I finally gave in and decided to search the web.

    I have actually had a lot of difficulty getting the performance tools within Visual Studio to ever work right. I have pretty much resorted to just using DotTrace and/or the free EQATEC tools. Please, MS, improve the performance tools robustness to work with complex solutions!

    (BTW< our soution has about 20 or so projects, some C++, some C#...)

    -Sean