dotnet / aspire

An opinionated, cloud ready stack for building observable, production ready, distributed applications in .NET
https://learn.microsoft.com/dotnet/aspire
MIT License
3.44k stars 362 forks source link

Ability to use Visual studio on mac M2 silicon (via parallels) #1539

Open AnthonyDewhirst opened 6 months ago

AnthonyDewhirst commented 6 months ago

Hi there, I wanted to write MAUI apps after using c# for many many users. So i bought a mac pro thinking that I could use VS on parallels. I somehow missed that not ALL of windows 11 ARM works on m2 due to lack of wsl2 and hyper-V.

So, I am currently trying to find a way to use docker desktop on the host mac and VS on the guest via parallels.

I started to look into the source code of Aspire and saw that it would be easy enough to fake that docker was running, but then came across the references to DCP which I didn't know what this was. I searched up the term and came across this nice post https://anthonysimmon.com/exploring-microsoft-developer-control-plane-core-dotnet-aspire-dotnet-8/ (@asimmon) which is now making me thinking that getting the setup to work that I want won't be that easy, especially as I don't know GO at all and don't have the source code to work with.

The issue of using Visual studio with docker desktop on mac M2 silicon (via parallels) is something a lot of people want based on my searching to get this working and while I believe that people are looking at a solution to this, I believe that is a lot harder solution to fix than exposing a proxy for docker on the host (mac) and making dcp talk to this.

I hope what I am looking for makes sense?

My current thinking is that the dcp solution is probably just sending requests to the local docker command line tool and so a proxy could be used, but I am only just starting to look at this.

If the team involved in aspire could look at this I think that you could make a lot of people happy.

Thanks and great work on this.

AnthonyDewhirst commented 5 months ago

I have also created a forum request on the docker community here: https://forums.docker.com/t/parallels-on-apple-silicon/139514

Should this request be aimed at the Visual Studio team?

maddymontaquila commented 3 weeks ago

@AnthonyDewhirst hi!! just catching up on this. this is a great idea. I would definitely make a feature req on docker (looks like you did) for them to support it on parallels. you also could probably spin most of your components up on the mac itself with Aspire from VS Code, give them some ip address, keep it running, and then connect your frontend/APIs to those end points from VSW (assuming you only want to edit those). It'd be weird... but it might work? You could also give VS Code on Mac a shot with the C# Dev Kit and MAUI extensions - it's gotten a lot better in the latest releases (XAML intellisense support & hot reloads are here!) and supports aspire apphost!