开发者

recover project in visual studio 2010

开发者 https://www.devze.com 2023-02-15 09:56 出处:网络
i have 4 project in my solution, framework , domain objects,business o开发者_JAVA技巧bjects and website ...

i have 4 project in my solution, framework , domain objects,business o开发者_JAVA技巧bjects and website ... but this morning website project couldnt be loaded... when i tried firsttime to open solution... "The solution file has been modified outside the enviroment" message seemed and press reload then error is project file is corrupted... how can it happen... how can i fix this...

thx..


One way... if its from some source control , get the latest and leave the changed part by you. If you dont have any source control then you can have the two options - Create a new solution and add all your projects to it and rebuild it. Check for the errors. - If your code is completely corrupted and files are unreadable, that is unrecoverable, then you must have to follow this

  • copy the projects dlls out of bin dir,
  • use red gate reflector and extract all the class file in new project file.
  • Now for aspx.cs you can create a new project add all aspx file in that new project and also the new cs files generated by the reflector addin. Do it for all pages. When done , right click on Project of web app(if its), then choose convert to web application. Also check the Page header of each page that they are using the same class files.

I know this is little bit tough , but will work....to recover almost that much code, when your app was last compiled.

Note : Also you will have to maintain the hierarchy of the project as the reflector add in (FileGenerator on Codeplex) might miss the actual project hierarchy.


You can open your solution file (.sln) in notepad and check for the consistency of the document. The sln file will be in a hierarchical structure (like we have an xml).

You can also open csproj files of different projects that you have in the solution check the xml of the csproj.

0

精彩评论

暂无评论...
验证码 换一张
取 消