R# 4.0.731: False "Cannot resolve method" error highlight

Hello
 
I have the following code:
 
 
It says that it cannot resolve method IsNotNull which is, as I belief, incorrect. This code compiles fine.
 
Regards
 
Gabriel Lozano-Moran
]]>



Attachment(s):
CannotResolveMethod.jpg
5 comments
Comment actions Permalink

Hello Gabriel Lozano-Moran,

In current build (732) I can't reproduce the problem with this code:

class Foo
{
public static void bar(object value, string message){}
public static void bar(object value, string message, params object[]
args){}

}

class User
{
public static void user(string value) { Foo.bar(value, "info"); }
}

If you can reproduce it with the sample above, it is most likely fixed problem.
If not, we may need more info, such as what Assert class do you use. Thanks.

P.S. I tried NUnit Assert too and it works fine:

class User
{
public static void user(string value) { Assert.IsNotNull(value, "info");
}
}


Sincerely,
Ilya Ryzhenkov

JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"


0
Comment actions Permalink

Hello Ilya

It is the Assert class from the
Microsoft.VisualStudio.SmartDevice.UnitTestFramework assembly. I have
replaced this reference with a reference to
Microsoft.VisualStudio.QualityTools.UnitTestFramework and ReSharper no
longer shows this as an error.

Regards

Gabriel Lozano-Moran

"Ilya Ryzhenkov" <orangy@jetbrains.com> wrote in message
news:76a2bd0b1509fc8ca4135a050658e@news.intellij.net...

Hello Gabriel Lozano-Moran,

>

In current build (732) I can't reproduce the problem with this code:

>

class Foo
{
public static void bar(object value, string message){}
public static void bar(object value, string message, params object[]
args){}
}

>

class User
{
public static void user(string value) { Foo.bar(value, "info"); }
}

>

If you can reproduce it with the sample above, it is most likely fixed
problem. If not, we may need more info, such as what Assert class do you
use. Thanks.

>

P.S. I tried NUnit Assert too and it works fine:

>

class User
{
public static void user(string value) { Assert.IsNotNull(value,
"info"); }
}

>
>

Sincerely,
Ilya Ryzhenkov

>

JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"

>


0
Comment actions Permalink

This problem happens from R# 3.x. It happens when you use an assembly was created for smart device in a Windows project.

0
Comment actions Permalink

Hello t800t8,

This problem happens from R# 3.x. It happens when you create a Class
Library Project for smart device then use it in a Windows project.


This should not so in ReSharper 4.0.

With best regards,
Andrey Simanovsky


0
Comment actions Permalink

Hello t800t8,

Interestingly enough, we changed our architecture to fix this problem, so
this should not be the case.
That is, you now CAN have both smart device and windows projects mixed in
one solution. If such configuration has any problems, please let us know.

Sincerely,
Ilya Ryzhenkov

JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"


t> This problem happens from R# 3.x. It happens when you create a Class
t> Library Project for smart device then use it in a Windows project.
t>


0

Please sign in to leave a comment.