Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Unity 5.5.1f1 VS 2015 SyntaxTree.VisualStudio.Unity FileLoadException

Discussion in 'Editor & General Support' started by Zeminor, Feb 10, 2017.

  1. Zeminor

    Zeminor

    Joined:
    Aug 22, 2012
    Posts:
    20
    Hi,

    I get an error if I open a unity project with the new unity version and Visual Studio Tool For Unity 2.8.1.0:

    This is the entry of the ActivityLog.xml from Visual Studio (German):
    <entry>
    <record>575</record>
    <time>2017/02/10 11:01:44.655</time>
    <type>Error</type>
    <source>Editor or Editor Extension</source>
    <description>System.IO.FileLoadException: Die Datei oder Assembly &quot;SyntaxTree.VisualStudio.Unity, Version=2.8.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35&quot; oder eine Abh&#x00E4;ngigkeit davon wurde nicht gefunden. Die gefundene Manifestdefinition der Assembly stimmt nicht mit dem Assemblyverweis &#x00FC;berein. (Ausnahme von HRESULT: 0x80131040)&#x000D;&#x000A;Dateiname: &quot;SyntaxTree.VisualStudio.Unity, Version=2.8.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35&quot;&#x000D;&#x000A; bei System.Reflection.RuntimeAssembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark&amp; stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)&#x000D;&#x000A; bei System.Reflection.RuntimeAssembly.nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark&amp; stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)&#x000D;&#x000A; bei System.Reflection.RuntimeAssembly.InternalLoadAssemblyName(AssemblyName assemblyRef, Evidence assemblySecurity, RuntimeAssembly reqAssembly, StackCrawlMark&amp; stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)&#x000D;&#x000A; bei System.Reflection.Assembly.Load(AssemblyName assemblyRef)&#x000D;&#x000A; bei Microsoft.VisualStudio.ExtensibilityHosting.FaultCatchingAssemblyLoader.&lt;LoadAssembly&gt;b__15_0(AssemblyName assemblyNameParam)&#x000D;&#x000A; bei Microsoft.VisualStudio.ExtensibilityHosting.Utilities.SafeGetOrAdd[TKey,TValue](IDictionary`2 dictionary, TKey key, Object lockObj, Func`2 valueFactory)&#x000D;&#x000A; bei Microsoft.VisualStudio.ExtensibilityHosting.FaultCatchingAssemblyLoader.LoadAssembly(AssemblyName assemblyName)&#x000D;&#x000A; bei Microsoft.VisualStudio.Composition.Reflection.ResolverExtensions.Resolve(ConstructorRef constructorRef)&#x000D;&#x000A; bei Microsoft.VisualStudio.Composition.RuntimeComposition.RuntimePart.get_ImportingConstructor()&#x000D;&#x000A; bei Microsoft.VisualStudio.Composition.RuntimeExportProviderFactory.RuntimeExportProvider.RuntimePartLifecycleTracker.CreateValue()&#x000D;&#x000A; bei Microsoft.VisualStudio.Composition.ExportProvider.PartLifecycleTracker.Create()&#x000D;&#x000A; bei Microsoft.VisualStudio.Composition.ExportProvider.PartLifecycleTracker.MoveNext(PartLifecycleState nextState)&#x000D;&#x000A; bei Microsoft.VisualStudio.Composition.ExportProvider.PartLifecycleTracker.MoveToState(PartLifecycleState requiredState)&#x000D;&#x000A; bei Microsoft.VisualStudio.Composition.ExportProvider.PartLifecycleTracker.GetValueReadyToExpose()&#x000D;&#x000A; bei Microsoft.VisualStudio.Composition.RuntimeExportProviderFactory.RuntimeExportProvider.&lt;&gt;c__DisplayClass15_0.&lt;GetExportedValueHelper&gt;b__0()&#x000D;&#x000A;--- Ende der Stapel&#x00FC;berwachung vom vorhergehenden Ort, an dem die Ausnahme ausgel&#x00F6;st wurde ---&#x000D;&#x000A; bei Microsoft.VisualStudio.Composition.RuntimeExportProviderFactory.RuntimeExportProvider.&lt;&gt;c__DisplayClass15_0.&lt;GetExportedValueHelper&gt;b__0()&#x000D;&#x000A; bei Microsoft.VisualStudio.Composition.DelegateServices.&lt;&gt;c__DisplayClass2_0`1.&lt;As&gt;b__0()&#x000D;&#x000A; bei System.Lazy`1.CreateValue()&#x000D;&#x000A;--- Ende der Stapel&#x00FC;berwachung vom vorhergehenden Ort, an dem die Ausnahme ausgel&#x00F6;st wurde ---&#x000D;&#x000A; bei System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()&#x000D;&#x000A; bei System.Lazy`1.get_Value()&#x000D;&#x000A; bei Microsoft.VisualStudio.Text.Tagging.Implementation.TagAggregator`1.GatherTaggers(ITextBuffer textBuffer)&#x000D;&#x000A;&#x000D;&#x000A;</description>
    </entry>


    I don't know where the extension is looking for this assembly or where it has to be.

    Maybe someone could help here...

    Regards
    Stefan
     
  2. Daveoh

    Daveoh

    Joined:
    Mar 15, 2011
    Posts:
    5
    I'm getting the same issue, with Unity 5.5.2f1 and Visual Studio Tools for Unity 2.8.2.0. I just upgraded from 5.5.0f3 and now can't use Visual Studio as it crashes when I start using it.

     
  3. kinodax

    kinodax

    Joined:
    Dec 3, 2014
    Posts:
    22
    Same as Daveoh except Visual Studio Tools for Unity 2.8.1.0
     
  4. frg_kova

    frg_kova

    Joined:
    Jul 16, 2015
    Posts:
    16
    Deleting cache helped me:
    %localappdata%\Microsoft\VisualStudio\14.0\ComponentModelCache
     
  5. Daniel-Dobson

    Daniel-Dobson

    Joined:
    Feb 6, 2017
    Posts:
    1
    Thanks frg_kova your suggestion of deleting the cache also helped me :)
     
  6. JohnTube

    JohnTube

    Joined:
    Sep 29, 2014
    Posts:
    66
  7. aquay

    aquay

    Joined:
    Feb 23, 2017
    Posts:
    5
  8. Daveoh

    Daveoh

    Joined:
    Mar 15, 2011
    Posts:
    5
  9. pixelmechanic

    pixelmechanic

    Joined:
    Jan 8, 2014
    Posts:
    10
    Thanks a lot to frg_kova :)
    Reinstalling doesn't work for me, but clearing the ComponentModelCache Folder does the trick!
     
  10. tdvance

    tdvance

    Joined:
    Nov 8, 2016
    Posts:
    4
    The same error occurs on Version 2.8.2.0, just released 3 days ago, for Unity Version 5.5.2f1. Reported to unity, but it was a month ago too, so apparently no desire to fix the bug....

    Deleting the cache file in the directory:

    %localappdata%\Microsoft\VisualStudio\14.0\ComponentModelCache

    did fix it. But if it's that easy a fix, why not built into installer....
     
    andyz likes this.
  11. andyz

    andyz

    Joined:
    Jan 5, 2010
    Posts:
    2,132
    Got same issue with same fix on updating Unity Tools in VS - poor experience!
     
  12. meverett

    meverett

    Joined:
    Sep 9, 2005
    Posts:
    34
    Thanks for the fix! Has anyone filed an official bug on this yet? This is really something Unity QA should catch and address. Upgrading shouldn't cause Visual Studio to crash with no obvious fix. That's a pretty big deal.
     
  13. Pixsaoul

    Pixsaoul

    Joined:
    Feb 10, 2014
    Posts:
    14
    The tricks works wonder ! Thanks @frg_kova
     
  14. dual_good_health

    dual_good_health

    Joined:
    May 13, 2011
    Posts:
    14
    Paste %localappdata%\Microsoft\VisualStudio\14.0\ComponentModelCache into File Explorer and delete all files in folder worked a treat, thanks @frg_kova!


     
  15. PNUMIA-Rob

    PNUMIA-Rob

    Joined:
    Jan 7, 2015
    Posts:
    33
    Many thanks @frg_kova! Worked like a charm :cool:
     
  16. hangar

    hangar

    Joined:
    Feb 1, 2013
    Posts:
    21
    Saved me hours of pain. Thanks @frg_kova
     
  17. biodam

    biodam

    Joined:
    Jul 10, 2013
    Posts:
    17