如何恢复解决方案文件 [英] how to recover solution file

查看:78
本文介绍了如何恢复解决方案文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我错误地删除了我的项目.sln文件。我怎样才能恢复它。一次又一次地建立我的网站也没有帮助。请帮助我。

当我尝试调试我的项目时出现以下错误:

无法直接启动具有类库输出类型的项目。为了调试项目,请向此解决方案添加一个可执行项目,该项目引用库项目。将可执行项目设置为启动项目。 (我的项目是3层)。

By mistake i have deleted my project .sln file. how can i recover it. Building my website again and again also don't help. please help me.
following error comes when i try to Debug my project:
A project with output type of class library cannot be started directly. In order to debug the project add an executable project to this solution which references the library project. Set the executable project as Startup Project. ( My project is 3- Tier).

推荐答案

创建一个新的空白解决方案并将项目添加到该解决方案。这应该是你要求的。



顺便说一句你所指出的错误信息不是因为你没有解决方案文件。这是因为您的启动项目被设置为库项目(您的业务层或数据访问层)。将项目添加到解决方案后,右键单击Web应用程序项目并将其设置为启动项目。这应该可以解决你的问题。



希望它有所帮助!
Create a new blank solution and add your project to that. That should do what you asked for.

Btw the error message that you have indicated isn't because you do not have a solution file. It is because your startup project is setup as the library project (either your business layer or data access layer). Once you have added your projects to the solution, right click the web application project and set is as start up project. That should solve your problem.

Hope it helps!


这篇关于如何恢复解决方案文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