求助:.net user 在vs2010中编译,在返回到lr中的运行问题。
我的lr11+patch2,先建立。net user,在再vs2010里编辑,将dll引用进来。但是有一个xml的配置文件,在vs2010里应该是自己能找到的,但编辑完了,在lr中在进行运行,出如下的错,接下来怎么弄了呢?请教各位大侠!!错误信息一:
Error: Failed to compile virtual user.
Notify: Script.sln(1): Solution file error MSB5014: File format version is not recognized.MSBuild can only read solution files between versions 7.0 and 9.0, inclusive.
Warning: Extension DotnetExtensionReplay.dll reports error -1 on call to function ExtPerProcessInitialize
Error: Thread Context: Call to service of the driver failed, reason - thread context wasn't initialized on this thread.
错误信息二:这个错误信息是将loadrunner里的2个dll using了下。报的错。
Virtual User Script started at : 2012-10-16 09:02:23
Starting action vuser_init.
Ending action vuser_init.
Running Vuser...
Starting iteration 1.
Starting action Action.
Error: Action.cs(20): System.ArgumentNullException: Value cannot be null.
Parameter name: str
at System.Security.Permissions.FileIOPermission.HasIllegalCharacters(String[] str)
at System.Security.Permissions.FileIOPermission.AddPathList(FileIOPermissionAccess access, AccessControlActions control, String[] pathListOrig, Boolean checkForDuplicates, Boolean needFullPath, Boolean copyPathList)
at System.Security.Permissions.FileIOPermission..ctor(FileIOPermissionAccess access, String path)
at System.Uri.ParseConfigFile(String file, IdnScopeFromConfig& idnStateConfig, IriParsingFromConfig& iriParsingConfig)
at System.Uri.GetConfig(UriIdnScope& idnScope, Boolean& iriParsing)
at System.Uri.InitializeUriConfig()
at System.Uri.InitializeUri(ParsingError err, UriKind uriKind, UriFormatException& e)
at System.Uri.CreateThis(String uri, Boolean dontEscape, UriKind uriKind)
at System.Uri..ctor(String uriString, UriKind uriKind)
at System.Xml.XmlResolver.ResolveUri(Uri baseUri, String relativeUri)
at System.Xml.XmlUrlResolver.ResolveUri(Uri baseUri, String relativeUri)
at System.Xml.XmlTextReaderImpl..ctor(String url, XmlNameTable nt)
at System.Xml.XmlTextReader..ctor(String url, XmlNameTable nt)
at System.Xml.XmlDocument.Load(String filename)
at WebServcieEnvoke.Util.InitConfig()
at Script.VuserClass.Action() in D:\打印申请提交脚本3\脚本3_打印申请提交20121015\Action.cs:line 20
Abort was called from an action.
Ending Vuser...
Starting action vuser_end.
Ending action vuser_end.
Vuser Terminated.
脚本代码:
//---------------------------------------------
//Script Title :
//Script Description:
//
//
//Recorder Version :
//---------------------------------------------
namespace Script
{ using WebServcieEnvoke;
public partial class VuserClass
{
public int Action()
{
Util.InitConfig();//调用配置文件cfg.xml
string filePath = "D:\\temp\\test.pdf";
int secLevelValue = 0;
string originalName = "test.pdf";
string sqr = "qinhg";
string pointArgVal = "14|8042-个人版";
string printerArgVal = "21|Adobe PDF";
string secLevel = "0,0,非密";
WebServcieEnvoke.Service.ProcessWebServiceClient wsClient = new WebServcieEnvoke.Service.ProcessWebServiceClient();
//上传文件
string[] fileUploadRet = wsClient.UploadFileToServer(filePath, secLevelValue, originalName, sqr, "", "", 0, 1);
//启动流程
string[] startResult = wsClient.StartProcess("qijp", "测试",
pointArgVal, printerArgVal, originalName + "|" + fileUploadRet, secLevel, "", "1", "1", "0", "1", "1", "1", "1");
return 0;
}
}
}
页:
[1]