Visual Studio Mac "could not connect to the debugger" error - mono

I am running Mac OS Catalina, and have Visual Studio version 8.3.8 installed. Before installing Catalina I had no problems building and running my code in Visual Studio.
I don't get any errors when building the code, but each time I try to run my code I get the following dialog popup
Could not connect to the debugger
And I get the following in my terminal:
bash: /Library/Frameworks/Mono.framework/Versions/6.4.0/bin/mono32:
Bad CPU type in executable
I suspect that Catalina doesn't run 32 bit programs, is there a way around this? I thought that Mono from version 5.2 defaulted to 64 bit.

I ran into this issue while using the following settings:
Windows 10
Visual Studio 2019
Macbook Pro
macOS Big Sure 11.4
Visual Studio for Mac (latest)
XCode 12.5
When trying to debug my Xamarin app for IOS and connect my mac in visual studio I had to follow the following steps.
Install mono - https://www.mono-project.com/docs/about-mono/supported-platforms/macos/
Open Visual Studio for Mac (on mac)
Open XCode (mac)
Connect To mac through Visual Studio
After that I stopped getting the connection error.
I know this isn't your exact question, but maybe it can help someone in the future.

I experienced the same problem when trying to debug practically any app in VS Mac. I am now using 2022 and the same issue persisted since using 2019. If trying to debug your code locally, what you can do is to run your app first without debugging. Then, attach the debugger to the executed process. So, if your web app is executing in let's say, "Chrome", then search for that process, usually, it will be the name of your app (it's a dotnet process), then simply attach the debugger to it. Then, you should be able to set breakpoints and hit them.
Hope this will help anyone working with VS for Mac.

Related

visual studio crash when try to start kernel debugger

I have a project on my studies to write kernel driver. First step of this project is to prepere working environment, so I installed WDK, installed and configured Windows 7 x64 on virtualbox machine and created hello world kernel driver solution from the internet. After that I could deploy and debug my driver in windows 7 client machine directly from visual studio. Everything worked fine. After few days there was an update to windows 10 (host) - november update 1511, I installed that and (sic!) removed ,,previous Windows installations" to get disk space. Unfortunatelly when I opened my project again - I couldn't deploy and debug my driver due to visual studio crash. I can't find workaround for 3 days which is really frustrating beacause I have to show it to my professor on monday.
What I have tried to do:
I completly reinstalled visual studio and WDK (in host and client machine) and it still happens.
After compile, when I click ,,Debugging tools for Windows - Kernel Debugger", visual studio is crashing
(screen)
I can't get previous installation back and now I have no time to reinstall entire system.
Can you help me, please? Is there a way to get it working again?
PS. Excuse me for my english
I solved that.
After I upgraded my OS, I had still installed WDK 10.0.10240, it was not updated to the newer version. Even if I reinstalled it with new wdksetup.exe downloaded from microsoft site, there was still this version. Microsoft did not update their download page. I searched in google "WDK 10.0.10586.11" and I found the direct link to the newest WDK 10.0.10586.0 on tweettunnel.com/vanhoivo.
The link is:
http://download.microsoft.com/download/C/E/1/CE19C726-6036-4443-845B-A652B0F48CD7/wdk/wdksetup.exe
After I installed this wdk version, the problem has solved, VisualStudio is not crashing now and I can deploy and debug my driver. However, I think that is a bug in VisualStudio - it should show an error that WDK version is not appropriate
Thanks

System.NullReferenceException occurs in xaml designer

