This is a migrated thread and some comments may be shown as answers.

InternalVisibleTo in Code File

5 Answers 94 Views
Code Analysis
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Chris
Top achievements
Rank 1
Chris asked on 26 Feb 2012, 06:53 PM
I just installed JustCode and noticed that while having
[assemblyInternalsVisibleTo(...)]

in a code file other than Assembly.cs is valid as far as the compiler is concerned (though perhaps not the best choice), JustCode doesn't recognize it and shows errors.

VS2010
Framework 4 class library
C#
JustCode Trial Version Q1 2012 SP1 Internal Build (2012.1.223.2)

5 Answers, 1 is accepted

Sort by
0
Ivan
Telerik team
answered on 27 Feb 2012, 01:25 PM
Hello,

Thank you for your feedback. Actually, JustCode supports this feature. Could you try refreshing the code analysis from "JustCode -> Analysis -> Refresh Code Analysis". It is possible that something unexpected happened and this caused the good-code-reds.
Thank you for your help!

Greetings,
Ivan
the Telerik team
Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>
0
Chris
Top achievements
Rank 1
answered on 28 Feb 2012, 01:35 AM
Refreshing the code analysis did remove the error messages, Thanks! :)

I tried a couple of things in the original project and a brand new one just to see what may have caused it (I can send the sample project to you if you want) and noticed the behavior listed below.  Not sure if this is expected or not.

Assembly directive is in the code file
- directive is removed or commented out:
  • an error shows up in the JustCode errors window automatically
  • a warning shows up in the JustCode errors window for the using statement no longer being required automatically
  • a green squiggly shows up under the System.Runtime.CompilerServices using statement automatically

- directive is added or uncommented:
  • error remains in the JustCode error window unless refreshed manually
  • warning disappears from JustCode error window automatically
  • green squiggly disappears automatically

Assembly directive is in the Assembly.cs file...
- directive is removed or commented out:

  • an error shows up in the JustCode errors window automatically
  • a warning shows up in the JustCode errors window for the using statement no longer being required automatically
  • a green squiggly shows up under the System.Runtime.CompilerServices using statement automatically

- directive is added or uncommented
  • error disappears from the JustCode error window automatically
  • warning disappears from JustCode error window automatically
  • green squiggly disappears automatically

0
Ivan
Telerik team
answered on 02 Mar 2012, 10:59 AM
Hello,

Thank you for your feedback. Adding the assembly directive in a code file should also refresh the analysis automatically. I have logged that for fixing. Every other behavior you have described is expected.
If you have any more questions or remarks, please do not hesitate to contact us again!

All the best,
Ivan
the Telerik team
Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>
0
KarenHaris
Top achievements
Rank 2
answered on 18 Apr 2012, 10:07 AM
What does good-code-reds indicates?
swim caps
0
Ivan
Telerik team
answered on 19 Apr 2012, 03:22 PM
Hello,

Good-Code-Red indicates that JustCode shows an error in a solution, but it builds fine.
If you have any more questions or remarks, please do not hesitate to contact us again!

All the best,
Ivan
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

Tags
Code Analysis
Asked by
Chris
Top achievements
Rank 1
Answers by
Ivan
Telerik team
Chris
Top achievements
Rank 1
KarenHaris
Top achievements
Rank 2
Share this question
or