我的主.CS文件现在为空白

发布于 2025-02-10 12:06:49 字数 221 浏览 0 评论 0原文

我刚刚有一个Visual Studio Crash(2012-使用单元),现在我的 main.cs 我的项目中的文件显示为A blank 在Visual中打开时,工作室。

该文件本身仍然显示为134KB,因此不是空白吗?无论我做什么项目,该项目都找不到文件。.其他.cs文件都可以。

我无法找到任何备份。.我希望有某种方法可以读取文件并恢复代码。

I've just had a visual studio crash (2012 - Using Monogame) and now my main.cs file in my project shows up as a blank text file when opened in Visual studio.

The file itself still shows as 134kb so it isn't blank? No matter what I do the project cannot find the file .. every other .cs file is fine.

There is no backup that I can find .. I'm hoping there is some way of reading the file and recovering the code.

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

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

发布评论

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

评论(1

凝望流年 2025-02-17 12:06:49

单组没有main.cs文件。

我会假设是用户创建的。 main()函数在program.cs中。

我建议搬到VS 2022 Community Edition,它是免费的,单身3.8.1。

创建一个新项目,然后将所有类文件复制到其中,修改每个命名空间以匹配新名称。

复制您的内容源,并使用mgcb-editor添加它们。

Monogame does not have a main.cs file.

I will assume is is user created. The Main() function is in Program.cs.

I would suggest moving to VS 2022 Community Edition, it is free, and Monogame 3.8.1.

Create a new project and copy all of your class files into it, modifying the namespace of each to match the new name.

Copy your content sources and add them with the mgcb-editor.

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