开发者

Can Visual Studio 2010 Performance Analysis work with Windows Service written in C#

I'd like to use a memory profiler to determine if I have memory links in a fairly complicated windows service written in C#, that has a large number of running threads. If I loop the code in the service continuously repeating the same operations, its memory footprint grows continuously.

I was disappointed to find out that the Performance Analysis tools built into Visual Studio 2010 would not work with a Windows Service (or at least it didn't appear to be possible to use it with a Windows Service).

Does anyone know 开发者_StackOverflow中文版a way of getting the VS 2010 tools to work with a Windows Service?


The only workaround I know of is refactoring your service to be able to run as application as well as windows service based on a command line switch - see here for a detailed solution to this. In doing that you can now apply performance analysis when running as regular application and you do not have to modify your code base to run as Windows service once you are done.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