Adding a reference from a xproj to a csproj

江枫思渺然 提交于 2019-12-13 07:08:58

问题


I have a ".net 4.6.1" (A) project and a ".net core 1.5" (B) project.

I want add a reference to "project_B_core_1.5" in my "project_A_net461".

At the beginning I got:

A reference could not be added. An assembly must have a 'dll' or 'exe' extension in order to be referenced.

Then I tried to add "net461" to "frameworks" in the core project (*). I Tried to add it again to "project_A_net461", and this time there was no error.

The problem is that I can't access the namespace:

The type or namespace 'name_of_B_project' does note exist in the namespace 'name_of_A_project' (are you missing an assembly reference?)

It complains at using name_of_B_project;.


(*) Like this:

  "frameworks": {
    "net461": {},
    "netstandard1.5": {
      "imports": "dnxcore50"
    }
  }

来源:https://stackoverflow.com/questions/41721131/adding-a-reference-from-a-xproj-to-a-csproj

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!