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

Code analysis crashing VS alot

5 Answers 86 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.
Paul Lewis
Top achievements
Rank 1
Paul Lewis asked on 29 Jun 2012, 08:56 AM
Hi,

Just code seems to be crashing VS 2012 when i go into debug every time.  I found this in the event log

Tracing was not set up. Tracing will be disabled.
 Exception: System.BadImageFormatException: Could not load file or assembly 'JustCodeAnalysis' or one of its dependencies. An attempt was made to load a program with an incorrect format.
File name: 'JustCodeAnalysis'
   at System.RuntimeTypeHandle.GetTypeByName(String name, Boolean throwOnError, Boolean ignoreCase, Boolean reflectionOnly, StackCrawlMarkHandle stackMark, IntPtr pPrivHostBinder, Boolean loadTypeFromPartialName, ObjectHandleOnStack type)
   at System.RuntimeTypeHandle.GetTypeByName(String name, Boolean throwOnError, Boolean ignoreCase, Boolean reflectionOnly, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean loadTypeFromPartialName)
   at System.Type.GetType(String typeName)
   at System.Diagnostics.TraceUtils.GetRuntimeObject(String className, Type baseType, String initializeData)
   at System.Diagnostics.TypedElement.BaseGetRuntimeObject()
   at System.Diagnostics.ListenerElement.GetRuntimeObject()
   at System.Diagnostics.ListenerElementsCollection.GetRuntimeObject()
   at System.Diagnostics.TraceSource.Initialize()
   at System.Diagnostics.TraceSource.get_Listeners()
   at System.Runtime.Diagnostics.DiagnosticTraceBase.UnsafeRemoveDefaultTraceListener(TraceSource traceSource)
   at System.Runtime.Diagnostics.DiagnosticTraceBase.SetTraceSource(TraceSource traceSource)
   at System.Runtime.Diagnostics.EtwDiagnosticTrace..ctor(String traceSourceName, Guid etwProviderId)

5 Answers, 1 is accepted

Sort by
0
Zdravko
Telerik team
answered on 29 Jun 2012, 01:21 PM
Hi Paul,  

Thanks for the feedback.
I tried to reproduce your issue but I was not able to.
  1. Would you please give us exact instructions how to reproduce this?
  2. Is it reproducible with a new template project or only with your own? 
    • If it is with yours, would you send us a sample one?
  3. Also would you tell us what kind of project you are debugging?
Thank you.

Please, do not hesitate to contact us if you have any further questions or need of assistance.

Greetings,
Zdravko
the Telerik team

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

0
Paul Lewis
Top achievements
Rank 1
answered on 29 Jun 2012, 01:32 PM
Hi,

Sorry my description was a bit poor.

