简体   繁体   English

VisualStudio 2013 找不到引用的命名空间

[英]VisualStudio 2013 can't find referenced namespace

I manually add two DLLs to my project Dapper.DLL and Dapper.Contrib.DLL than create DapperTest.cs class in my project root namespace EBTests.我手动将两个 DLL 添加到我的项目 Dapper.DLL 和 Dapper.Contrib.DLL 中,然后在我的项目根命名空间 EBTests 中创建 DapperTest.cs 类。 Than I create more cs files so I created folder Dapper and move all this classes inside this folder.比我创建更多的 cs 文件,所以我创建了文件夹 Dapper 并将所有这些类移动到这个文件夹中。 So far so good.到现在为止还挺好。

Than I add new class inside the folder Dapper name it DataManagerWithDapper.cs Since that using reference to Dapper.Contrib stopped working in all my classes.比我在文件夹 Dapper 中添加新类命名为 DataManagerWithDapper.cs 因为使用对 Dapper.Contrib 的引用在我所有的类中都停止工作。

After hours of researches I found the very simple reason.经过数小时的研究,我找到了非常简单的原因。 My lastly added class get new namespace EBTests.Dapper and it was somehow in conflict with Dapper.Contrib.我最后添加的类获得了新的命名空间 EBTests.Dapper,它在某种程度上与 Dapper.Contrib 发生冲突。 After I changed my new namespace from "EBTests.Dapper" to "EBTests", using to Dapper.Contrib starts to work properly.在我将新命名空间从“EBTests.Dapper”更改为“EBTests”后,使用 Dapper.Contrib 开始正常工作。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM