Problem with VS 17.7.0

This forum is meant for questions and discussions about the X# language and tools
Post Reply
JohnBonnett88
Posts: 51
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 2732 times
JohnBonnett88
Posts: 51
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: 435
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: 4518
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
robert@xsharp.eu
JacentyK
Posts: 2
Joined: Tue Sep 19, 2023 1:26 pm
Location: Polska

Re: Problem with VS 17.7.0

Post by JacentyK »

Version 2.17.0.3?
In webpage is 2.16.04 – where is newer version?

Regards Jacek
leon-ts wrote: Thu Aug 10, 2023 6:13 am 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.
User avatar
robert
Posts: 4518
Joined: Fri Aug 21, 2015 10:57 am
Location: Netherlands

Re: Problem with VS 17.7.0

Post by robert »

Jacek
X# 2.17 is for subscribers only.
We are now testing 2.18.
That will also be a public build.

Robert
XSharp Development Team
The Netherlands
robert@xsharp.eu
JohnBonnett88
Posts: 51
Joined: Mon Mar 07, 2022 12:34 am

Re: Problem with VS 17.7.0

Post by JohnBonnett88 »

Hi All,

I had the problem of the X# extension not working with VS 2022 17.7.0 and installed VS 2022 LTSC 17.6 beside VS17.7.0 so I could continue working with X#. Just yesterday I got the VS 2022 17.7.5 update and now X# v2.16.0.5 works again with that.

Best Regards,
John
jacekm23
Posts: 16
Joined: Tue Sep 29, 2015 8:45 am
Location: Poland

Re: Problem with VS 17.7.0

Post by jacekm23 »

Hi,
I got the VS 2022 17.7.5 update too, but it doesn't work for me with X# v2.16.0.5.
I have to wait for the X# v2.18.

Best Regards,
Jacek
JohnBonnett88
Posts: 51
Joined: Mon Mar 07, 2022 12:34 am

Re: Problem with VS 17.7.0

Post by JohnBonnett88 »

Hi All,

The reason I discovered X# was working again after upgrade to VS 17.7.5 was that I was working in VS on another solution and needed to create a new project. When selecting the template for the project, I noticed that all the X# templates were now appearing again, so I tried loading another solution that used X# and it worked as before.

I am not sure if other updates, like Windows, may have changed on my system as well.

Best Regards,
John
Post Reply