扩展名为xapping的文件是什么意思?

时间:2010-07-12 09:32:28

标签: silverlight

当我运行Silverlight单元测试时,我得到First Chance HttpException,位于以下堆栈跟踪:

System.Web.dll!System.Web.StaticFileHandler.GetFileInfo(string virtualPathWithPathInfo, string physicalPath, System.Web.HttpResponse response) Line 87  C#
System.Web.dll!System.Web.StaticFileHandler.ProcessRequestInternal(System.Web.HttpContext context, string overrideVirtualPath) Line 507 + 0x18 bytes    C#
System.Web.dll!System.Web.DefaultHttpHandler.BeginProcessRequest(System.Web.HttpContext context, System.AsyncCallback callback, object state) Line 108  C#
System.Web.dll!System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() Line 3389 + 0x14 bytes   C#
System.Web.dll!System.Web.HttpApplication.ExecuteStep(System.Web.HttpApplication.IExecutionStep step, ref bool completedSynchronously) Line 2239    C#
System.Web.dll!System.Web.HttpApplication.ApplicationStepManager.ResumeSteps(System.Exception error) Line 3699 + 0x35 bytes C#
System.Web.dll!System.Web.HttpApplication.ResumeSteps(System.Exception error) Line 2323 C#
System.Web.dll!System.Web.HttpApplication.System.Web.IHttpAsyncHandler.BeginProcessRequest(System.Web.HttpContext context, System.AsyncCallback cb, object extraData) Line 1358 C#
System.Web.dll!System.Web.HttpRuntime.ProcessRequestInternal(System.Web.HttpWorkerRequest wr) Line 1606 + 0x15 bytes    C#
System.Web.dll!System.Web.HttpRuntime.ProcessRequestNow(System.Web.HttpWorkerRequest wr) Line 2299  C#
System.Web.dll!System.Web.HttpRuntime.ProcessRequestNoDemand(System.Web.HttpWorkerRequest wr) Line 2281 C#
System.Web.dll!System.Web.HttpRuntime.ProcessRequest(System.Web.HttpWorkerRequest wr) Line 2265 C#
WebDev.WebHost40.dll!Microsoft.VisualStudio.WebHost.Request.Process() + 0x17c bytes 
WebDev.WebHost40.dll!Microsoft.VisualStudio.WebHost.Host.ProcessRequest(Microsoft.VisualStudio.WebHost.Connection conn) + 0x6c bytes    
[Appdomain Transition]  
WebDev.WebHost40.dll!Microsoft.VisualStudio.WebHost.Server.OnSocketAccept(object acceptedSocket) + 0x83 bytes   
mscorlib.dll!System.Threading.QueueUserWorkItemCallback.WaitCallback_Context(object state) Line 1507 + 0xb bytes    C#
mscorlib.dll!System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, object state, bool ignoreSyncCtx) Line 441 + 0xd bytes    C#
mscorlib.dll!System.Threading.QueueUserWorkItemCallback.System.Threading.IThreadPoolWorkItem.ExecuteWorkItem() Line 1486 + 0x23 bytes   C#
mscorlib.dll!System.Threading.ThreadPoolWorkQueue.Dispatch() Line 974   C#
mscorlib.dll!System.Threading._ThreadPoolWaitCallback.PerformWaitCallback() Line 1341 + 0x6 bytes   C#
[Native to Managed Transition]  

错误的本质是缺少文件“/ClientBin/Shunra.Common.Test.SL.xapping”,其中Shunra.Common.Test.SL是我的Silverlight单元测试应用程序。物理路径是“C:\ dev \ windows \ Common \ Shunra.Common.Test.SL.Web \ ClientBin \ Shunra.Common.Test.SL.xapping”

这些xapping文件是什么?

感谢。

1 个答案:

答案 0 :(得分:1)

目前,工具箱内的整个测试框架非常原始。 在初始化SilverlightTestService期间,调用“验证”服务器端是否存在某些Web服务:

    public void Verify(Action success, Action failure)
{
    new WebTestService(this.ServiceUri).CallMethod("ping", delegate (ServiceResult result) {
        if ((result != null) && result.Successful)
        {
            success();
        }
        else
        {
            failure();
        }
    });
}

你可以看到那个“ping”结合this.ServiceUri是完整的xap路径,给出了.xapping废话。 目前,SL Toolkit单元测试框架充满了这样的松散目标。