[英]Visual Studio ASP.Net Application not starting when Target Platform is set to x64 instead of Any Cpu
我有一個.Net 5.0/Angular SPA(盡管將目標框架設置為 .NET Core 3.1 時問題完全相同),所有相關程序集項目都設置為目標 x64。
將應用程序本身的平台目標設置為“任何 CPU”並從 Visual Studio 開始調試時,一切都會按預期啟動和工作。 但是,當將應用程序的平台目標設置為“x64”時,我從 WebServer 得到的 Output 是:
Usage: dotnet [options]
Usage: dotnet [path-to-application]
Options:
-h|--help Display help.
--info Display .NET information.
--list-sdks Display the installed SDKs.
--list-runtimes Display the installed runtimes.
path-to-application:
The path to an application .dll file to execute.
就好像在沒有任何參數的情況下調用了 do.net 命令行工具一樣。
Visual Studio 使用的 do.net 版本似乎是正確的,我可以毫無問題地手動啟動 x64 編譯的應用程序(通過調用do.net application-name.dll
)。
我已經為此奮斗了三天,但離解決方案還差一英寸。 在啟動應用程序時查看/設置 Visual Studio 正在使用的命令會很有幫助,但我不知道如何執行此操作。
問題解決了。
我必須手動添加
"commandLineArgs": "run"
啟動設置。json。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.