Problem with VS 17.7.0

This forum is meant for questions and discussions about the X# language and tools
Post Reply
JohnBonnett88
Posts: 42
Joined: Mon Mar 07, 2022 12:34 am

Problem with VS 17.7.0

Post by JohnBonnett88 »

Hi All,

I recently updated my VS 2022 to v17.7.0. It seems that breaks the X# integration. The message I got is attached. I tried restarting and that did not help. It looks like it stops you loading any X# project.Here are the relevant entries I can find in that ActivityLog they mentioned.   <entry>    <record>222</record>    <time>2023/08/10 00:30:03.374</time>    <type>Error</type>    <source>Microsoft.VisualStudio.ComponentModelHost.VsShellComponentModelHost</source>    <description>Still unable to load MEF component DLL: Could not load file or assembly &apos;Microsoft.Windows.Design.Host, Version=4.3.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a&apos; or one of its dependencies. The system cannot find the file specified.</description>    <path>c:program filesmicrosoft visual studio2022professionalcommon7ideextensionsxsharpprojectXSharp.Project2022.dll</path>  </entry>   <entry>    <record>461</record>    <time>2023/08/10 00:30:32.998</time>    <type>Information</type>    <source>VisualStudio</source>    <description>Begin package load [XSharp Project System]</description>    <guid>{E299FB7B-D273-4678-9ACF-B37B4AF04A12}</guid>  </entry>  <entry>    <record>462</record>    <time>2023/08/10 00:30:33.528</time>    <type>Error</type>    <source>VisualStudio</source>    <description>SetSite failed for package [XSharp Project System]Source: &apos;mscorlib&apos; Description: Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information.
System.Reflection.ReflectionTypeLoadException: Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information.
   at System.Reflection.RuntimeModule.GetTypes(RuntimeModule module)
   at System.Reflection.Assembly.GetTypes()
   at System.Linq.Enumerable.<SelectManyIterator>d__17`2.MoveNext()
   at System.Linq.Enumerable.WhereEnumerableIterator`1.MoveNext()
   at Community.VisualStudio.Toolkit.AsyncPackageExtensions.RegisterToolWindows(AsyncPackage package, Assembly[] assemblies)
   at XSharp.Project.XSharpProjectPackage.<InitializeAsync>d__12.MoveNext() in C:XSharpDevPublicVisualStudioProjectPackageXSharpProjectPackage.cs:line 176
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.VisualStudio.Shell.AsyncPackage.<>c__DisplayClass21_0.<<Microsoft-VisualStudio-Shell-Interop-IAsyncLoadablePackageInitialize-Initialize>b__1>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Microsoft.VisualStudio.Services.VsTask.RethrowException(AggregateException e)
   at Microsoft.VisualStudio.Services.VsTask.InternalGetResult(Boolean ignoreUIThreadCheck)</description>    <guid>{E299FB7B-D273-4678-9ACF-B37B4AF04A12}</guid>    <hr>0x80131602</hr>    <errorinfo></errorinfo>  </entry>Hope this helps.
I may need to back out that update to VS.

​​​​​​​John
Attachments
XSharpFail.png
XSharpFail.png (8.74 KiB) Viewed 95 times
JohnBonnett88
Posts: 42
Joined: Mon Mar 07, 2022 12:34 am

Problem with VS 17.7.0

Post by JohnBonnett88 »

Hi All,

I rolled back VS to v17.6.5 and that seemed to go OK.
When I opened my solution again it seemed to have a problem authenticating my VS Professional subscription. After waiting a while I tried restarting my machine.
It then did not have problem with my subscription but all the X# projects were marked as incompatible.
I uninstalled and reinstalled XSharp v2.16.0.5.
Opening my solution again and all the X# projects were marked as unloaded, so I individually reloaded them, including a few I had deliberately unloaded!
After tidying that up, my solution now builds cleanly, including X# projects.

In case this helps anyone,
John
leon-ts
Posts: 395
Joined: Fri Feb 03, 2017 1:43 pm

Problem with VS 17.7.0

Post by leon-ts »

Hello John,
I updated my VS 2022 to version 17.7 yesterday morning. Also I am using X# 2.17.0.3. So far I have not found any problems in this bundle. Everything works fine.
Best regards,
Leonid
User avatar
robert
Posts: 3822
Joined: Fri Aug 21, 2015 10:57 am
Location: Netherlands

Problem with VS 17.7.0

Post by robert »

John,
There was a breaking change in VS 17.7.
X# 2.17.0.3 should work OK with VS 17.7.
Older versions will not work.
If you have to work with this combination, then you can work around this by copying the file Microsoft.Windows.Design.Host.dll from an older installation of VS (in PrivateAssemblies folder) into VS 17.7 which does not have that file anymore.

Robert
XSharp Development Team
The Netherlands
Post Reply