Exclude Designer Files - Solution Wide Analysis

Is there a way to exclude designer files (generated code) from solution wide analysis?

-Thanks

0
25 comments

Why do you want this? Performance problems or anything else?

Valentin Kipiatkov
CTO and Chief Scientist
JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"

Is there a way to exclude designer files (generated code) from
solution wide analysis?

-Thanks



0

Not just performance, but these files tend to genrate thousands of messages. I would suggest all generated files be skipped from analysis (Settings, Reference, Designer, ...). This is in addition to those marked with the generated attribute.

0

Indeed! Most generated files will generate tons of warnings from R#,
particularly for fully qualified references and such. I hadn't realized
that the .designer.cs files were being included. I've been working mostly
in WPF lately, which doesn't include its generated files in the solution.
I'd like to see these ignored in solution-wide analysis for the sake of
Windows Forms and ASP.NET developers everywhere.

Regards,
Mike

"Brian Strelioff" <BKStrelioff@Hotmail.com> wrote in message
news:29479573.1204380387896.JavaMail.itn@is.intellij.net...

Not just performance, but these files tend to genrate thousands of
messages. I would suggest all generated files be skipped from analysis
(Settings, Reference, Designer, ...). This is in addition to those marked
with the generated attribute.


0

Hello Mike,

As far as I understand, those files can generate a lot of warnings, but there
should be no errors there. And Solution Wide Analysis currently shows only
errors, so what is the problem?
For example, I can change property name of my custom control (not using rename
refactoring), and I would like Solution Wide Analysis to show me red sign,
because my code will not compile, if this property was used in InitializeComponent
in .designer.cs files.


Sincerely,
Ilya Ryzhenkov

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


MS> Indeed! Most generated files will generate tons of warnings from
MS> R#, particularly for fully qualified references and such. I hadn't
MS> realized that the .designer.cs files were being included. I've been
MS> working mostly in WPF lately, which doesn't include its generated
MS> files in the solution. I'd like to see these ignored in
MS> solution-wide analysis for the sake of Windows Forms and ASP.NET
MS> developers everywhere.
MS>
MS> Regards,
MS> Mike
MS> "Brian Strelioff" <BKStrelioff@Hotmail.com> wrote in message
MS> news:29479573.1204380387896.JavaMail.itn@is.intellij.net...
MS>
>> Not just performance, but these files tend to genrate thousands of
>> messages. I would suggest all generated files be skipped from
>> analysis (Settings, Reference, Designer, ...). This is in addition to
>> those marked with the generated attribute.
>>


0

I was not aware that Solution Wide Analysis only shows errors. Most of the
solutions I am currently working with are quite large, so I switched that
feature off for performance reasons. If it does not include warnings, then
I suppose there is no problem. Thanks for clearing that up :).

Cheers,
Mike

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

Hello Mike,

>

As far as I understand, those files can generate a lot of warnings, but
there should be no errors there. And Solution Wide Analysis currently
shows only errors, so what is the problem?
For example, I can change property name of my custom control (not using
rename refactoring), and I would like Solution Wide Analysis to show me
red sign, because my code will not compile, if this property was used in
InitializeComponent in .designer.cs files.

>
>

Sincerely,
Ilya Ryzhenkov

>

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

>
>

MS> Indeed! Most generated files will generate tons of warnings from
MS> R#, particularly for fully qualified references and such. I hadn't
MS> realized that the .designer.cs files were being included. I've been
MS> working mostly in WPF lately, which doesn't include its generated
MS> files in the solution. I'd like to see these ignored in
MS> solution-wide analysis for the sake of Windows Forms and ASP.NET
MS> developers everywhere.
MS> MS> Regards,
MS> Mike
MS> "Brian Strelioff" <BKStrelioff@Hotmail.com> wrote in message
MS> news:29479573.1204380387896.JavaMail.itn@is.intellij.net...
MS>

>>> Not just performance, but these files tend to genrate thousands of
>>> messages. I would suggest all generated files be skipped from
>>> analysis (Settings, Reference, Designer, ...). This is in addition to
>>> those marked with the generated attribute.
>>>
>


0

Hi Ilya,

this may very well be true for the default settings, but the severities of certain items to be flagged as errors can be changed and then these due become an issue.

I generally don't assume there to be errors in the designer generated files, but in order to use solution wide analysis to flag all inelagant code I set most suggestions, warnings, and errors to errors to have them flagged there.

In an ideal world I would be able to exclude designer files and ask solution wide analysis to show suggestions, warnings, and/or errors.

