dotnet / ResXResourceManager

Manage localization of all ResX-Based resources in one central place.
MIT License
1.33k stars 218 forks source link

does not work in VS2017 #515

Closed trivalik closed 1 year ago

trivalik commented 1 year ago

Important Read https://github.com/dotnet/ResXResourceManager/blob/master/Documentation/Topics/Troubleshooting.md first. Problems listed there are bugs in Visual Studio and should be reported to Microsoft, not here.

Describe the bug I guess since latest update of VS2022 in November it comes to this problem that Resx is not able open because of exception.

To Reproduce It depends on version:

1.7.1 has this exception:

  <entry>
    <record>634</record>
    <time>2022/12/01 06:42:17.186</time>
    <type>Error</type>
    <source>VisualStudio</source>
    <description>SetSite failed for package [VsPackage]Source: &apos;mscorlib&apos; Description: Die Datei oder Assembly &quot;System.Composition.AttributedModel, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a&quot; oder eine Abh&#x00E4;ngigkeit davon wurde nicht gefunden. Das System kann die angegebene Datei nicht finden.&#x000D;&#x000A;System.IO.FileNotFoundException: Die Datei oder Assembly &quot;System.Composition.AttributedModel, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a&quot; oder eine Abh&#x00E4;ngigkeit davon wurde nicht gefunden. Das System kann die angegebene Datei nicht finden.&#x000D;&#x000A;File name: &apos;System.Composition.AttributedModel, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a&apos;&#x000D;&#x000A;   at System.ModuleHandle.ResolveMethod(RuntimeModule module, Int32 methodToken, IntPtr* typeInstArgs, Int32 typeInstCount, IntPtr* methodInstArgs, Int32 methodInstCount)&#x000D;&#x000A;   at System.ModuleHandle.ResolveMethodHandleInternalCore(RuntimeModule module, Int32 methodToken, IntPtr[] typeInstantiationContext, Int32 typeInstCount, IntPtr[] methodInstantiationContext, Int32 methodInstCount)&#x000D;&#x000A;   at System.ModuleHandle.ResolveMethodHandleInternal(RuntimeModule module, Int32 methodToken, RuntimeTypeHandle[] typeInstantiationContext, RuntimeTypeHandle[] methodInstantiationContext)&#x000D;&#x000A;   at System.Reflection.CustomAttributeData..ctor(RuntimeModule scope, CustomAttributeRecord caRecord)&#x000D;&#x000A;   at System.Reflection.CustomAttributeData.GetCustomAttributes(RuntimeModule module, Int32 tkTarget)&#x000D;&#x000A;   at System.Reflection.CustomAttributeData.GetCustomAttributesInternal(RuntimeType target)&#x000D;&#x000A;   at System.RuntimeType.GetCustomAttributesData()&#x000D;&#x000A;   at TomsToolbox.Composition.MetadataReader.ReadType(TypeInfo typeInfo, IList`1 result)&#x000D;&#x000A;   at TomsToolbox.Composition.MetadataReader.ReadTypes(IEnumerable`1 typeInfos, IList`1 result)&#x000D;&#x000A;   at TomsToolbox.Composition.MetadataReader.Read(Assembly assembly)&#x000D;&#x000A;   at System.Linq.Enumerable.&lt;SelectManyIterator&gt;d__17`2.MoveNext()&#x000D;&#x000A;   at TomsToolbox.Composition.Ninject.ExtensionMethods.BindExports(IKernel kernel, IEnumerable`1 exportInfos)&#x000D;&#x000A;   at TomsToolbox.Composition.Ninject.ExtensionMethods.BindExports(IKernel kernel, IEnumerable`1 assemblies)&#x000D;&#x000A;   at ResXManager.VSIX.VsPackage.FillCatalog()&#x000D;&#x000A;   at System.Threading.Tasks.Task`1.InnerInvoke()&#x000D;&#x000A;   at System.Threading.Tasks.Task.Execute()&#x000D;&#x000A;--- End of stack trace from previous location where exception was thrown ---&#x000D;&#x000A;   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)&#x000D;&#x000A;   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)&#x000D;&#x000A;   at ResXManager.VSIX.VsPackage.&lt;InitializeAsync&gt;d__15.MoveNext()&#x000D;&#x000A;--- End of stack trace from previous location where exception was thrown ---&#x000D;&#x000A;   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)&#x000D;&#x000A;   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)&#x000D;&#x000A;   at Microsoft.VisualStudio.Shell.AsyncPackage.&lt;&gt;c__DisplayClass17_0.&lt;&lt;Microsoft-VisualStudio-Shell-Interop-IAsyncLoadablePackageInitialize-Initialize&gt;b__1&gt;d.MoveNext()&#x000D;&#x000A;--- End of stack trace from previous location where exception was thrown ---&#x000D;&#x000A;   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)&#x000D;&#x000A;   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)&#x000D;&#x000A;   at Microsoft.VisualStudio.Threading.JoinableTask.&lt;JoinAsync&gt;d__78.MoveNext()&#x000D;&#x000A;&#x000D;&#x000A;WRN: Protokollierung der Assemblybindung ist AUS.&#x000D;&#x000A;Sie k&#x00F6;nnen die Protokollierung der Assemblybindungsfehler aktivieren, indem Sie den Registrierungswert [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) auf 1 festlegen.&#x000D;&#x000A;Hinweis: Die Protokollierung der Assemblybindungsfehler f&#x00FC;hrt zu einer gewissen Leistungseinbu&#x00DF;e.&#x000D;&#x000A;Sie k&#x00F6;nnen dieses Feature deaktivieren, indem Sie den Registrierungswert [HKLM\Software\Microsoft\Fusion!EnableLog] entfernen.&#x000D;&#x000A;</description>
    <guid>{43B35FE0-1F30-48DE-887A-68256474202A}</guid>
    <hr>80070002</hr>
    <errorinfo></errorinfo>
  </entry>

