可以在Visual Studio 2022中运行C#Web API

发布于 2025-02-01 09:10:16 字数 161 浏览 4 评论 0原文

我正在尝试运行用C#编写的Web API,在Visual Studio Code 2022中,但我一直在遇到此错误

在未知模块中发生了一个未手动的例外。 无法加载文件或汇编'系统。系统找不到指定的文件。

I am trying to run a web API written in C#, in Visual Studio code 2022 but I keep getting this error

An unhandled exception of type 'System.IO.FileNotFoundException' occurred in Unknown Module.
Could not load file or assembly 'System.Runtime, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

淡紫姑娘! 2025-02-08 09:10:16

我遇到了完全相同的错误,事实证明,Visual Studio只需要更新即可。

更新并重新启动了应用程序,然后消失了。

I was having the exact same error, it turned out Visual Studio just needed an update.

Updated it and restarted the app and it went away.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文