暧昧参考 [英] ambiguous reference

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

问题描述

我在溶液中取出一个项目,然后再重新添加它。
自从看了吧..我发现了一个明确的引用现在的错误,我不能删除。
查看类的实现(这是越来越错误)我看到它引用了两遍:

I removed a project in my solution and then later re-added it. Since reading it.. I'm getting an ambiguous reference error now which I can't remove. viewing the implementation of the class (which is getting the error) I see it references it twice:

> ClassName (myclass.Class)    myclass.Class
> ClassName (myclass.Class)    myclass.Class, Version=1.0.0.0

命名空间只看到过一次,但这个问题只在1部分观点存在。

the namespace is only viewed once, but this problem only exists in 1 partial view.

编辑:

<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<MyClass.Class.MyViewModel>" %>

MyViewModel正在给明确的错误,如果我看到所有可用类它显示了像重复:

MyViewModel is giving the ambiguous error, if i view all the available classes it shows duplicates like:

MyClass.Class.MyViewModel
MyClass.Class.MyViewModel
MyClass.Class.MyOtherViewModel
MyClass.Class.MyOtherViewModel

但是当我在同一个项目中打开另一个局部视图,它的罚款。这只是1部分,这似乎是保留重复引用。

but when I open another partial view in the same project, it's fine. It's just the 1 partial that seems to be retaining the duplicate reference.

任何想法,我怎么能解决这个问题?

Any idea how I can resolve this?

推荐答案

你试过用鼠标右键单击该解决方案,做清理解决方案

Have you tried right-clicking the solution and doing Clean Solution?

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

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