7 comments
Comment actions Permalink

Hello,

If i don't have loaded all projects in a solution resharper gets
confused with this error


I believe working with projects unloaded is not a commonly supported scenario.
Seems like R# is trying to use the most recently built DLL of that project
as the source for type information.

This results in the source-compiled-source transition of the CommonData class:
it is declared in source code, then we see it from the parameter of a compiled
class, then we try to match it to the source code type when used in the third
project. A problem in R# type system prevents this scenario from working
properly, which also manifests itself if you have a C++/CLI or any other
unsupported language project in between two C# projects.

I'm not sure if this will be addressed in the current release.

P.S.: This compiles fine under visual studio 2008


Not quite - it fails with
error CS0234: The type or namespace name 'FrontEnd' does not exist in the
namespace 'ClassLibrary' (are you missing an assembly reference?)
unless you have an old DLL of the FrontEnd project.


Serge Baltic
JetBrains, Inc — http://www.jetbrains.com
“Develop with pleasure!”


0
Comment actions Permalink

Serge Baltic schrieb:
> Hello,
>
>> If i don't have loaded all projects in a solution resharper gets
>> confused with this error
>
> I believe working with projects unloaded is not a commonly supported
> scenario. Seems like R# is trying to use the most recently built DLL of
> that project as the source for type information.
>
> This results in the source-compiled-source transition of the CommonData
> class: it is declared in source code, then we see it from the parameter
> of a compiled class, then we try to match it to the source code type
> when used in the third project. A problem in R# type system prevents
> this scenario from working properly, which also manifests itself if you
> have a C++/CLI or any other unsupported language project in between two
> C# projects.
In resharper 4.1 this scenario worked ( I mean with intermediate dll
beeing a compiled c# dll).

>
> I'm not sure if this will be addressed in the current release.
>
>> P.S.: This compiles fine under visual studio 2008
>
> Not quite - it fails with error CS0234: The type or namespace name
> 'FrontEnd' does not exist in the namespace 'ClassLibrary' (are you
> missing an assembly reference?)
> unless you have an old DLL of the FrontEnd project.
You have to open the solution and compile first the ClassLibrary.Shared
project. or set the class library shared project as dependency of the
console project.

>
> —
> Serge Baltic
> JetBrains, Inc — http://www.jetbrains.com
> “Develop with pleasure!”
>
>

0
Comment actions Permalink

Serge Baltic schrieb:
> Hello,
>
>> If i don't have loaded all projects in a solution resharper gets
>> confused with this error
>
> I believe working with projects unloaded is not a commonly supported
> scenario. Seems like R# is trying to use the most recently built DLL of
> that project as the source for type information.
>
> This results in the source-compiled-source transition of the CommonData
> class: it is declared in source code, then we see it from the parameter
> of a compiled class, then we try to match it to the source code type
> when used in the third project. A problem in R# type system prevents
> this scenario from working properly, which also manifests itself if you
> have a C++/CLI or any other unsupported language project in between two
> C# projects.
In resharper 4.1 this scenario worked ( I mean with intermediate dll
beeing a compiled c# dll).

>
> I'm not sure if this will be addressed in the current release.
>
>> P.S.: This compiles fine under visual studio 2008
>
> Not quite - it fails with error CS0234: The type or namespace name
> 'FrontEnd' does not exist in the namespace 'ClassLibrary' (are you
> missing an assembly reference?)
> unless you have an old DLL of the FrontEnd project.
You have to open the solution and compile first the ClassLibrary.Shared
project. or set the class library shared project as dependency of the
console project.

>
> —
> Serge Baltic
> JetBrains, Inc — http://www.jetbrains.com
> “Develop with pleasure!”
>
>

0
Comment actions Permalink

Thank you for the example. The problem is located and fixed

--
Eugene Pasynkov
ReSharper Technical Lead
JetBrains, Inc.
http://www.jetbrains.com
"Develop with pleasure!"


"Thomas Stocker" <thomas.stocker@procos.com> wrote in message
news:gjl60p$j3f$1@is.intellij.net...

If i don't have loaded all projects in a solution resharper gets confused
with this error

>

Argument type 'ClassLibrary.Shared.CommonData[ClassLibrary.Shared]' is not
assignable to parameter type
'ClassLibrary.Shared.CommonData[ClassLibrary.FrontEnd,
Version=1.0.0.0,Culture=neutral]'

>

On the following line

>

using ClassLibrary.FrontEnd;

>

using ClassLibrary.Shared;

>

namespace ConsoleApplication1

>

{

>

internal class Program

>

{

>

private static void Main(string[] args)

>

{

>

var commonData = new CommonData();

>

var processData = new ProcessData(commonData); // the resharper error is
on this line

>

processData.Process();

>

}

>

}

>

}

>

This happens if i have 3 projects one is the 'FrontEnd' project and is
unloaded. and I have referenced a project that is used in the Frontend
Project and in the Console Application.

>

Then this error occours.

>

Attached are the sample projects to have this behaviour.

>

P.S.: This compiles fine under visual studio 2008

>

For me it seems that the parameter Type of the argument has the wrong
assembly attached to it because ClassLibrary.Shared.CommonData only exists
in ClassLibrary.Shared and not in the ClassLibrary.Frontend dll

>
>
>
>
>
>
>
>
>
>
>
>



0
Comment actions Permalink


"Eugene Pasynkov (JetBrains)" <Eugene.Pasynkov@jetbrains.com> wrote in
message news:gl6vql$uvt$1@is.intellij.net...

Thank you for the example. The problem is located and fixed


I tried the latest build 4.5.1162 and it works great

Thanks

>

--
Eugene Pasynkov
ReSharper Technical Lead
JetBrains, Inc.
http://www.jetbrains.com
"Develop with pleasure!"

>
>

"Thomas Stocker" <thomas.stocker@procos.com> wrote in message
news:gjl60p$j3f$1@is.intellij.net...

>> If i don't have loaded all projects in a solution resharper gets confused
>> with this error
>>
>> Argument type 'ClassLibrary.Shared.CommonData[ClassLibrary.Shared]' is
>> not assignable to parameter type
>> 'ClassLibrary.Shared.CommonData[ClassLibrary.FrontEnd,
>> Version=1.0.0.0,Culture=neutral]'
>>
>> On the following line
>>
>> using ClassLibrary.FrontEnd;
>>
>> using ClassLibrary.Shared;
>>
>> namespace ConsoleApplication1
>>
>> {
>>
>> internal class Program
>>
>> {
>>
>> private static void Main(string[] args)
>>
>> {
>>
>> var commonData = new CommonData();
>>
>> var processData = new ProcessData(commonData); // the resharper error is
>> on this line
>>
>> processData.Process();
>>
>> }
>>
>> }
>>
>> }
>>
>> This happens if i have 3 projects one is the 'FrontEnd' project and is
>> unloaded. and I have referenced a project that is used in the Frontend
>> Project and in the Console Application.
>>
>> Then this error occours.
>>
>> Attached are the sample projects to have this behaviour.
>>
>> P.S.: This compiles fine under visual studio 2008
>>
>> For me it seems that the parameter Type of the argument has the wrong
>> assembly attached to it because ClassLibrary.Shared.CommonData only
>> exists in ClassLibrary.Shared and not in the ClassLibrary.Frontend dll
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>
>
>

__________ Information from ESET Smart Security, version of virus
signature database 3789 (20090122) __________

>

The message was checked by ESET Smart Security.

>

http://www.eset.com

>
>




__________ Information from ESET Smart Security, version of virus signature database 3789 (20090122) __________

The message was checked by ESET Smart Security.

http://www.eset.com




0
Comment actions Permalink

How can i get an update with this fix in it?

Thanks!
Eric

0
Comment actions Permalink

Hello,

It is fixed in ReSharper 4.5 which is to be release quite soon. Meanwhile,
you can try nightly builds: http://www.jetbrains.net/confluence/display/ReSharper/ReSharper4.5Nightly+Builds

Sincerely,
Ilya Ryzhenkov

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


IR> How can i get an update with this fix in it?
IR>
IR> Thanks!
IR> Eric
IR> ---
IR> Original message URL:
IR> http://www.jetbrains.net/devnet/message/5232430#5232430


0

Please sign in to leave a comment.