My Progress Getting Visual Studio Working In WINE

Questions about Wine on Linux
Locked
pentad5k
Newbie
Newbie
Posts: 3
Joined: Tue Aug 23, 2016 9:25 am

My Progress Getting Visual Studio Working In WINE

Post by pentad5k »

ABSTRACT (TL;DR):

I am able to install Visual Studio 2019 Community, Professional, and Enterprise, but I am stuck at an error: Couldn't Install Microsoft.DiagnosticsHub.Collection.StopService.Install. Having tried to resolve it myself without success, I was looking for other suggestions. I have detailed my installation steps, the solutions I have tried, my system specs, and give a detailed overview of my progress.


OVERVIEW:

The Visual Studio IDE is the last piece of the puzzle for me to drop Windows completely from my system. I do a lot of contract work in C# and my clients usually send me an archive of their solution so I can work on it.

It is easier to use Visual Studio because that is what they are using as opposed to me trying to cobble back and forth with Visual Studio Code or some other IDE they are not use.

I started down this path when I saw a post from Cedric <cedric.dewijs at eclipso.eu> here: https://www.winehq.org/pipermail/wine-b ... 61971.html. I emailed Cedric about his progress, but he never responded.

I was able to jump off from his post and install Visual Studio 2019 BuildTools and Visual Studio 2019 Community, Professional, and Enterprise. However, when you launch any of the editions I get this error that I'm not able to resolve:

Couldn't Install Microsoft.DiagnosticsHub.Collection.StopService.Install


You will find my installation steps as well as a list of solutions I have tried below.




DISTRO INFORMATION:

./o. mark@nx1701i
./sssso- ------------
`:osssssss+- OS: EndeavourOS Linux x86_64
`:+sssssssssso/. Host: Inspiron 16 7610
`-/ossssssssssssso/. Kernel: 5.19.7-arch1-1
`-/+sssssssssssssssso+:` Uptime: 19 hours, 4 mins
`-:/+sssssssssssssssssso+/. Packages: 1668 (pacman), 5 (snap)
`.://osssssssssssssssssssso++- Shell: bash 5.1.16
.://+ssssssssssssssssssssssso++: Resolution: 3072x1920
.:///ossssssssssssssssssssssssso++: DE: Plasma 5.25.5
`:////ssssssssssssssssssssssssssso+++. WM: KWin
`-////+ssssssssssssssssssssssssssso++++- WM Theme: Ember
`..-+oosssssssssssssssssssssssso+++++/` Theme: [Plasma], Breeze [GTK3]
./++++++++++++++++++++++++++++++/:. Icons: [Plasma], breeze [GTK2/3]
`:::::::::::::::::::::::::------`` Terminal: gnome-terminal
CPU: 11th Gen Intel i7-11800H (16) @
GPU: NVIDIA GeForce RTX 3050 Mobile
GPU: Intel TigerLake-H GT1 [UHD]
Memory: 9947MiB / 64054MiB



WINE VERSION:

wine-7.16 (Staging)



MY INSTALLATION STEPS:

1. rm -rf ~/.cache/wine*

2. Create a home folder called VS2019

3. CD into VS2019

4. WINEPREFIX="/home/mark/VS2019/" wineboot

NOTE: WINE will ask to install wine-mono which is fine

5. WINEPREFIX="/home/mark/VS2019/" winecfg

