与类库的输出类型的项目不能直接启动 [英] A project with an Output type of Class Library cannot be started directly

查看:807
本文介绍了与类库的输出类型的项目不能直接启动的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经下载样本code与C#。但是当我跑我得到这个错误信息:

I've download sample code with C#. but when I run I get this error message:

与一个类库输出类型的项目不能开工
  直接为了调试这个项目中,添加一个可执行的项目
  这个解决方案,它引用库项目。设置可执行
  项目为启动项目。

A project with an Output type of Class Library cannot be started directly In order to debug this project, add an executable project to this solution which references the library project. Set the executable project as the startup project.

请给我一个解决方案。

推荐答案

当前选中的启动项目是一个类库。

The currently selected startup project is a Class Library.

您需要为您的应用程序的入口点。请问您的解决方案包含多个项目?

You need an entry point for your application. Does your solution contain multiple projects?

您确定要跑的类库?

也许你只下载了一个类库解决方案。在这种情况下,有可能是单元测试,你可以调试步骤谷底的code。

Possibly you've downloaded a Class Library solution only. In that case there might be unit tests that you can 'debug' to step-trough the code.

更新
在回答您的意见,这些都可能运行类库:

Update In response to your comment, these are possibilities to run the class library:


  • 创建一个控制台应用程序并引用类库。然后使用的内容

  • 调试一个单元测试项目

  • 启动现有的客户项目

这篇关于与类库的输出类型的项目不能直接启动的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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