[英]Visual Studio 2012, can not load project file
I am using visual studio 2012. My system was shutdown abnormally and visual studio was running at that time. 我正在使用Visual Studio2012。我的系统异常关闭,并且当时Visual Studio正在运行。 After then Im facing strange issue, my project file is not loaded and visual studio says, file not loaded.
之后,我面临一个奇怪的问题,我的项目文件未加载,Visual Studio说,文件未加载。 It is also showing me an html file, UpgradeLog.htm.
它还向我显示了一个HTML文件UpgradeLog.htm。 In this file, its showing me this error: HttpServerTest\\HttpServerTest.csproj: Error on line 1. Expected '<' but found 'null character'.
在此文件中,它向我显示此错误:HttpServerTest \\ HttpServerTest.csproj:第1行出现错误。预期为“ <”,但找到了“空字符”。
Not sure how to fix this, tried following solution by removing .suo file but its not working for me 不确定如何解决此问题,请尝试通过删除.suo文件以下解决方案,但对我不起作用
http://www.howtosolutions.net/2013/02/solving-project-file-error-could-not-find-part-of-the-path-with-visual-studio/ http://www.howtosolutions.net/2013/02/solving-project-file-error-could-not-find-part-of-the-path-with-visual-studio/
Strange thing is, Its not opening my program.cs file, however its showing correct file size. 奇怪的是,它没有打开我的program.cs文件,但是显示的是正确的文件大小。 But when I try to open program.cs file, its opening an empty file.
但是当我尝试打开program.cs文件时,其打开了一个空文件。
Any idea? 任何想法?
thank you 谢谢
Try deleting .suo files in your solution folder. 尝试删除解决方案文件夹中的.suo文件。 Solution User Option file is a binary file which contains various user information and settings such as location of the breakpoints.
解决方案用户选项文件是一个二进制文件,其中包含各种用户信息和设置,例如断点的位置。
尝试创建新的解决方案文件,然后添加现有的项目文件(或文件夹)...
如果您有项目的任何备份,请尝试将.csproj文件的内容复制到当前文件中
I ran in to this with Visual Studio 2013 today. 我今天在Visual Studio 2013中遇到了这个问题。 It turned out we had somehow gotten an invisible character at the beginning of our *.csproj file (we think it got there from a bad merge).
原来,我们在* .csproj文件的开头以某种方式获得了一个不可见的字符(我们认为它是从错误的合并中到达的)。
We used https://www.xmlvalidation.com/ to find the invisible character: 我们使用https://www.xmlvalidation.com/查找不可见的字符:
1 <?xml version="1.0" encoding="utf-8"?>
Opening the *.csproj file in Notepad++, going to the beginning of the first line, and backspacing, removed the character and allowed Visual Studio to correctly load the project. 在Notepad ++中打开* .csproj文件,转到第一行的开头,然后退格,删除该字符并允许Visual Studio正确加载项目。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.