Visual Studio crashes since last Xsharp Update

This forum is meant for questions and discussions about the X# language and tools
Post Reply
FdeRaadt
Posts: 31
Joined: Wed Sep 01, 2021 12:49 pm

Visual Studio crashes since last Xsharp Update

Post by FdeRaadt »

Hello All,

I've updated XSharp to the newest(2.12.2) version and have been experiencing frequent crashes of my Visual Studio.
This happen every time when making use of the option "Cleaning Solution" under Build.
This problem does no longer occurs when downgrading XSharp back to version 2.11.
Something I've also tried is updating Visual studio but the freezes still happen.

For now I will work with version 2.11 as a workaround but I have been wondering if I am the only one having issues with the new update.

Frank
FFF
Posts: 1571
Joined: Fri Sep 25, 2015 4:52 pm
Location: Germany

Visual Studio crashes since last Xsharp Update

Post by FFF »

Frank, which VS / OS?
Regards
Karl
(on Win8.1/64, Xide32 2.20, X#2.20.0.3)
User avatar
Chris
Posts: 4854
Joined: Thu Oct 08, 2015 7:48 am
Location: Greece

Visual Studio crashes since last Xsharp Update

Post by Chris »

HI Frank,

Thanks for the report, I could reproduce the problem with two projects, when doing a Clean after a Rebuild and since it's reproducible, I'm sure it will be fixed soon. Just to be clear, you are getting the freezes ONLY with Clean Solution, is that correct?

.
Chris Pyrgas

XSharp Development Team
chris(at)xsharp.eu
FdeRaadt
Posts: 31
Joined: Wed Sep 01, 2021 12:49 pm

Visual Studio crashes since last Xsharp Update

Post by FdeRaadt »

OS: Windows 10
Visual Studio Community 2019: 16.11.15
XSharp: 2.12.2

I've included the Windows pop-up shown when the freeze occurs.

Frank
Attachments
VSisBusy.png
VSisBusy.png (54.12 KiB) Viewed 643 times
FdeRaadt
Posts: 31
Joined: Wed Sep 01, 2021 12:49 pm

Visual Studio crashes since last Xsharp Update

Post by FdeRaadt »

Hi Chris,

Yes, the crash only happens with Clean Solution.

Frank
User avatar
Chris
Posts: 4854
Joined: Thu Oct 08, 2015 7:48 am
Location: Greece

Visual Studio crashes since last Xsharp Update

Post by Chris »

Hi Frank,

Thanks! I can now reliably always reproduce the problem, so I'm sure Robert will fix it and we can release a bugfix build (for this and a few more problems that were found) in the coming weeks.

.
Chris Pyrgas

XSharp Development Team
chris(at)xsharp.eu
ic2
Posts: 1856
Joined: Sun Feb 28, 2016 11:30 pm
Location: Holland

Visual Studio crashes since last Xsharp Update

Post by ic2 »

I went with Frank through the various steps to find out if this was an issue of the latest X# and asked him to post this if the problem stayed away with the previous X#. But I considered that unlikely, which apparently it wasn't, as I thought that the Clean process isn't compiler dependent but a VS thing, deleting files associated with the build. When this is fixed I am a bit curious to learn what role the X# compiler plays in this.

Dick
User avatar
robert
Posts: 4478
Joined: Fri Aug 21, 2015 10:57 am
Location: Netherlands

Visual Studio crashes since last Xsharp Update

Post by robert »

Dick,

Msbuild is reponsible for the actual build, rebuild and clean process.
Inside Visual Studio a copy of MsBuild is running and both VS and this MsBuild subsystem communicates with our project system.

Over time MS has changed some things with the way how MsBuild runs inside VS. It runs more and more in the background (to keep VS responsive during builds). One of the reasons for that is the feature that they call "Live testing".
During this live testing MsBuild continually builds changed assemblies and runs unit tests.
If that would run on the foreground then VS would not be very responsive.
Most likely we made a change to support this background building that cause the problem.

You can also run MsBuild from the command line :

Code: Select all

MsBuild MySolution.Sln -target:Rebuild /p:Configuration=Debug

or

Code: Select all

MsBuild MySolution.Sln -target:Clean /p:Configuration=Release


The X# compiler is called as part of the build process. The project file (Xsproj file) contains a list of file names and references and contains a reference to "XSharp.targets" in the XSharp MsBuild dir.
This targets file tells MsBuild how to construct the command line for the X# compiler (and also how to process /rc files with the native resource compiler and also how to handle .resx files.
The processing of .rc files will be done by rc.exe and this will result in a native resource file that will be passed to the compiler so it can be included in the EXE or DLL. Something similar happens with .resx files and .resources files and with the generated code for .xaml files.
In the last case MsBuild will locate the X# component that generates source code(XSharpCodeDomProvider).


Robert
XSharp Development Team
The Netherlands
robert@xsharp.eu
ic2
Posts: 1856
Joined: Sun Feb 28, 2016 11:30 pm
Location: Holland

Visual Studio crashes since last Xsharp Update

Post by ic2 »

Hello Robert,

Thanks for the extensive explanation.

Dick
Post Reply