将现有程序集添加到 mvc 6 项目

编程入门 行业动态 更新时间:2024-10-25 04:20:40
本文介绍了将现有程序集添加到 mvc 6 项目的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我正在测试 Visual Studio 2015 并使用 mvc 6,一切都很好,但是当我尝试添加引用时,只显示当前解决方案中的项目,我已经有一个现有程序集,我想添加它,但我没有看到该选项,如何向现有程序集添加对 mvc 6 项目的引用?

I'm testing Visual Studio 2015 and playing with mvc 6, all is fine, but when I try to add a reference, only proyects in the current solution are shown, I have an existing assembly already and I want to add it, but I don't see the option, how can I add a reference to a mvc 6 Project to an existing assembly?

推荐答案

我认为 Visual Studio 2015 处于预览阶段,我们无法添加我们过去使用 Visual Studio 2013 的参考.

I think Visual studio 2015 is in preview and we can not add reference that we used to do it Visual Studio 2013.

现在我们将 nuget 包添加到 Web 应用程序(ASP 5 或说 ASp MVC 6)

For now onwards we add nuget package to Web Application ( ASP 5 or Say ASp MVC 6)

现在假设您决定构建自己的类库,并且我已成功地将库创建到另一个解决方案中并添加到我的 mvc 6 项目中.

Now suppose you decided to build your own class library and I have successfully created library into another solution and added to my mvc 6 project.

以下是步骤.

  • 创建 ASP 5 类库项目.
  • 实现你的功能,我刚刚添加了几个类.
  • 在这一步之后,我将项目发布到 C:published 位置(在发布标记选项预编译期间),如下图所示
  • 在这一步之后,如果您访问位置 C:published,那么它的路径类似于 C:publishedapprootpackages.
  • 现在在 Visual Studio 2015 预览版中设置以下内容,以便能够搜索包.
  • 现在转到您的 mvc 项目的 project.json 文件.添加对您的库的引用.
  • 希望对你有所帮助.

    更多推荐

    将现有程序集添加到 mvc 6 项目

    本文发布于:2023-11-14 11:33:38,感谢您对本站的认可!
    本文链接:https://www.elefans.com/category/jswz/34/1587104.html
    版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
    本文标签:程序   项目   mvc

    发布评论

    评论列表 (有 0 条评论)
    草根站长

    >www.elefans.com

    编程频道|电子爱好者 - 技术资讯及电子产品介绍!