现假设需要测试的exe为:a.exe
CLR Profile 勾选Allocation和Calls
start Application
exe执行完毕。
再点一次Start Application弹出对话框
the process you are profiling is still running:
do you want to terminate it and optionaly save the profile
选择yes
继续弹出对话框:
you staill have a profile for a.exe
do want to save it?
选择yes
默认目录保存
弹出对话框
cannot rename log file to 目录.log
求解
从 CLRProfiler 的源码看
try
{
File.Move(logFileName, saveFileDialog.FileName);
}
catch
{
MessageBox.Show(this, "Cannot rename log file " + logFileName + " to " + saveFileDialog.FileName, "Failure");
return;
}
应该是原文件处于打开状态,无法直接移动,建议先用默认文件名保存,然后复制出来