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

Control Libraries and unknown namespace

17 Answers 156 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.
Marcus
Top achievements
Rank 1
Marcus asked on 30 Dec 2009, 01:01 AM
I'm getting many many errors in my ASP.NET c# solution due to JustCode not being able to identify a control library I have included in the solution.
Getting messages such as "Unknown type or namespace" when including the controls.
The project builds and runs fine, so this appears to be a problem with JustCode.
I have also tried referring to the control library in our NUnit test project, which removes the possibility of bad web.config settings, and the error persists still.
Can you advise if this is a known problem? Currently showing 1037 errors in JustCode which makes this particular feature more or less useless at this point.

17 Answers, 1 is accepted

Sort by
0
Deyan Varchev
Telerik team
answered on 05 Jan 2010, 04:01 PM
Hi Marcus,

 I apologize for any inconvenience that we have caused you. We need just a bit more information from you to be able to reproduce the problem. First, what is the control library that JustCode cannot recognize? Is it a project that you have created in the same solution, a dll that you reference form some folder, or a dll that is registered in the GAC? Do you have that problem with some particular dll or it is reproducible with any control library?
If you are able to send us a small solution that demonstrates the problem it will be great.

Thanks in advance.

Sincerely yours,
Deyan
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
Marcus
Top achievements
Rank 1
answered on 07 Jan 2010, 06:41 AM
Hi there,

I've put together a sample solution to try to demonstrate the problem and it's not causing any problems there! I'll try to work out what is the difference between the two solutions (our solution is quite a bit larger than my sample!) and let you know what I find out.

Thanks,

Marcus
0
Deyan Varchev
Telerik team
answered on 08 Jan 2010, 11:59 AM
Hello Marcus,

 Thank you for taking the time to track this problem. We will be waiting patiently for more info that you could provide on the subject. One thing that you could try very quickly is to try and refresh the code analysis manually - choose from JustCode's menu "Refresh Code Analysis". This will trigger a total refresh of the code analysis for the whole solution. For large solutions this could take several seconds to reanalyze everything. See if the error still persists after the progress has finished.

Kind regards,

Deyan
the Telerik team

 


Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
Marcus
Top achievements
Rank 1
answered on 11 Jan 2010, 10:26 PM
Hi there,

I'm still going with trying to replicate the problem in a "simple" project for you.
A couple of further pieces of information:
  • Update to 2010.1.108 has not changed the situation
  • Refresh Code Analysis does not work either
I'll hopefully have time to spend today to work on the problem further and will post any results I get.

Regards,

Marcus
0
Deyan Varchev
Telerik team
answered on 13 Jan 2010, 01:35 PM
Hi Marcus,

 One other thing that you could try is the following procedure.
1. Open Visual Studio.
2. Go to JustCode menu -> Options
3. Ensure that the "Enable verbose logging" option is on.
4. Open your solution and "Refresh Code Analysis"
5. Send us the most recently modified log file from JustCode log folder - usually it is in C:\Users\<your username>\AppData\Local\JustCode\Logs for Vista and Windows 7.

Let's see if something will popup.

Kind regards,
Deyan
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
Marcus
Top achievements
Rank 1
answered on 14 Jan 2010, 03:42 AM
Hi again,

I tried getting the logs but couldn't really see anything of value in them.
Tried many many things, with no luck, but finally have managed to resolve the issue:
1. Created a new control library project
2. Copied my existing source code to the new project
3. Removed all references to the old project from the solution
4. Added the new project to the solution
And surprisingly, the errors have gone! Same source code, same configuration. So I'm wondering if somewhere there was some entry cached in JustCode or Visual Studio? I have tried doing a diff on the .csproj files but apart from a couple of changed GUIDs they look more or less identical.

Anyway, the issue is now resolved (I have a couple of other things to check but will do them in a different thread!)

Thanks for your help, and sorry I have not been able to shed any real light on the original cause of the problems.

Regards,

Marcus
0
Deyan Varchev
Telerik team
answered on 14 Jan 2010, 08:20 AM
Hello Marcus,

 Thanks for the info. We are happy that your problem was resolved and apologize for the inconvenience that you experienced. You made some remarkable efforts to work around this problem. For those efforts we have awarded you some Telerik points.

If you have any further problems or suggestions please don't hesitate to contact us again.

All the best,
Deyan
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
Stuart Hemming
Top achievements
Rank 2
answered on 14 Jan 2010, 08:24 AM
Marcus,