Version 1.72 has this exception:

  <entry>
    <record>569</record>
    <time>2022/12/01 06:56:20.331</time>
    <type>Error</type>
    <source>VisualStudio</source>
    <description>SetSite failed for package [VsPackage]Source: &apos;mscorlib&apos; Description: Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information.&#x000D;&#x000A;System.Reflection.ReflectionTypeLoadException: Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information.&#x000D;&#x000A;   at System.Reflection.RuntimeModule.GetTypes(RuntimeModule module)&#x000D;&#x000A;   at System.Reflection.RuntimeAssembly.get_DefinedTypes()&#x000D;&#x000A;   at TomsToolbox.Composition.MetadataReader.Read(Assembly assembly)&#x000D;&#x000A;   at System.Linq.Enumerable.&lt;SelectManyIterator&gt;d__17`2.MoveNext()&#x000D;&#x000A;   at TomsToolbox.Composition.Ninject.ExtensionMethods.BindExports(IKernel kernel, IEnumerable`1 exportInfos)&#x000D;&#x000A;   at TomsToolbox.Composition.Ninject.ExtensionMethods.BindExports(IKernel kernel, IEnumerable`1 assemblies)&#x000D;&#x000A;   at ResXManager.VSIX.VsPackage.FillCatalog()&#x000D;&#x000A;   at System.Threading.Tasks.Task`1.InnerInvoke()&#x000D;&#x000A;   at System.Threading.Tasks.Task.Execute()&#x000D;&#x000A;--- End of stack trace from previous location where exception was thrown ---&#x000D;&#x000A;   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)&#x000D;&#x000A;   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)&#x000D;&#x000A;   at ResXManager.VSIX.VsPackage.&lt;InitializeAsync&gt;d__15.MoveNext()&#x000D;&#x000A;--- End of stack trace from previous location where exception was thrown ---&#x000D;&#x000A;   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)&#x000D;&#x000A;   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)&#x000D;&#x000A;   at Microsoft.VisualStudio.Shell.AsyncPackage.&lt;&gt;c__DisplayClass17_0.&lt;&lt;Microsoft-VisualStudio-Shell-Interop-IAsyncLoadablePackageInitialize-Initialize&gt;b__1&gt;d.MoveNext()&#x000D;&#x000A;--- End of stack trace from previous location where exception was thrown ---&#x000D;&#x000A;   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)&#x000D;&#x000A;   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)&#x000D;&#x000A;   at Microsoft.VisualStudio.Threading.JoinableTask.&lt;JoinAsync&gt;d__78.MoveNext()</description>
    <guid>{43B35FE0-1F30-48DE-887A-68256474202A}</guid>
    <hr>80131602</hr>
    <errorinfo></errorinfo>
  </entry>

Expected behavior opening resx manager window

tom-englert commented 1 year ago

Did you try uninstall/reinstall, like described in Troubleshooting.md?

trivalik commented 1 year ago

Thanks. This worked.