Compartilhar via


Managing References in a Project in Visual Studio for Mac

Important

Visual Studio for Mac was retired on August 31, 2024 in accordance with Microsoft’s Modern Lifecycle Policy. While you can continue to work with Visual Studio for Mac, there are several other options for developers on Mac such as the preview version of the new C# Dev Kit extension for VS Code.

Learn more about support timelines and alternatives.

Visual Studio for Mac provides two means of adding additional references to your project:

Project References

These are:

  • References
  • NuGet packages (Added via the Packages folder)

In addition, Web References and native references can also be added to any project.

Assembly references

Each framework within Xamarin ships with over a dozen assemblies. Not all of these assembly packages are referenced in your project by default.

To edit packages that are referenced in your project, use the Edit References dialog, which can be displayed by double-clicking on the References folder, or by selecting Edit References on its context menu actions:

Assembly References dialog

For information on the assemblies available for each Xamarin framework, refer to the Available Assemblies guide.

NuGet

NuGet is the most popular package manager for .NET development. Visual Studio for Mac's NuGet support allows you to search for packages to add to your project.

To do this, right-click on the Package folder in the Solution Window, and select Add Packages.

More information on using a NuGet Package is provided in the Including a NuGet package in your Project walkthrough.

See also