Issues with mixed target solutions

First off, the ReSharper 4.0 builds are much improved over 3.1 when it comes to mixed targets. We have a pretty big solution (over 50 projects) with a mixture of C, C++, and C# projects. The C# projects are about half for the full framework and half for compact framework. In 3.1 almost all (no exaggeration) of the code in the compact framework projects were marked as errors. Fortunately you guys have fixed this in 4.0 (mostly). However, I'm still having a few issues:

1. When I controlclick classes that are in an external assembly, the object browser sometimes points to the library for the incorrect framework. This is pretty easily reproducible: Create a new solution for smart devices for Windows CE 5. Then add a new project to this solution that is a standard Windows (full framework) project. Now controlclick in the auto-generated code (say, the Application.Run() call) in both of the project's Program.cs and observe which library is opened in the object browser. For me, the full framework project opens the System.Windows.Forms element in the tree.
2. I still get some erroneous errors marked by ReSharper when viewing some code in my compact framework projects. Unfortunately, I can't figure out how to produce a reduced test case as the errors are occurring in a rather larger source code file (10000+ lines of code). All of the errors occur on calls on objects that exist in a referenced library. The source file exists in the compact framework project and is added as a link to another project that targets the full framework. The full framework project references the full framework version of the library and it has no errors. Both projects build and run with problems. Unfortunately, creating a new solution with a similar setup referencing the same library doesn't show the errors, so there is something funky going on. The ReSharper errors that I get are along the lines of "Argument type 'bool' is not assignable to parameter type 'bool'". At first I thought I may not have built the libraries properly for compact framework, but this problem doesn't show up in a small project. Is there a way I can turn on some type of debug logging for ReSharper to help you guys solve this issue?
3. Lastly, I get errors similar to those in #2 when I try to make calls into a COM wrapper class that was generated by Visual Studio. I think it may have been compiled incorrectly, so I may need to play with that, but the application itself compiles and runs without a problem. See the attached screenshot for the error. These errors do show up in a smaller solution when referencing the same libraries, so maybe there is something wrong with the libraries themselves?

I am currently running build 804, but I think these issues have been mostly present throughout the 4.0 EAP.

Thanks for any help you may have. Let me know if there is anything I can do to help you guys fix these problems.



Attachment(s):
resharpererror.PNG
11 comments
Comment actions Permalink

We've fixed few of such problems in the latest nightly builds. Please try
build 808 or later, and please report if your problems are still here.

One more question - do you have mixed Compact/full framework projects? I.e.
for example when compact-framework project references full-framework
assembly (say, NUnit...)?

--
Eugene Pasynkov
Developer
JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"
"meltdown" <no_reply@jetbrains.com> wrote in message
news:27146105.20631211558646586.JavaMail.jive@app4.labs.intellij.net...
First off, the ReSharper 4.0 builds are much improved over 3.1 when it comes
to mixed targets. We have a pretty big solution (over 50 projects) with a
mixture of C, C++, and C# projects. The C# projects are about half for the
full framework and half for compact framework. In 3.1 almost all (no
exaggeration) of the code in the compact framework projects were marked as
errors. Fortunately you guys have fixed this in 4.0 (mostly). However, I'm
still having a few issues:

1. When I control+click classes that are in an external assembly, the object
browser sometimes points to the library for the incorrect framework. This
is pretty easily reproducible: Create a new solution for smart devices for
Windows CE 5. Then add a new project to this solution that is a standard
Windows (full framework) project. Now control+click in the auto-generated
code (say, the Application.Run() call) in both of the project's Program.cs
and observe which library is opened in the object browser. For me, the full
framework project opens the System.Windows.Forms element
in the tree.
2. I still get some erroneous errors marked by ReSharper when viewing some
code in my compact framework projects. Unfortunately, I can't figure out
how to produce a reduced test case as the errors are occurring in a rather
larger source code file (10000+ lines of code). All of the errors occur on
calls on objects that exist in a referenced library. The source file exists
in the compact framework project and is added as a link to another project
that targets the full framework. The full framework project references the
full framework version of the library and it has no errors. Both projects
build and run with problems. Unfortunately, creating a new solution with a
similar setup referencing the same library doesn't show the errors, so there
is something funky going on. The ReSharper errors that I get are along the
lines of "Argument type 'bool' is not assignable to parameter type 'bool'".
At first I thought I may not have built the libraries properly for compact
framework, but this problem doesn't show up in a small project. Is there a
way I can turn on some type of debug logging for ReSharper to help you guys
solve this issue?
3. Lastly, I get errors similar to those in #2 when I try to make calls into
a COM wrapper class that was generated by Visual Studio. I think it may
have been compiled incorrectly, so I may need to play with that, but the
application itself compiles and runs without a problem. See the attached
screenshot for the error.

Thanks for any help you may have. Let me know if there is anything I can do
to help you guys fix these problems.