Just my two cents.

Mirko

0

Agreed, it would be nice to have an option to exclude certain files. After
thinking about it some more, ignoring '.designer' files wouldn't be
enough--some classes might get generated by utilities like xsd.exe,
sqlmetal.exe, or other external tools as part of the build or post-build
process. In those cases, it would be nice to specify a list of files or
folders to be ignored by solution-wide analysis.

Just my $0.02 USD.

Mike

"Mirko Geffken" <no_replay@jetbrains.com> wrote in message
news:16213666.1204572592269.JavaMail.itn@is.intellij.net...

Hi Ilya,

>

this may very well be true for the default settings, but the severities of
certain items to be flagged as errors can be changed and then these due
become an issue.

>

I generally don't assume there to be errors in the designer generated
files, but in order to use solution wide analysis to flag all inelagant
code I set most suggestions, warnings, and errors to errors to have them
flagged there.

>

In an ideal world I would be able to exclude designer files and ask
solution wide analysis to show suggestions, warnings, and/or errors.

>

Just my two cents.

>

Mirko


0

I like to exclude .designer.cs files for ALL projects and solutions because some of them can get really large (more then 8000 lines of code eg. for some EF-models). When I have to go to such files to fix something manually I have to a) wait a while until CPU time is freed by R# and b) it allocates and release much memory (40MB in the case of the 8000 lines EntityFramwork file) => CPU time again. Fan of my laptop is crying ;-)

As .designer-files are generated by Microsoft- and 3rd party-tools there is no need to check them because one can not fix them at all and they will be regenerated anyway. So analyzing .designer-files makes absolutelly no sense in real-world scenario (except to test R#).

I had a look into the R# options where one can add files to exclude. Badly this dialog allows one to add only single files or folders. No support for wildcards in here.

Can this be addressed for a future release?

Thanks and regads,

Marc

ps. I love R# except for this issue ;-)

0

Hello,

Not that easy :) There are usages of other symbols in that files, so we have
to analyse them in order to correctly show globally unused members and other
global analysis things. So, when you exclude them you essentially telling
ReSharper to not count usages there, so you may end up with false unused
members or other weird issues.

Global warnings are available in ReSharper 4.5 EAP.

Sincerely,
Ilya Ryzhenkov

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


IR> I like to exclude .designer.cs files for ALL projects and solutions
IR> because some of them can get really large (more then 8000 lines of
IR> code eg. for some EF-models). When I have to go to such files to fix
IR> something manually I have to a) wait a while until CPU time is freed
IR> by R# and b) it allocates a
IR>
IR> nd release much memory (40MB in the case of the 8000 lines
IR> EntityFramwork file) => CPU time again. Fan of my laptop is crying
IR> ;)
IR>
IR> As .designer-files are generated by Microsoft- and 3rd party-tools
IR> there is no need to check them because one can not fix them at all
IR> and they will be regenerated anyway. So analyzing .designer-files
IR> makes absolutelly no sense in real-world scenario (except to test
IR> R#).
IR>
IR> I had a look into the R# options where one can add files to exclude.
IR> Badly this dialog allows one to add only single files or folders. No
IR> support for wildcards in here.
IR>
IR> Can this be addressed for a future release?
IR>
IR> Thanks and regads,
IR>
IR> Marc
IR>
IR> ps. I love R# except for this issue ;)
IR>
IR> ---
IR> Original message URL:
IR> http://www.jetbrains.net/devnet/message/5232454#5232454


0

hi ilya

so this means we have to live with it as it is and therefore wait a little for huge .designer-files? can you think of any smart improvement to reduce the overhead the .designer-files - specially for the big designer files?

it would nice if one can at least switch of the coloring in code and on the overview on the right hand side of the editor. error's / warnings etc. in .designer-files are not relevant and do confuse users only. what do you think?

regards,
marc

0

I think it would be beneficial for performance if one just simply eliminated
the color highlighting and syntax checking for such files. Yeah, you still
need to parse to get the symbols and references, but virtually everything
else is unnecessary and pointless, no?

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

Hello,

>

Not that easy :) There are usages of other symbols in that files, so we
have to analyse them in order to correctly show globally unused members
and other global analysis things. So, when you exclude them you
essentially telling ReSharper to not count usages there, so you may end
up with false unused members or other weird issues.
Global warnings are available in ReSharper 4.5 EAP.

>

Sincerely,
Ilya Ryzhenkov

>

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

>
>

