我的主.CS文件现在为空白
我刚刚有一个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 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
单组没有
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 inProgram.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
.