DNX 4.5.1 / DNX核心5.0暧昧参考 [英] Dnx 4.5.1/Dnx Core 5.0 Ambiguous reference

查看:429
本文介绍了DNX 4.5.1 / DNX核心5.0暧昧参考的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在我和其他人有我有,如果我使用一个对象,它是除了不同asp.net5项目弹出一个不明确的引用错误的许多项目。够搞怪它仍然编译和工程,但没有智能感知和我的code是覆盖在红线。

In many projects that I and others I have there is an Ambiguous reference error that pops up if i use an object that is apart of a different asp.net5 project. Funny enough it still compiles and works but there is no intellisense and my code is covered in red lines.

这方面的一个例子是我有一个测试项目指向我的MVC项目。当我尝试创建XController的新实例,它会显示一个错误,它不知道哪些XController使用DNX 4.5.1或5.0 DNX。我知道这些是什么,但它不会让我选择,即使我觉得我不应该。再次,它的工作原理,只是令人沮丧的。

An example of this is I have a Tests project pointing to my MVC project. When i try to create a new instance of XController, it will show an error that it doesnt know which XController to use the DNX 4.5.1 or DNX 5.0. I am aware of what those are but it wont let me choose, even though I feel like I shouldnt. Again, it works, just frustrating.

我能得到这个工作的唯一方法是,如果我选择我的MVC项目只有一个框架。我不喜欢这样做,因为我想知道,如果dnxcore50犯规支持的东西,我在MVC应用程序正在写。我试着使用只在单元测试项目中的一个框架,但没有奏效。

The only way I can get this to work is if I choose only one framework for my MVC project. I dont like doing this because I want to know if dnxcore50 doesnt support something that I am writing in the MVC app. I tried only using one framework in the unit test project but that did not work.

我要明确的是,我也明白,asp.net 5东西是处于测试阶段,有许多错误。我想知道,或如果这是一个错误,如果我只是做了什么。

I want to be clear that I do understand that asp.net 5 stuff is in beta and there are many bugs. I am wondering if this is a a bug or if I am just doing something wrong.

更新1:看来问题只有当我有一个新的Asp.Net 5类库引用Asp.Net 5 MVC项目出现。图书馆库的工作原理和MVC图书馆也适用。

Update 1: It seems the problem only occurs if I have a new Asp.Net 5 Class library referencing a Asp.Net 5 Mvc project. Library to library works and mvc to library also works.

推荐答案

花了一些时间讨论涉及与Asp.net 5开发团队的球员之后,我们得出的结论,这是在我的情况肯定一个ReSharper的问题。

After spending some time talking to the guys involved with the Asp.net 5 development team, we've come to the conclusion that this was, in my case certainly, a ReSharper issue.

如果您关闭ReSharper的错误消失。

If you switch off ReSharper the errors disappear.

感谢

这篇关于DNX 4.5.1 / DNX核心5.0暧昧参考的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