我有一个Windows应用商店应用程序(C#+ XAML),并希望为它创建一些单元测试.我在我的解决方案中为此创建了单元测试项目,默认测试方法正常.然后我添加了我的项目作为单元测试项目的参考,测试停止了工作:
------ Discover test started ------
========== Discover test finished: 1 found (0:00:00,8748072) ==========
------ Run test started ------
Updating the layout...
Copying files: Total 2 mb to layout...
Registering the application to run from layout...
Deployment complete. Full package name: "58d19822-a649-46ba-b3fd-36c60b2709d7_1.0.0.0_neutral__t4zwj4xd20b1w"
Failed to activate Windows Store app unit test executor. Error: The remote procedure call failed.
========== Run test finished: 0 run (0:00:05,0596667) ==========
Run Code Online (Sandbox Code Playgroud)
我google了很多,发现一个解释错误的线程可能在App.xaml中,实际上我可以跟踪它到这个TextBlock:
<TextBlock Grid.ColumnSpan="2" controls:HighLightString.FullText="{Binding Path=FullName}" controls:HighLightString.SelectedText="{Binding DataContext.QueryText, ElementName=resultsPanel}" controls:HighLightString.FgColor="{StaticResource SAPHighlightColor}" Style="{StaticResource TileTitleTextStyle}" Margin="20,0,0,0" TextTrimming="WordEllipsis"/> …Run Code Online (Sandbox Code Playgroud)