NOTE: I set the version to Windows 7 and adjust the DPI (I'm on a 3k screen)

6. WINEPREFIX="/home/mark/VS2019/" winetricks -q arial d3dcompiler_47

7. WINEPREFIX="/home/mark/VS2019/" winetricks dotnet472

NOTE: If I use -q the install will hang during install so I leave it out. Also, this is the longest part of the installation. It installs 4.6 through 4.71 with many 'reboots'. It should complete without any errors.

8. WINEPREFIX="/home/mark/VS2019/" winetricks vstools2019

NOTE: You will now see the Visual Studio 2019 GUI installer. Take the defaults and click Install


!NOTE! From here, you can choose one of two options:

Option 1:

The installer -as far as I can tell- is installed so steps 9 - 12 aren't needed. You can enter WINEPREFIX="/home/mark/VS2019/" winetricks vstools2019 again since BuildTools is now installed to bring the GUI installer up. Select the tab AVAILABLE and choose Visual Studio Community, Professional, or Enterprise to install.

I've done it both ways and couldn't see any differences, so its up to you.


Option 2:

9. wget https://aka.ms/vs/16/release/installer -O vs_installer.opc

10. mkdir -p opc

11. unzip -d opc vs_installer.opc

12. WINEPREFIX="/home/mark/VS2019/" wine opc/Contents/vs_installer.exe install --channelId VisualStudio.16.Release --channelUri "https://aka.ms/vs/16/release/channel" --productId Microsoft.VisualStudio.Product.Community

NOTE: Replace Microsoft.VisualStudio.Product.Community with Microsoft.VisualStudio.Product.Professional or Microsoft.VisualStudio.Product.Enterprise for the version you want to install. You can install all three, one after another if you want.


No matter which edition I install, I get: Couldn't Install Microsoft.DiagnosticsHub.Collection.StopService.Install


SOLUTIONS TRIED:

1. Comparing /home/mark/VS2019/drive_c/ProgramData/Microsoft/VisualStudio/Packages with my Windows 10/Visual Studio 2019 VM c:\ProgramData\Microsoft\VisualStudio\Packages I noticed that Microsoft.DiagnosticsHub.Collection.StopService.Install,version=16.1.28901.1 was missing from my WINE install. So, I copied Microsoft.DiagnosticsHub.Collection.StopService.Install,version=16.1.28901.1 over but it made no difference.

2. I did a clean install of VS2019 using WINEARCH=win32 WINEPREFIX="/home/mark/VS2019/" so it would be a 32bit install of Visual Studio 2019. I thought this might help the installer to see Microsoft.DiagnosticsHub.Collection.StopService.Install,version=16.1.28901.1 but same error.

3. If you put https://aka.ms/vs/16/release/installer into your browser you get a file manifest and I checked to see if there were other versions I could try, but I didn't see anything.

4. With a clean install of VS2019 I followed MY INSTALLATION STEPS and then exited the installer. I also stopped all WINE tasks. I replaced /home/mark/VS2019/drive_c/Program Files (x86)/Microsoft Visual Studio/ with the one from my working VM. I then started the Visual Studio 2019 Installer again in WINE and launched the Community edition, but it failed with the same error.

5. With a clean install of VS2019 I followed MY INSTALLATION STEPS and then exited the installer. I also stopped all WINE tasks. I replaced /home/mark/VS2019/drive_c/ProgramData/Microsoft/VisualStudio/Packages with the one from my working VM. I then started the Visual Studio 2019 Installer again in WINE and launched the Community edition, but it failed with the same error.

6. I mixed and matched 4. and 5. but nothing made a difference.

7. I tried MY INSTALLATION STEPS on Visual Studio 2022 by doing this: wget https://aka.ms/vs/17/release/installer -O vs_installer.opc and this: WINEPREFIX="/home/mark/VS2019/" wine opc/Contents/vs_installer.exe install --channelId VisualStudio.17.Release --channelUri "https://aka.ms/vs/17/release/channel" --productId Microsoft.VisualStudio.Product.Community

However, I can't even get the Visual Studio 2022 installer GUI to appear without an error.

8. If I update the Visual Studio 2019 installer from the installer it errors out, same as if I install Visual Studio 2022 from the 2019 installer.


Any suggestions would be welcome, Thank You!
qwertymnb
Level 4
Level 4
Posts: 236
Joined: Sun Jan 17, 2016 4:36 pm

Re: My Progress Getting Visual Studio Working In WINE

Post by qwertymnb »

Hi, could you post the console output before the error occurs? Maybe that could shed a light on it.

I tried to run 'wine devenv.exe' (is that the program you try to run?) and it stopped with a different error, a messagebox that said "Package management initialization failed".

Also after I did 'wine devenv.exe /setup' i got the same error (found that command after some googlesearch).

So I couldn't reproduce that "Couldn't Install Microsoft.DiagnosticsHub.Collection.StopService.Install" error that you got.

Could you tell what exact program (exe) you try to run?

As for devenv.exe, I got as far as getting to the "Sign in" window, see screenshot, but I don't have an account.
Also the window that opens after hitting "sign in" is blank )needs more testing, guess winetricks ie8 might help?)
Screenshot from 2022-09-11 14-59-50.png
Anyway, i had to use dumb hack and native msxml6 to get that far.

Could you try if 'winetricks msxml6' changes anything for the error you get?
And is it possible to try run the program without signing in?
pentad5k
Newbie
Newbie
Posts: 3
Joined: Tue Aug 23, 2016 9:25 am

Re: My Progress Getting Visual Studio Working In WINE

Post by pentad5k »

qwertymnb wrote: Sun Sep 11, 2022 8:08 amHi, could you post the console output before the error occurs? Maybe that could shed a light on it.
Hi! I apologize for not replying sooner, I was swamped with a programming project this week...

I have attached my console logs from every step I make from creating VS2019 to rebooting WINE and running VS2019Community from the VS Installer Window.
qwertymnb wrote: Sun Sep 11, 2022 8:08 amI tried to run 'wine devenv.exe' (is that the program you try to run?) and it stopped with a different error, a messagebox that said "Package management initialization failed".
I get that now as well after I installed msxml6 per your suggestion.
qwertymnb wrote: Sun Sep 11, 2022 8:08 amCould you tell what exact program (exe) you try to run?
Sure, I have been running this:

WINEPREFIX="/home/mark/VS2019/" winetricks vstools2019

or

WINEPREFIX="/home/mark/VS2019/" wine opc/Contents/vs_installer.exe install --channelId VisualStudio.16.Release --channelUri "https://aka.ms/vs/16/release/channel" --productId Microsoft.VisualStudio.Product.Community

This brings up the GUI setup, but you can also launch IDE from here as well. I can also do a repair on the install as well.

I did not have much luck getting devenv.exe to work at all.

Also, I have not signed in to do the install or launch the IDE. I think you can run VS without signing in for a time before Microsoft forces you to sign in.

Thanks again for the reply! I hope my logs and this other information help you!
Attachments
ConsoleOutput.zip
(14.19 KiB) Downloaded 78 times
qwertymnb
Level 4
Level 4
Posts: 236
Joined: Sun Jan 17, 2016 4:36 pm

Re: My Progress Getting Visual Studio Working In WINE

Post by qwertymnb »

Hi, sorry for late reply.

Bug https://bugs.winehq.org/show_bug.cgi?id=48023 has related info.
To get a bit further you will need some hacks, see that bugreport. I came as far as getting the GUI up with 'wine devenv.exe /resetsettings' + the hacks, but when i try to login it says my license is expired (??). Maybe you have more luck ;)
Locked