I've created a C++ UWP Windows 10 app using Visual Studio 2015. However, I'm not able to visualize any xaml in the designer because I'm always getting a System.NullReferenceException error. How can I fix this?
That's very odd but I solved following these steps:
Close any instance of Visual Studio
Open Visual studio and create a new C# UWP empty project (name it as you like, do not matter)
Run the "useless" created project then close it as Visual Studio
Open again your previous C++ UWP project
In my case everything started working!
Switching solution platform to x86 worked for me.
I'm experiencing exactly the same problem on my primary development machine but not on another. The reason is... I think... When I installed Visual Studio 2015 on the 2nd machine, the first time I created a Universal Solution (C#) I was shown a dialog asking me to OK "elevated permissions" (custom permissions) for the VS2015 installation folder. I OK'd it and Designer works on that machine in both Blend2015 and VS2015 (community edition)
On the other machine I was never shown the dialog asking me to confirm elevated permissions and Designer does NOT work on that machine (VS2015 Enterprise). This machine also has VS2013 update 5) on it.
I am thinking that I might have to completely wipe off VS2015 and try to clean the registry of all VS2105 references AND remove the VS2015 installation directories on C:\ AND when I reinstall, create a installation directory with a different name (if I can). What a PAIN though... I'm waiting to see if MS delivers a simple solution since I'm quite positive that this whole issue boils down to a bug (feature... grrr) having to do with custom permissions that can't be changed (or added) after installation.
Would be nice is MS would confirm this...
(please note, none of this involved c++... it was all C#)
Tom
this is the dialog I was shown on the machine where Designer works]1
Installing the Windows Software Development Kit (SDK) for Windows 10 solved the issue for me. It may ask to unistall the previous version of Windows 10 RTM SDK
https://developer.microsoft.com/en-us/windows/downloads/windows-10-sdk
This is fixed in Update 1 of Visual Studio 2015
https://www.microsoft.com/en-us/download/details.aspx?id=49989

msbuild this application couldn't be started

i've got computer with Windows 8 and fresh installation of Visual Studio 13 Express.
I'm working on project which runs on .NET 4.0 Client profile.
Problem is when i try to complile, this error message is shown:
Solutions:
social.msdn : This one says:
try to restart your VS and rebuild - not working
check MSbuild from promt - not working (Message is shown twice)
I also checked project configuration vsproj and tried to make sample project
Reinstall framework:
i tried ot reinstall almost everything, framework, sdk.
when i've installed .NET Framerork v4.5.2 my VS was unnable to start and anoter .NET apps complied before had missing library
I haven't tried to reinstall VS, yet. (But i dont think if it helps)
Edit: Temporary solution shoud be Visual Studio Express 2012, but it not solves problem.
Reinstalaion of VS didn't help.

No Emulator lists to deploy windows phone app

I'm not able to see any of emulator in VS 2012 express for windows phone. My system has all requirements to run an emulator. previously I was able to debug on emulator. After uninstalling and reinstalling VS 2012 I'm unable to get emulator list and i'm getting error "There were deployment error" and error list shows " Error 1 Exception from HRESULT: 0x89721500". Please help me to solve this problem as I'm unable to test my window phone apps on my system.
Maybe you could fix this issue by deleting this folder:
When you use Visual Studio 2012
C:\Users\<username>\AppData\Local\Microsoft\Phone Tools\CoreCon\11.0
When you use Visual Studio 2015
C:\Users\<username>\AppData\Local\Microsoft\Phone Tools\CoreCon\12.0
Then open VS2012 or VS 2015 again.
If not repairing is always recommended
In addition to Daniel's answer, you may need to then manually repair the emulator install from programs and features in control panel.

Standard install of VSExpress2012 on Win8, the IDE will not launch

I have a windows 8 x64 machine, pretty new image, and I just installed VS2012 C# express, and the install completed fine. but when I launch the IDE, nothing happens, I do not see a new process starting in Task Manager either.
After googling a bit, people suggest that it may be extensions and to run "devenv.exe /safemode". I did not install any extensions, and "devenv.exe" does not exist in my system. all I can find is %SystemDrive%\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE\WDExpress.exe. This is where the shortcut created on my desktop points too. I have tried using the " /safemode" switch with that .exe, but nothing happens.
I am currently running a repair on the program now, maybe that will fix it.
Any suggestions would be appreciated.
Thanks.
I found the issue, The Microsoft Application Compatibility Toolkit 5.6 was locking some files. After removing it. VS2012 opened right up.