[219] aspx partial classes

Hi, I'm having problems with the partial classes in an ASPX file.

Somehow the code completion doesn't work for me in a codebehind file for
the components dropped on an aspx page:

public partial class DefaultPage : Page
{
protected void Page_Load(object sender, EventArgs e)
{
// WebParts is not a recognised property by R#
// but it does compile:
WebPart webPart = WebPartManager1.WebParts[0];

// also this compiles but shows up as an error in R#
// can not assign a WebPartZone to WebPartZone
WebPartZone zone = this.WebPartZone1;
}
}

Also, R# doesn't seem to recognise (User) Components defined in the
Web.Config, so the :

So when used in a page the following is indicated as unrecognised tag: ]]>

Possibly the errors occur in combination with:
#18725- An exception has occurred (Logger.LogExceptionEx)" was updated
(getting a lot of those)

Thanks!

17 comments
Comment actions Permalink

Could You send us the whole solution that illustrates the problem? Anyway,
#18725 is fixed in build 220.

--
Sergey V. Coox
JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"


0
Comment actions Permalink

Hello Sergey,
I have the same problem with two different solution. Both ones are
enterprise projects and I'm not allowed to give the code out of our
company. But I guess you can reproduce it on your own by creating some
ASPX and eventually ASCX with code behind.

Marco

0
Comment actions Permalink

Marco,
Your guess is wrong, otherwise I would not ask for the solution. Could You
create a small sample with 2 files?

--
Sergey V. Coox
JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"


0
Comment actions Permalink

Sergey V. Coox (JetBrains) wrote:

Could You send us the whole solution that illustrates the problem? Anyway,
#18725 is fixed in build 220.


Ok, I'll just hv to reinstall R# to see if it's still there

0
Comment actions Permalink

Could You create a small sample with 2 files?

Not at the moment, tomorrow or friday evening.

Marco

0
Comment actions Permalink

Thanks in advance

--
Sergey V. Coox
JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"
"Marco von Frieling" <nospam.fex@web.de> wrote in message
news:du4gaf$2tg$1@is.intellij.net...
>> Could You create a small sample with 2 files?

Not at the moment, tomorrow or friday evening.

>

Marco



0
Comment actions Permalink

Marco von Frieling schrieb:
>> Could You create a small sample with 2 files?


Not at the moment, tomorrow or friday evening.

Ok, now I have created a small sample but cannot reproduce that
behavior. Also I was not able to reproduce another behavior:

In our solution we use log4net extensively and it's referenced in all
our assemblies (about 5 or 6 in that solution) and also in the website.
In the assemblies all is ok with log4net, but in the website VS or R# (I
don't know) says for the line

private static readonly ILog log = LogManager.GetLogger("myLogger");

that ILog and LogManager types have an ambigious reference to log4net
and R# says that "using log4net;" is not needed and we must be very
careful when reformatting code not to get deleted the using declaration.
To reproduce this I've created a web control library with a custom
control and a class library with a simple class, both referenced by the
website and all three referencing log4net.

Maybe the sample solution is to small because or real solution is very
big and complex. Or could it be because the solution was
imported/converted from a VS 2003 solution?

Marco

0
Comment actions Permalink

Marco,
The latter reason is possible. Could You create a solution in VS2003 and
then convert it as it done with Your project?

--
Sergey V. Coox
JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"


0
Comment actions Permalink

Hello Sergey,

The latter reason is possible. Could You create a solution in VS2003 and
then convert it as it done with Your project?

Excuse me for not posting so long, but I had no time to do that. But now
I have, and maybe the latter reason is possible but I still cannot
reproduce the two problems (with build 221, at work I'm up to date till
friday, must be 226 or sth. like that and there we still have both
problems). The reason for this might be that my converted sample project
has 1 aspx, 3 ascx and two or three other classes. Our real project has
about 2500 - 3000 classes including all aspx and ascx in ~5 projects.
Could it be a complexity problem, that it works with small / simple
solutions, but not with very large and complex ones?

Marco

0
Comment actions Permalink

Marco,

The size of the project should not affect it at all. There might be
something in the big file looking pretty normal but breaking R#.

--
Sergey V. Coox
JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"


0
Comment actions Permalink

Sergey,

There might be something in the big file looking pretty normal but breaking R#.


Yes, might be. But what? Do you have any suggestion what I could look or
search for?

0
Comment actions Permalink

Marco,
Do You have C# projects in Your solution, that are referenced from
web-project?

--
Sergey V. Coox
JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"


0
Comment actions Permalink

Do You have C# projects in Your solution, that are referenced from
web-project?

Yes, we have six C# class library projects and one website in our
solution. Hierarchy is like this:

- Company Core Library
- Company Data Base Library : A
- Company Web Library : A, B
- Product Library : A, B, C
- Old Product Library : A, C
- Reporting Library : A

- Website : All Libraries

E will be removed as soon as possible, code moves into the other ones.

Marco

0
Comment actions Permalink

Marco,
I think, this is the root of the problem. Could You create a small solution
with the reference to CO# project and reproduce the problem?
--
Sergey V. Coox
JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"


0
Comment actions Permalink

Sergey,

I think, this is the root of the problem. Could You create a small solution
with the reference to CO# project and reproduce the problem?

Yes, but not yet. Because I have very much to do this week it might take
some days. Maybe at the weekend.

Marco

0
Comment actions Permalink

Sergey,

I think, this is the root of the problem. Could You create a small solution
with the reference to CO# project and reproduce the problem?

It also seems to be a caching issue. I have the problem (log4net unknown
resp. ambigious references) also in the C# class library project which
only contains unit tests. When I close and reopen the solution
everything is ok. But after the first compilation it looks the same as
before closing the solution.

Marco

0
Comment actions Permalink

In our solution we use log4net extensively and it's referenced in all
our assemblies (about 5 or 6 in that solution) and also in the website.
In the assemblies all is ok with log4net, but in the website VS or R# (I
don't know) says for the line

private static readonly ILog log = LogManager.GetLogger("myLogger");

that ILog and LogManager types have an ambigious reference to log4net
and R# says that "using log4net;" is not needed and we must be very
careful when reformatting code not to get deleted the using declaration.
To reproduce this I've created a web control library with a custom
control and a class library with a simple class, both referenced by the
website and all three referencing log4net.

Have a look at the attached screenshot taken from a class of the website.

Marco

0

Please sign in to leave a comment.