【发布时间】:2022-10-13 13:42:27
【问题描述】:
我有一个带有 LaunchSettings.json 的项目 看起来像这样
启动设置.json
{
"profiles": {
"Profile 1": {
"commandName": "Executable",
"executablePath": "D:\\work\\test.exe",
"commandLineArgs": "-compopath:D:\\Test\\TbTest\\Tw.TestImp\\TestImp\\bin\\Debug\\net4.8",
"nativeDebugging": true
}
}
}
但是当我查看 Main 时 commandlineArgs 搞砸了 argv1 "...\net" 已更改为 "...\net" 所以我的程序认为它是换行符。
如果它在 LaunchSettings 中包含 \n,它不会找到 Programm,则可执行文件路径也会发生同样的情况。
任何解决方案 对我来说听起来像是一个错误
编辑:
我将项目添加到 Github,以便每个人都可以尝试。 https://github.com/TorstenDB/LaunchSettings
它只发生在视觉工作室 2022
【问题讨论】:
-
嗨@TorstenB,你如何读取json文件数据?它在我这边工作得很好。
-
你读它是什么意思?我从 Visual Studio 2022 选择配置文件并开始调试。
-
嗨@TorstenB,请分享您的代码以及您在视觉工作室中添加手表的变量。
-
我在 github 上上传了项目,你可以下载它们并自己尝试。 AT Impl 刚刚使用 arg 调用了 TstTest.exe,您可以看到问题github.com/TorstenDB
-
我刚刚发现,它只是发生在 Visual Studio 2022 上。所以我将它报告给 Microsoft developercommunity.visualstudio.com/t/post/10169831
标签: visual-studio asp.net-core visual-studio-2022 csproj