Issue with generated accessor classes for unit tests

I'm having an issue with one of my unit tests.

The test looks similar to this:

        /// <summary>
        ///A test for ReturnSomething
        ///</summary>
        [TestMethod()]
        [DeploymentItem("PrivateUnitTest.exe")]
        public void ReturnSomethingTest()
        {
            IBar expected = new Bar();
            IBar actual = Foo_Accessor.ReturnSomething();
            Assert.AreEqual(expected, actual);
        }

R# reports an error in the red line saying:
Cannot convert resource type 'PrivateUnitTest.IBar [PrivateUnitTest, Version=..., Culture=neutral, PublicKeyToken=null]' to target type 'PrivateUnitTest.IBar [TestProject]

Since my unit test compiles and runs without errors, I guess R# is doing wrong here. I have attached a small solution demonstrating the code structure I actually have; however, unfortunately R# doesn't show the same error here, and I can't post the orignal code.

Does anyone have an idea what's going wrong here, anyway?

I'm using version 6.1.19.137 with VS 2010; the option 'Analyze errors in whole solution' is checked.



Attachment(s):
PrivateUnitTest.zip
4 comments
Comment actions Permalink

Hello Mathias
     I wasn't able to reproduce this problem with build #22. Could you please install that build and check if this still happens for you? Thank you!

Andrey Serebryansky

Senior Support Engineer

JetBrains, Inc

http://www.jetbrains.com

"Develop with pleasure!"

0
Comment actions Permalink

I've installed build #22, but this one makes things rather worse: In addition to the errors I've mentioned above R# now reports lots of "Cannot resolve symbol '...'" errors while the code compiles without errors.
I've also got some exceptions listed in the R# Exception browser. Here are the issue IDs:
RSRP-285099 RSRP-285098 RSRP-285097 RSRP-285096 RSRP-285095

0
Comment actions Permalink

Hello Mathias
     Do you see such exceptions each time you open your solution in Visual Studio (e.g. is this problem reproducible)? Could you please check if removing ReSharper caches (close all instances of Visual Studio and delete the _ReSharper.<solution> subfolder of your solution folder) helps to fix this problem? Thank you!

Andrey Serebryansky

Senior Support Engineer

JetBrains, Inc

http://www.jetbrains.com

"Develop with pleasure!"

0
Comment actions Permalink

I did remove the caches yesterday. However, after doing the same again today (remove the cache folder, then start VS) only one exception re-occurres:
Collection has been modified (5 times). It seems to me they all occur while loading the projects, before the R# symbol showing the code checking status appears in the status bar.

Edit: A single "Collection has been modified" exception occurres reproducable when I save the properties of a certain Vulcan.NET project.

By the way, the "Cannot resolve symbol '...'" errors have gone now. I don't exactly know why, I haven't made any changes to the code and haven't yet installed today's R# build.

Regards,
Mathias

0

Please sign in to leave a comment.