xsharp.eu • Visual Studio crashes since last Xsharp Update
Page 1 of 1

Visual Studio crashes since last Xsharp Update

Posted: Fri Jun 10, 2022 12:08 am
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

Visual Studio crashes since last Xsharp Update

Posted: Fri Jun 10, 2022 6:57 am
by FFF
Frank, which VS / OS?

Visual Studio crashes since last Xsharp Update

Posted: Fri Jun 10, 2022 7:00 am
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?

.

Visual Studio crashes since last Xsharp Update

Posted: Fri Jun 10, 2022 7:07 am
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

Visual Studio crashes since last Xsharp Update

Posted: Fri Jun 10, 2022 7:08 am
by FdeRaadt
Hi Chris,

Yes, the crash only happens with Clean Solution.

Frank

Visual Studio crashes since last Xsharp Update

Posted: Fri Jun 10, 2022 7:19 am
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.

.

Visual Studio crashes since last Xsharp Update

Posted: Fri Jun 10, 2022 10:43 am
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

Visual Studio crashes since last Xsharp Update

Posted: Fri Jun 10, 2022 11:13 am
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

Visual Studio crashes since last Xsharp Update

Posted: Fri Jun 10, 2022 4:10 pm
by ic2
Hello Robert,

Thanks for the extensive explanation.

Dick