0
Comment actions Permalink

I'll try build 809 and let you know if I still have issues.

We have been very careful not to mix compact and full framework assemblies within a project. We even have separate nunit test projects to test our compact and full framework projects. However, in #3, it is possible that the COM wrapper assemblies that were generated were compiled for full framework. Unfortunately, I don't think there is anything I can do about it. The problem is that we are using a 3rd party's libraries for Windows CE. They also provide identical COM controls for the PC in their SDK. They suggest that you use Visual Studio to generate the .NET COM wrappers (internally, I think VS just calls tlbimp.exe) and use the generated assemblies in the compact framework projects. These generated classes then end up referencing the COM controls in CE with the same GUIDs on the PC so everything works fine. However, I think this is confusing ReSharper a bit since there is a difference between compact full framework datatypes.

However, problem #2 I am pretty sure is a ReSharper issue as the libraries are properly built against compact framework (again, I can't reproduce this is a small project, so maybe there is something confusing ReSharper in my larger project?).

Anyways, thanks for the update and I'll let you know how build 809 goes...

0
Comment actions Permalink

I just tried build 809 and all three problems still exist.

0
Comment actions Permalink

So here is an update on these issues as I see them:

1. This is a ReSharper bug, it should be going to the properly referenced assembly. This is very confusing when attempting to debug issues #2 and #3.
2. I am seeing errors like "Cannot resolve method 'method(byte{})', candidates are: externallibrary method(byte{})". Another error that I see that I think is slightly more useful is the following: "Argument type 'byte{} {]]>}' is not assignable to parameter type 'byte{} {mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089}'". This error suggests that ReSharper believes my project somehow has a byte[] type defined?
3. Given the error seen in the screenshot that I first posted, I think the COM wrapper assembly was, in fact, built for the full framework so that is why ReSharper gets confused over the types (PublicKeyToken b77a... is the compact framework, the other one is the full framework). I've searched around quite a bit and I can't find a way to get tlbimp.exe to generate the assembly for the compact framework, so I may just have to live with this.

Note: I had to use {}'s in some places instead of square brackets since the forum software likes to parse these as links.

Edited by: meltdown on May 27, 2008 11:04 PM

Edited by: meltdown on May 27, 2008 11:06 PM

0
Comment actions Permalink

I just wanted to check on the status of these problems. Have you been able to duplicate these problems? Is there any additional info I can provide to help get this resolved?

0
Comment actions Permalink

The problem is reproduced. Unfortunately, it won't be fixed in 4.0 release.
It will likely be fixed in the first bugfix update.

--
Eugene Pasynkov
Developer
JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"
"meltdown" <no_reply@jetbrains.com> wrote in message
news:15197433.50411212422688725.JavaMail.jive@app4.labs.intellij.net...
>I just wanted to check on the status of these problems. Have you been able
>to duplicate these problems? Is there any additional info I can provide to
>help get this resolved?


0
Comment actions Permalink

Thanks for the update. I'm sorry I wasn't able to report this issue earlier in the development cycle. Is there somewhere I can track the status of these issues (perhaps in your issue tracker)?

0
Comment actions Permalink

There is no such request in tracker right now. I'll let you known once it
will be there

--
Eugene Pasynkov
Developer
JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"
"meltdown" <no_reply@jetbrains.com> wrote in message
news:22419713.58741212509458077.JavaMail.jive@app4.labs.intellij.net...

Thanks for the update. I'm sorry I wasn't able to report this issue
earlier in the development cycle. Is there somewhere I can track the
status of these issues (perhaps in your issue tracker)?



0
Comment actions Permalink

I wanted to follow up with this in hopes that this will get fixed in the next release (which looks to be under development). Is there a bug I can track?

0
Comment actions Permalink

Unfortunately, there is no such request yet.

The main reason is that this is field for investigations, rather than exact
approved problem.

--
Eugene Pasynkov
Developer
JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"
"meltdown" <no_reply@jetbrains.com> wrote in message
news:25688578.82721215118017875.JavaMail.jive@app4.labs.intellij.net...
>I wanted to follow up with this in hopes that this will get fixed in the
>next release (which looks to be under development). Is there a bug I can
>track?


0
Comment actions Permalink

Even this is a old thread I answer here ...

Just continue developing a legacy Smart Device project (using .NET CF 1.0, Visual Studio 2003, ReSharper 2.0.4).
Nearly everything works fine but having the same issues desribed in this thread.

e.g. "Argument type 'System.Type' is not assignable to parameter type 'System.Type"

I wonder if this bug has not beed fixed yet? This bug exists since ReSharper 2.0.x and I think we are not the one and only developers developing Compact Framework apps using ReSharper!? Current Version of ReShaper is 4.5.? ... Is it fixed now!? Please post the link to the JIRA issue.

thx, hfr

0

Please sign in to leave a comment.