标题: LoadRunner录制.net的脚本回放报Error: Failed to compile virtual user. [打印本页] 作者: 永远的测试 时间: 2008-2-19 16:04 标题: LoadRunner录制.net的脚本回放报Error: Failed to compile virtual user. 我用LoadRunner9.0录制cs架构的应用,应用的客户端为C#做的,脚本可以正常录制,但回放是报错,错误信息如下:
Error: Failed to compile virtual user.
Notify: __________________________________________________
Notify: Project "C:\Documents and Settings\yaoliming.WONDERS_FILES\Local Settings\Temp\noname6\Script.sln" (Build target(s)):
Notify:
Notify: __________________________________________________
Notify: Project "C:\Documents and Settings\yaoliming.WONDERS_FILES\Local Settings\Temp\noname6\Script.sln" is building "C:\Documents and Settings\yaoliming.WONDERS_FILES\Local Settings\Temp\noname6\Script.csproj" (default targets):
Notify:
Notify: vuser_init.cs(36,12): warning CS1030: #warning: ': Code Generation Error'
Error: vuser_init.cs(42,4): error CS0103: The name 'NetworkCredential_1' does not exist in the current context
Error: vuser_init.cs(45,4): error CS0103: The name 'NetworkCredential_1' does not exist in the current context
Error: vuser_init.cs(48,4): error CS0103: The name 'NetworkCredential_1' does not exist in the current context
出错的脚本为:
lr.log("Event 5: NetworkCredential_1.UserName = \"anonymous\";");
NetworkCredential_1.UserName = "anonymous";