类型或名称空间名称"Core"在名称空间"AuntieDot"中不存在 [英] The type or namespace name 'Core' does not exist in the namespace 'AuntieDot'

查看:90
本文介绍了类型或名称空间名称"Core"在名称空间"AuntieDot"中不存在的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有4个PCL,它们都针对相同的框架:

I have 4 PCL's, and they are all targeted at the same Frameworks:

AuntieDot:

AuntieDot:

AuntieDot.Authentication:

AuntieDot.Authentication:

AuntieDot.Core:

AuntieDot.Core:

AuntieDot.Models

AuntieDot.Models:

但是出于某种原因,"AuntieDot.Authentication"命名空间中"AuntieDot.Core.Helpers"的用法(尽管"AuntieDot.Core"被添加为"AuntieDot.Authentication"的引用,但实际上并没有).我已经四处搜寻,而我得到的唯一答复是,我需要确保其他库针对的是相同的框架.

But for some reason, the usage of 'AuntieDot.Core.Helpers' in the 'AuntieDot.Authentication' namespace (despite 'AuntieDot.Core' being added as a reference into 'AuntieDot.Authentication', it's saying it doesn't exist. I've googled around and the only replies I've gotten is that I need to make sure the other libraries are targeted at the same frameworks, which they are.

我使用的唯一外部代码是JSON.net,我通过NuGet添加了它,所以我认为这不是问题.

The only external code I'm using is JSON.net, which I added via NuGet so I don't think that is the issue.

'AuntieDot.Core'中的代码;

The code in the 'AuntieDot.Core';

引发问题的代码仅在错误列表中抱怨并且在编译时没有像通常那样带有红色下划线:

The code that is throwing the issue is only complaining in the error list and on compile, it doesn't have a Red-Underline, like usual:

我只是认为也许发布Build Output可能会有所帮助; http://pastebin.com/raw.php?i=wn74UKyc

I just thought that maybe posting the Build Output might help; http://pastebin.com/raw.php?i=wn74UKyc

推荐答案

发现了问题,在定位我要定位的框架时,VS似乎存在一个错误.我通过在Build Output中搜索The currently targeted framework ".NETPortable,Version=v4.5,Profile=Profile78" does not include "System.Net.Requests, Version=4.0.0.0, Culture=neutral错误来发现此问题,这使我遇到了在Microsoft 连接站点.似乎他们很快就可以解决此错误,但是在此之前,由于VS团队的Dave,Microsoft才发布了此解决方法,

Found the Issue, it seems there is a bug with VS when targeting the frameworks I'm targeting. I found this by googleing the The currently targeted framework ".NETPortable,Version=v4.5,Profile=Profile78" does not include "System.Net.Requests, Version=4.0.0.0, Culture=neutral error in the Build Output, this brought me to someone having the same issue on Microsoft's Connect Site. Seems they are fixing this bug soon, but until then Microsoft released this Workaround, thanks to Dave on the VS Team,

再次感谢您的错误报告.我们找到了另一个解决方法 不需要您更改目标框架. 要解决此问题,请在文本编辑器中编辑项目,然后添加 在最后一个导入"元素下面:

Thanks once again for the bug report. We've found another workaround that does not require you to change the frameworks you are targeting. To workaround this, edit the project in a text editor, and add the following underneath the last "Import" element:

<Target Name="_SetFullFrameworkFolderToProfile"
 AfterTargets="GetReferenceAssemblyPaths">

<PropertyGroup>
 <_FullFrameworkReferenceAssemblyPaths>$(TargetFrameworkDirectory)</_FullFrameworkReferenceAssemblyPaths>
</PropertyGroup>
</Target>

Andddd繁荣:

这篇关于类型或名称空间名称"Core"在名称空间"AuntieDot"中不存在的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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