My project is a .net4 web application with a WCF WebAPI rest service (c#) using IISexpress

This error/crash happens when i right click an aspx page and select view in browser.  I have had it happen on a different project as well.

I found turning off the code analysis seems to solve the issue

0
Zdravko
Telerik team
answered on 03 Jul 2012, 07:49 AM
Hi,

 Thanks for the feedback.
I tried to reproduce it by creating a .net4 web application and opening an aspx page with IIS, but I was not able to.
Would you please tell us how exactly you turned off the code analysis ?

Also a small sample project that reproduces it will be highly appreciated.
Thank you.

Regards,
Zdravko
the Telerik team

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

0
James Brown
Top achievements
Rank 1
answered on 02 Aug 2012, 05:58 PM
I get a similar error from JustCodeAnalysis ( Version Q2 2012 SP1 - 2012.2.719.1).

I get the following 2 errors whenever I create - NOT Debug - a new "Blank Solution (Other Project Types -> Visual Studio Solutions)", "Windows Forms Application (C#, .Net Framework 4)" and "Class Library (C#, .Net Framework 4)":

[ note: copied from the "Application" Windows Event Log ]

(1):
System.BadImageFormatException: Could not load file or assembly 'JustCodeAnalysis' or one of its dependencies.
An attempt was made to load a program with an incorrect format.
File name: 'JustCodeAnalysis'
   at System.RuntimeTypeHandle.GetTypeByName(String name, Boolean throwOnError, Boolean ignoreCase, Boolean reflectionOnly, StackCrawlMarkHandle stackMark, Boolean loadTypeFromPartialName, ObjectHandleOnStack type)
   at System.RuntimeTypeHandle.GetTypeByName(String name, Boolean throwOnError, Boolean ignoreCase, Boolean reflectionOnly, StackCrawlMark& stackMark, Boolean loadTypeFromPartialName)
   at System.Type.GetType(String typeName)
   at System.Diagnostics.TraceUtils.GetRuntimeObject(String className, Type baseType, String initializeData)
   at System.Diagnostics.TypedElement.BaseGetRuntimeObject()
   at System.Diagnostics.ListenerElement.GetRuntimeObject()
   at System.Diagnostics.ListenerElementsCollection.GetRuntimeObject()
   at System.Diagnostics.TraceSource.Initialize()
   at System.ServiceModel.Diagnostics.DiagnosticTrace.UnsafeRemoveDefaultTraceListener(PiiTraceSource piiTraceSource)
   at System.ServiceModel.Diagnostics.DiagnosticTrace..ctor(TraceSourceKind sourceType, String traceSourceName, String eventSourceName)
   
   WRN:  Assembly binding logging is turned OFF.
     To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1.
     
   Note:  There is some performance penalty associated with assembly bind failure logging.
     To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog]. 

JustCodeAnalysis.Any.NET4

(2):
System.BadImageFormatException: Could not load file or assembly 'JustCodeAnalysis' or one of its dependencies.
An attempt was made to load a program with an incorrect format.
File name: 'JustCodeAnalysis'
   at System.RuntimeTypeHandle.GetTypeByName(String name, Boolean throwOnError, Boolean ignoreCase, Boolean reflectionOnly, StackCrawlMarkHandle stackMark, Boolean loadTypeFromPartialName, ObjectHandleOnStack type)
   at System.RuntimeTypeHandle.GetTypeByName(String name, Boolean throwOnError, Boolean ignoreCase, Boolean reflectionOnly, StackCrawlMark& stackMark, Boolean loadTypeFromPartialName)
   at System.Type.GetType(String typeName)
   at System.Diagnostics.TraceUtils.GetRuntimeObject(String className, Type baseType, String initializeData)
   at System.Diagnostics.TypedElement.BaseGetRuntimeObject()
   at System.Diagnostics.ListenerElement.GetRuntimeObject()
   at System.Diagnostics.ListenerElementsCollection.GetRuntimeObject()
   at System.Diagnostics.TraceSource.Initialize()
   at System.Runtime.Diagnostics.DiagnosticTrace.CreateTraceSource()
   at System.Runtime.Diagnostics.DiagnosticTrace..ctor(String traceSourceName, Guid etwProviderId)
   
   WRN:  Assembly binding logging is turned OFF.
     To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1.
     
   Note:  There is some performance penalty associated with assembly bind failure logging.
     To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog]. 

JustCodeAnalysis.Any.NET4 3512

Any help identifying the cause, or letting me know if there is a patch available would be appreciated.

Regards,

James A. Brown

0
Zdravko
Telerik team
answered on 06 Aug 2012, 12:47 PM
Hello,

 Thanks for contacting us.

@James Brown 
I tried to reproduce the issue you are having, but I was not able to. Would you open a private ticket and send us your log files located in %localappdata%\JustCode\Logs.
You can also send the exception directly from the JustCode's UI next time it happens.
Thanks for the help.

All the best,
Zdravko
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

Tags
Code Analysis
Asked by
Paul Lewis
Top achievements
Rank 1
Answers by
Zdravko
Telerik team
Paul Lewis
Top achievements
Rank 1
James Brown
Top achievements
Rank 1
Share this question
or