Questions tagged [visual-studio-mac]

Visual Studio for Mac is an IDE from Microsoft for Mac users. Use this tag if you have a specific question about Visual Studio for Mac features and functionality, not just a question regarding your code. Please mention your exact macOS version, VS for Mac version, Mono version and Xamarin runtime versions when applicable. Information such as Xcode and Android SDK versions are also useful.

Microsoft released Visual Studio for Mac in 2017 (based on MonoDevelop 7.0 code base), to replace Xamarin Studio (it was based on MonoDevelop 6.0 code base).

Primarily it supports Xamarin (Xamarin.Mac, Xamarin.iOS and Xamarin.Android) and .NET Core projects. Other project types might not be supported very well (due to Mono/.NET Framework compatibility).

Not every features of Visual Studio 2017 on Windows are supported by Visual Studio for Mac.

Product defects can be reported to Microsoft via Help | Report a Problem. Feature requests can also be raised via Help | Provide a Suggestion.

1045 questions
8
votes
3 answers

Curly brackets indention in Visual Studio for Mac

I use Visual Studio for Mac and the curly brackets in my code are not indented automatically and they are aligned to the left. Have somebody encountered this issue? How can I fix it? .
morkan
  • 171
  • 2
  • 3
  • 6
8
votes
1 answer

.Net Core - Building to release does not copy NUGET dependencies

I have a console .net core app. It references a few nuget packages. Now that it's ready to deploy, when i'm building to release, the nuget references are not coming along so i'm getting a bunch of file not found... how can i fix this?
Leonardo
  • 10,737
  • 10
  • 62
  • 155
8
votes
2 answers

How to install local NuGet package (.nupkg) from Visual Studio Community for Mac?

I've created a package with nugget CLI but can't find a way to install it from the IDE, the Package Manager Console isn't available in the version for Mac, and the nuget CLI tries to retrieve the package from the internet instead of reading the…
rraallvv
  • 2,875
  • 6
  • 30
  • 67
8
votes
5 answers

Error MSB4019 with visual studio for Mac

With visual studio for Mac /Users/piyushbhatt/Projects/myfmf/FMF/FMF.Web/fmf.Web.csproj(3,3): Error MSB4019: The imported project …
PVB
  • 81
  • 1
  • 5
8
votes
4 answers

How to add reference to assembly in visual studio mac?

I am sorry. I am newbie in C#. I use Visual Studio Mac. I want to try to connect mysql database. I have added mysql package. When I run, I get error. The error is : adding a reference to assembly ‘System.Data, Version-4.0.0.0, Culture=neutral,…
andika_kurniawan
  • 511
  • 4
  • 9
  • 20
7
votes
1 answer

VS 2022 for Mac (Arm 64), v 17.0 installs with incompatible MSBuild Version?

After installing VS 2022 for Mac (Apple Silicon), it looks like the bundled version of MSBuild does not work with VS ?!? When opening a solution, VS reports the following error: Unable to find SDK ‘Microsoft.NET.SDK.WorkloadAutoImportPropsLocator’.…
Skima
  • 73
  • 1
  • 4
7
votes
3 answers

Resizetizer One or more invalid file names were detected

I can't get rid of this build error in my .net maui app in Visual Studio for Mac 2022 v17? The build output says: /usr/local/share/dotnet/packs/Microsoft.Maui.Resizetizer.Sdk/6.0.300-rc.3.5667/targets/Microsoft.Maui.Resizetizer.targets(511,9): error…
Cliffhanger
  • 1,057
  • 1
  • 9
  • 18
7
votes
3 answers

Visual Studio for Mac 2022 - Hot Reload?

I am a fairly new to developing applications on Mac OS. I am using Visual Studio for Mac 2022 - Preview. I am all up to date and have created a ASP.NET MVC Web Application using .NET 6. I have started the debugger using the generated project. I…
Nizzy
  • 379
  • 5
  • 14
7
votes
2 answers

How to make Visual Studio on Mac break on error line instead of breaking in the main class?

When I'm debugging my project and I encounter a runtime error the debugger stops on the main line instead of the error line. using AppKit; namespace Project { static class MainClass { static void Main(string[] args) { …
1.21 gigawatts
  • 16,517
  • 32
  • 123
  • 231
7
votes
1 answer

How to use an older version of Xamarin.iOS with Visual Studio Mac?

Hi i mistakenly upgraded Visual Studio for Mac to 8.5.2 (build 13) which has Xamarin.iOS Version: 13.16.0.13 (Visual Studio Community). Turns out this doesn't work with XCode 11.3.1 and needs XCode 11.4, which means I will need to upgrade the OS…
7
votes
1 answer

Visual Studio for Mac: Logs work on a Project and are shown on Azure, but fail on another Project of same Solution

On the main Project of the Solution I have: public static void Main(string[] args) { // Testing Logs on Azure Application Insights: var telemetry = new Microsoft.ApplicationInsights.TelemetryClient(); telemetry.TrackTrace("Test of…
chelder
  • 3,819
  • 6
  • 56
  • 90
7
votes
3 answers

How can I "Add Next Occurrence" in Visual Studio for Mac?

In Visual Studio Code and Sublime Text there is functionality called "Add Next Occurrence" that selects next occurrence of marked text. The keyboard shortcut for utilizing this function is CMD+D (CTRL+D on Windows and Linux). This function would…
karlingen
  • 13,800
  • 5
  • 43
  • 74
7
votes
0 answers

How do I stop the VS for Mac debugger detaching from an iOS app when the lock button is pressed?

I am currently developing a Xamarin forms app and its iOS component is hard to debug because whenever I press the lock button on the iPhone, the debugger detaches. Moreover, there seems to be no way to attach the debugger to a Xamarin iOS/Android…
7
votes
3 answers

Apple developer account teams not showing up on VS Mac

When I log in my apple id account on Visual Studio Mac Community 2017, teams doesn't show up. Do I have to have a paid apple developer account to use this? There are no team displayed, and the button "View Details..." doesn't do anything. Also, the…
7
votes
3 answers

Visual Studio Mac incompatible with dotnet core 2

I've been using Visual Studio Mac for a little while and have just updated it to the released version. I've also downloaded and installed .NET Core 2.0 Preview 1. From a shell prompt I can generate a new Web API project: dotnet2 davec$ dotnet…
David Clarke
  • 12,888
  • 9
  • 86
  • 116