我正在寻找一种方法来达到我的控制台exe 的断点,该断点是从UWP包装项目中的fulltrustprocesslauncher启动的。 我看了下面的帖子(来自2017年),但是,我仍然无法使用Visual Studio 2019达到控制台exe断点。当我将打包项目设置为启动项目时,我只能达到UWP应用的断点(不是控制台exe )。 How to debug a .exe launched from FullTrustProcessLauncher
https://docs.microsoft.com/en-us/windows/msix/desktop/desktop-to-uwp-debug
到目前为止,我一直在分别调试控制台应用程序,这无法帮助调试 UWP和控制台exe之间的通信问题。
任何帮助将不胜感激。
当使用UWP应用作为启动项目并将控制台应用(fulltrust)作为“调试新实例”启动时,我无法使App服务连接正常工作。
connection = new AppServiceConnection();
connection.AppServiceName = "SampleInteropService";
//connection.PackageFamilyName = Package.Current.Id.FamilyName;
//i got PackageFamilyName by doing a console.WriteLine when i ran the app with package as start project
connection.PackageFamilyName = "XXXXX - XXX - XXX - XXX - XXXXXXX";
Console.WriteLine(connection.PackageFamilyName);
connection.RequestReceived += Connection_RequestReceived;
connection.ServiceClosed += Connection_ServiceClosed;
AppServiceConnectionStatus status = await connection.OpenAsync();
if (status != AppServiceConnectionStatus.Success)
{
//FAILS here
Console.WriteLine("Error: Something went wrong in initializing UWP connection from console side");
}