我在.NET Core 2.2项目中有以下launchSettings.json文件:
{
"profiles": {
"ProfileName": {
"commandName": "Executable",
"executablePath": "dotnet",
"commandLineArgs": "pathtoexternalassembly.dll -p pathtomyassembly.dll"
}
}
}
想法是启动dotnet来运行带有-p pathtomyassembly.dll
参数的外部程序集,最终从我的程序集中运行代码。
问题:我无法在Rider中使用附加的调试器运行它
我可以试一下,它开始得很好。我可以用Ctrl+Alt+F5
手动附加调试器。
在Visual Studio中,我可以在附加调试器的情况下运行它。
当我在Rider中创建运行/调试配置.NET Executable
时,启动停滞,没有任何错误。
我错过了什么?
最后,我将它作为.Net可执行文件启动。
其想法是不显式提及dotnet,并且将工作目录设置为外部程序集。
因此,我的.Net可执行文件配置如下:
- 执行路径:path\to\external\assembly.dll
- 程序参数:-p路径\到\my\assembly.dll
- 工作目录:路径\到\外部\