dotTrace & dotMemory 10.0.2 - Can't start profiling from Visual Studio for VSTO projects
Answered
Dear JetBrains Team,
Currently it isn't possible to start the profiling (dotTrace & dotMemory 10.0.2) from Visual Studio when the startup project is a VSTO project (Office Add-In).
We tried it via:
- "Run Startup Configuration Performance / Memory Profiling"
- "Run Application Performance / Memory Profiling"
Both profilers give us the same error:
You can reproduce this by:
- Start Visual Studio 2015
- Create new project of type "Excel 2013 and 2016 VSTO Add-in"
- Press Start / F5
You'll see that Visual Studio will properly start Excel - Try to start the dotTrace / dotMemory profiling from Visual Studio
Error message "invalid executable file"
Could you please have a look on this?
Thank you very much & best regards,
Patrik
Please sign in to leave a comment.
Hello Patrik,
dotTrace and dotMemory can't detect VSTO projects automatically without making some changes in our products because output type is class library and there is no startup object for it.
I have created request about that: https://youtrack.jetbrains.com/issue/PROF-488
You're welcome to comment or vote for it.
Nevertheless, you can start profiling your Add-In. There are 3 ways to do that:
1. Attach to Excel process.
Start debugging your project in Visual Studio or start it without debugging. Open profile application dialog (ReSharper | Profile | Run Application Memory or Run Application Memory Performance Profiling), select EXCEL.EXE process in Attach to Process list and press run. Profiler should attach to the process.
2. Run global profiling.
Open profile application dialog (ReSharper | Profile | Run Application Memory or Run Application Memory Performance Profiling), select .NET Process in the left column and click Run. You get the message "The profiler is ready! Now you can launch any .NET application" for dotMemory or "Waiting for managed application to start..." for dotTrace. Profiler should run profiling right after you start your application.
3. Run profiling excel.exe as a standalone application.
You should save changes and build your project manually. Then select Standalone (instead .NET Process), specify excel.exe application path in the right part of window and run profiling session.