<bdo id='zHgur'></bdo><ul id='zHgur'></ul>
  • <i id='zHgur'><tr id='zHgur'><dt id='zHgur'><q id='zHgur'><span id='zHgur'><b id='zHgur'><form id='zHgur'><ins id='zHgur'></ins><ul id='zHgur'></ul><sub id='zHgur'></sub></form><legend id='zHgur'></legend><bdo id='zHgur'><pre id='zHgur'><center id='zHgur'></center></pre></bdo></b><th id='zHgur'></th></span></q></dt></tr></i><div id='zHgur'><tfoot id='zHgur'></tfoot><dl id='zHgur'><fieldset id='zHgur'></fieldset></dl></div>

    <small id='zHgur'></small><noframes id='zHgur'>

      <legend id='zHgur'><style id='zHgur'><dir id='zHgur'><q id='zHgur'></q></dir></style></legend>
        <tfoot id='zHgur'></tfoot>
      1. 如何将项目引用添加到 ASP.NET Core 1.0 MVC 项目

        How to add project reference to ASP.NET Core 1.0 MVC project(如何将项目引用添加到 ASP.NET Core 1.0 MVC 项目)
        1. <legend id='4pDoa'><style id='4pDoa'><dir id='4pDoa'><q id='4pDoa'></q></dir></style></legend>
            <tbody id='4pDoa'></tbody>
            <bdo id='4pDoa'></bdo><ul id='4pDoa'></ul>

              • <small id='4pDoa'></small><noframes id='4pDoa'>

                <tfoot id='4pDoa'></tfoot>
              • <i id='4pDoa'><tr id='4pDoa'><dt id='4pDoa'><q id='4pDoa'><span id='4pDoa'><b id='4pDoa'><form id='4pDoa'><ins id='4pDoa'></ins><ul id='4pDoa'></ul><sub id='4pDoa'></sub></form><legend id='4pDoa'></legend><bdo id='4pDoa'><pre id='4pDoa'><center id='4pDoa'></center></pre></bdo></b><th id='4pDoa'></th></span></q></dt></tr></i><div id='4pDoa'><tfoot id='4pDoa'></tfoot><dl id='4pDoa'><fieldset id='4pDoa'></fieldset></dl></div>
                • 本文介绍了如何将项目引用添加到 ASP.NET Core 1.0 MVC 项目的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  我在解决方案 X 中有一个 ASP.NET Core 1.0 MVC 应用程序,在解决方案 Y 中有一些常见项目(.net 4.5.2 类库).

                  I have a ASP.NET Core 1.0 MVC app in solution X and I have some common projects (.net 4.5.2 class libs) in solution Y.

                  我想从我的应用程序中引用解决方案 Y 中的项目,当我通过添加引用 -> 浏览 .. 我得到:

                  I want to reference the projects in solution Y from my app, when I do so via add reference -> Browse .. I get:

                  .NET Core projects only support referencing .NET framework assemblies in 
                  this release. To reference other assemblies, 
                  they need to be included in a NuGet package and reference that package.
                  

                  然后我创建了这些项目的 nuget 包,添加了包含 nuget 包的文件夹作为 repo 源并加载了项目.这成功地将项目添加到我的 project.json 中,但实际上没有其他任何事情发生,我仍然无法在我的应用程序中使用代码.

                  I then created a nuget package of those projects, added the folder that contains the nuget packages as a repo source and loaded the projects. This adds the projects successfully to my project.json, but 'nothing' else actually happens, I still can't use the code in my app.

                  现在 ASP.NET Core 已经过了 beta 状态,官方的处理方式是什么?

                  Now ASP.NET Core is past its beta status, what is the official way of dealing with this?

                  推荐答案

                  很多人都在为这个问题苦苦挣扎,有一个 GitHub 上长期运行的线程 关于它.甚至使用最新 RC3 版本的人也报告了您遇到的同样问题.

                  Many people have struggled with this issue and there is a long running thread on GitHub about it. Even the people using the latest RC3 build are reporting the same problem that you are having.

                  我能够在 ASP.NET Core Web 应用程序中引用类库项目的唯一方法是在 Visual Studio 2015 Update 2 中创建 Web 应用程序和类库项目.它们都必须以 .NET 框架 4.6.1.

                  The only way I've been able to reference class library projects in an ASP.NET Core web application is to create both the web application and the class library projects in Visual Studio 2015 Update 2. And they all have to target .NET Framework 4.6.1.

                  我不得不将旧类库项目中的代码复制到新项目中.但最终,我认为我节省了自己的时间,因为我不必搞乱似乎对很多人不起作用的所有变通办法.

                  I had to copy the code from my old class library projects to the new ones. But in the end I think I saved myself time by not having to mess with all the workarounds that don't seem to work for a lot of people.

                  这篇关于如何将项目引用添加到 ASP.NET Core 1.0 MVC 项目的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

                  相关文档推荐

                  Accessing attribute info from DTE(从 DTE 访问属性信息)
                  Extract Display name and description Attribute from within a HTML helper(从 HTML 帮助器中提取显示名称和描述属性)
                  Does adding [Serializable] to the class have any performance implications?(将 [Serializable] 添加到类是否会对性能产生影响?)
                  asp.net mvc Adding to the AUTHORIZE attribute(asp.net mvc 添加到 AUTHORIZE 属性)
                  Custom solution configuration not showing up in Visual Studio 2010(自定义解决方案配置未显示在 Visual Studio 2010 中)
                  Crystal Reports: Passing Multiline Parameter Values(Crystal Reports:传递多行参数值)
                  • <bdo id='cNys9'></bdo><ul id='cNys9'></ul>

                    <tfoot id='cNys9'></tfoot>

                        <i id='cNys9'><tr id='cNys9'><dt id='cNys9'><q id='cNys9'><span id='cNys9'><b id='cNys9'><form id='cNys9'><ins id='cNys9'></ins><ul id='cNys9'></ul><sub id='cNys9'></sub></form><legend id='cNys9'></legend><bdo id='cNys9'><pre id='cNys9'><center id='cNys9'></center></pre></bdo></b><th id='cNys9'></th></span></q></dt></tr></i><div id='cNys9'><tfoot id='cNys9'></tfoot><dl id='cNys9'><fieldset id='cNys9'></fieldset></dl></div>
                          <tbody id='cNys9'></tbody>
                      1. <legend id='cNys9'><style id='cNys9'><dir id='cNys9'><q id='cNys9'></q></dir></style></legend>

                          • <small id='cNys9'></small><noframes id='cNys9'>