IR> I like to exclude .designer.cs files for ALL projects and solutions
IR> because some of them can get really large (more then 8000 lines of
IR> code eg. for some EF-models). When I have to go to such files to fix
IR> something manually I have to a) wait a while until CPU time is freed
IR> by R# and b) it allocates a
IR> IR> nd release much memory (40MB in the case of the 8000 lines
IR> EntityFramwork file) => CPU time again. Fan of my laptop is crying
IR> ;)
IR> IR> As .designer-files are generated by Microsoft- and 3rd party-tools
IR> there is no need to check them because one can not fix them at all
IR> and they will be regenerated anyway. So analyzing .designer-files
IR> makes absolutelly no sense in real-world scenario (except to test
IR> R#).
IR> IR> I had a look into the R# options where one can add files to
exclude.
IR> Badly this dialog allows one to add only single files or folders. No
IR> support for wildcards in here.
IR> IR> Can this be addressed for a future release?
IR> IR> Thanks and regads,
IR> IR> Marc
IR> IR> ps. I love R# except for this issue ;)
IR> IR> ---
IR> Original message URL:
IR> http://www.jetbrains.net/devnet/message/5232454#5232454

>


0

I totally agree!

Cheers, Marc

0

I really hope you guys can address this issue in 4.5 release. You can use this file for analysis, but do NOT display any warning for .desinger.cs file.

J.W.

0

Out of curiosity, is there a reason that you even need such files open such that coloring, the stripe, etc. even matter?

0

Hi, i also would really love to have this feature. But i see your point.

But like Paul Bradshaw wrote, it would be great, if you count all you need, but don´t flag anything in the *.Designer.* files (a switch in options, would be helpful).

In Resharper 5beta the problem shows more directly when you start a solution wide "Code Inspection". Thousands and thousands of warnings in designer files are not very useful in a big ASP.Net and Entity Framework solution.

I really love Resharper 5 in VS2010, it is undoubtably the best extension for VS in my opinion.

Best regards,

            Michael A. Volz

0

FYI R#v5 Beta gives me "out of memory" errors when opening designer files and more or less the whole side bar was one orange stripe.

0
Avatar
Andrey Serebryansky

Hello Simon
     Try disabling code analysis for the current file (Ctrl+Shift+Alt+8) after opening the .designer.cs file in the editor. Let me know if this helps. Thank you!

Andrey Serebryansky

Support Engineer

JetBrains, Inc

http://www.jetbrains.com

"Develop with pleasure!"

0

Hello Eric,

Try latest nightly builds of ReSharper 5.0. There you can add file mask for
files to ignore, in addition to code regions.

Sincerely,
Ilya Ryzhenkov

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


ET> Is there a way to exclude designer files (generated code) from
ET> solution wide analysis?
ET>
ET> -Thanks
ET>


0

Thanks Andrey and Ily,
Just noticed that, great addition!

Cheers
Simon

0

Is it possible to extend the exclusions for the Inspect Code functionality - and maybe have an option in the Inspection Results to show issues for excluded regions/files.
When inspecting code I tend to get hundreds of issues raised for autogenerated files that I can't do anything about.

0

Hello,

Exclusions should work in Inspect Code also, doesn't it work for you?

Sincerely,
Ilya Ryzhenkov

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


IR> Is it possible to extend the exclusions for the Inspect Code
IR> functionality - and maybe have an option in the Inspection Results
IR> to show issues for excluded regions/files. When inspecting code I
IR> tend to get hundreds of issues raised for autogenerated files that I
IR> can't do anything about.
IR>
IR> ---
IR> Original message URL:
IR> http://www.jetbrains.net/devnet/message/5254597#5254597


0

No sadly not (I'm using build 1577 - 19 Jan) on VS 2008.
The file exclusions have the default *.Designer.cs and *.Designer.vb in, but Inspect code shows all the suggestions for all designer files.

0

I just got build 1600 and ran inspect code on a project it seems to work correctly now i have gone from 6000 warnings to 60 on a project that has never had reSharper run on it before.

0

Actually sorry just looking through it is still showing some designer.cs files but a lot less.


0

I have a very large WinForms solution with over 250 forms. It is also has a massive EF model which if R# even breathes on I get out of memory errors.

When I do the Solution Analysis, I see LOTS of stuff from teh designer files.  Yes it is not as much as it used to be in v4.5 but even still, if the filter in the Options says *.Designer.cs, I would expect to not see any files in there at all.

I also agree that all generated files should be excluded and there should be more defaults setup for Settings, Resources etc.

When will this feature be fixed?

0

Please sign in to leave a comment.