If it's any consolation (and it's prolly not) I've had something similar from day one where we have a web app that uses controls from a different solution and all of the solutions are rebuilt (we use Cruise Control/NAnt for this) whilst the web app is open in VS. It can take quite a while for JC to get it's head around what's gone on.

--
Stuart
0
Sven
Top achievements
Rank 2
answered on 04 Feb 2010, 05:19 PM
Hi Deyan,

I'm having the same issue, which doesn't get solved with refresh code analysis.

How can I send the verbose log file private ?

It's filled with these kind of errors:
SILENT 2010-02-04 18:10:12.409 : Server (2676): Warning: Could not release enough syntax trees to get below maximum cache size - Cache size: 14187920, Trees: 4


0
Deyan Varchev
Telerik team
answered on 05 Feb 2010, 09:34 AM
Hello Sven,

 I've opened a support ticket on your behalf - please feel free to send us any further details and the log files there.

Best wishes,
Deyan
the Telerik team

Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Follow the status of features or bugs in PITS and vote for them to affect their priority.
0
John Bachus
Top achievements
Rank 1
answered on 16 Feb 2010, 04:50 PM
I think I have figured out what this issue is, It started with the last Update I retrieved. It appears that If you Have a Class that is not the same as the name of the file, it gives you this error. Unfortunately lt it looks at enums the same way as if there was a file to associate with the Enum/class. So I Had the Error in One of my Classes that was not capitalized the Same way The Class Started with a capital C and The file started with a small c once I changed The file name to C it did not have the error, but I cannot change the filename of a Enum since there isn't one.

JB
0
Marcus
Top achievements
Rank 1
answered on 16 Feb 2010, 08:23 PM
Hi John,

interesting... all our class names match the filenames in the control library I was having problems with. That said, it's not out of the question that we renamed a class and filename at some point, which would temporarily result in the situation you describe...

Cheers,

Marcus
0
Deyan Varchev
Telerik team
answered on 19 Feb 2010, 01:14 PM
Hi John,

Thank you for  the feedback. Following your detailed explanations I was not able to reproduce the problem you are describing. Would it be possible for you to try and replicate it with a sample solution and send it over to us? It will be of great help to pin and solve the problem.
Your help is much appreciated.

Sincerely yours,
Deyan
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
0
John Bachus
Top achievements
Rank 1
answered on 19 Feb 2010, 07:10 PM
I have 2 Images one is a data layer (image1) the other is the app, in the datalayer has no errors but when referenced from the app (image2) it shows all of the classes as errors but if you look at the data class a little more you Find this...(Image3)  Notice in image 3 it is hovering over an enum. Unfortunately I cannot send code.
0
John Bachus
Top achievements
Rank 1
answered on 23 Feb 2010, 03:53 PM
Here is a New Update on this... when I was dveloping my controls I had renamed my namespaces to CBBurnet.Web.Data.Telecom, in the Project Page though it was Still CBBurnet.Web.Applications.Telecom once I chnaged That to the correct Name space all the errors stopped. Although I still have a warnig that a return value from a function is not being used when it is being used but thats a different subject. see image...
0
Deyan Varchev
Telerik team
answered on 23 Feb 2010, 04:20 PM
Hi John,

 Good to here that all Good-code-reds have disappeared for you. We were considering the namespaces as a reason for the false positives and will continue to look into the problem. If that pops up again please don't hesitate to come back to us and report it.
 As for your other problem, you are right to complain for this warning. What JustCode is trying to say here is that your variable is only assigned a value and its value is never used. Obviously that is not the case with your example - you assign a value to it and at the same time have it in an "if" clause.  Although this is a legal syntax I'm guessing what you really wanted to write is - if (retValue == true) and not if (retValue = true). 
 Anyway, this appears to be a valid Good-Code-Yellow and I'll log it for fixing. 

Best wishes,
Deyan
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
0
John Bachus
Top achievements
Rank 1
answered on 23 Feb 2010, 05:54 PM
Thanks for the response I hope everyone else solved thire issus as well and The retVal == true is correct and the warnings disappeared as a VB person doing c# I forget about those things. Thanks for the Info....
Tags
Code Analysis
Asked by
Marcus
Top achievements
Rank 1
Answers by
Deyan Varchev
Telerik team
Marcus
Top achievements
Rank 1
Stuart Hemming
Top achievements
Rank 2
Sven
Top achievements
Rank 2
John Bachus
Top achievements
Rank 1
Share this question
or