据我所知,Visual Studio 2015有一些更新,我们无法在asp.net 5应用程序中添加DLL,如果我们需要添加
we need to make NuGet package and then install it.
现在我的问题是:
1)如果我有一个项目与两个类库,那么我如何添加该类库的引用(DLL)在我的asp.net 5应用程序?
2)如果一个类库也处于开发模式,那么如果通过NuGet安装该DLL,那么如何在asp.net 5应用程序中更新该DLL,因为每次在NuGet上发布并获得最新的时间需要更多的时间.
3)假设我们是否需要使用NuGet添加所有DLL,那么私有DLL呢?
4)有没有没有NuGet软件包经理来处理这个问题?
解决方法
快速回答 – 您不需要NuGet软件包,是的,可以引用您自己的lib.
两种方式:
>将其添加到project.json中的根级别“dependecies”对象中.请注意,此操作将为“框架”部分中列出的每个目标框架添加引用,因此,如果添加对旧类型库的引用,则不适用于新的DNxcore 5.0
{ "webroot": "wwwroot","version": "1.0.0-*","dependencies": { "Library": "1.0.0-*"
>通过添加它为特定的框架版本.哪个更灵活,因为您可以使用DNX451的旧类型库和DNxcore 5.0的新vNext类库
"frameworks": { "dnx451": { "dependencies": { "ClassicLib": "1.0.0-*","vNextLib": "1.0.0-*",} },"dnxcore50" : { "dependencies": { "vNextLib": "1.0.0-*" } } } ....
我在Visual Studio 2015 RC上检查的所有样本.
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。