Code analysis crashing VS alot

6 posts, 0 answers
  1. Paul Lewis
    Paul Lewis avatar
    31 posts
    Member since:
    Jan 2010

    Posted 29 Jun 2012 Link to this post

    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)
  2. Zdravko
    Admin
    Zdravko avatar
    657 posts

    Posted 29 Jun 2012 Link to this post

    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 >>

  3. DevCraft banner
  4. Paul Lewis
    Paul Lewis avatar
    31 posts
    Member since:
    Jan 2010

    Posted 29 Jun 2012 Link to this post

    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

  5. Zdravko
    Admin
    Zdravko avatar
    657 posts

    Posted 03 Jul 2012 Link to this post

    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 >>

  6. James Brown
    James Brown avatar
    1 posts
    Member since:
    May 2009

    Posted 02 Aug 2012 Link to this post

    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

  7. Zdravko
    Admin
    Zdravko avatar
    657 posts

    Posted 06 Aug 2012 Link to this post

    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.

Back to Top
DevCraft banner