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

9

本文介绍了将现有程序集添加到 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.net 5 或说 ASp.net MVC 6)

For now onwards we add nuget package to Web Application ( ASP.net 5 or Say ASp.net 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.

以下是步骤.

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

希望对你有所帮助.

这篇关于将现有程序集添加到 mvc 6 项目的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

The End

相关推荐

C# 中的多播委托奇怪行为?
Multicast delegate weird behavior in C#?(C# 中的多播委托奇怪行为?)...
2023-11-11 C#/.NET开发问题
6

参数计数与调用不匹配?
Parameter count mismatch with Invoke?(参数计数与调用不匹配?)...
2023-11-11 C#/.NET开发问题
26

如何将代表存储在列表中
How to store delegates in a List(如何将代表存储在列表中)...
2023-11-11 C#/.NET开发问题
6

代表如何工作(在后台)?
How delegates work (in the background)?(代表如何工作(在后台)?)...
2023-11-11 C#/.NET开发问题
5

没有 EndInvoke 的 C# 异步调用?
C# Asynchronous call without EndInvoke?(没有 EndInvoke 的 C# 异步调用?)...
2023-11-11 C#/.NET开发问题
2

Delegate.CreateDelegate() 和泛型:错误绑定到目标方法
Delegate.CreateDelegate() and generics: Error binding to target method(Delegate.CreateDelegate() 和泛型:错误绑定到目标方法)...
2023-11-11 C#/.NET开发问题
14