不要显示我的Dll评论 [英] Don't Show My Dll Comments

查看:54
本文介绍了不要显示我的Dll评论的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嗨朋友

我的Dll在C#项目中正常工作但是在添加到参考后不要在C#编辑器中显示XML注释(///)



当我运行Dll项目时显示此错误:



具有类库的输出类型的项目无法直接启动。 

为了调试此项目,请向此解决方案添加一个可执行项目,该项目引用库项目。将可执行项目设置为启动项目。







请帮助我

解决方案

关于XML注释,您必须记住它们存储在DLL中。

https://msdn.microsoft .com / zh-cn / library / vstudio / b2s063f7(v = vs.100).aspx [ ^ ]



如果你没有创建编译DLL时的XML文件,然后你需要这样做并将它保存在与DLL相同的目录中。

请记住,你的项目可能会将DLL复制到它自己的目录然后它将无法找到XML文件,因此您需要解决这个问题。


除了解决方案1:



此外,查看不同配置中的项目属性。默认情况下,项目模板为您创建两个配置,Debug和Release,默认情况下,XML注释在第一个配置中启用,在第二个配置中禁用。您可以编辑任何配置并启用或禁用此功能,但请记住,这些注释只对开发有用,而不适用于部署。



-SA

Hi Friends
My Dll Working properly in a C# Project But Don't Show XML Comments (///) in C# Editor After Add To Refrences!

And Show This Error When I Run Dll Project :

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.




pls Help me

解决方案

As regards XML comments, you must remember that they are not stored in the DLL.
https://msdn.microsoft.com/en-us/library/vstudio/b2s063f7(v=vs.100).aspx[^]

If you didn't create the XML file when you compiled the DLL, then you'll need to do so and keep it in the same directory as the DLL.
Remember that your project may copy the DLL to its own directory and then it won't be able to find the XML file, so you'll need to work around that.


In addition to Solution 1:

Also, look at project Properties in different configurations. By default, a project template creates two configurations for you, "Debug" and "Release", and, also by default, XML comments are enabled in first configuration and disabled in the second one. You can edit any configuration and enable or disable this feature, but remember that those comments can only be useful for development, not for the deployment.

—SA


这篇关于不要显示我的Dll评论的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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