Nuget namespace not working in VS2022 for Unity

I am trying to implement a report bug feature in my unity project where by the player can send an email to the developer. To do this I need the Mimekit and mailkit namespace in Vs 2022.

I have installed the mailkit and Mimekit packages in my Visual studio project. How ever when I try to access it with it’s namespace "using MailKit " and “Using Mimekit”, Visual studio doesn’t recognise the namespace.

I have tried closing Vs code, uninstalling and reinstalling, checking my solution explorer and Nuget package manager to make sure it exist. Despite nothing being wrong with either of these, the namespace isn’t still recognised.

Is there another way I could solve this issue

Far as I’m aware Unity doesn’t have built in nuget support?

To that end that seems to be why addons like this exist: GitHub - GlitchEnzo/NuGetForUnity: A NuGet Package Manager for Unity

1 Like

Unity does not integrate with NuGet (yet - there are ongoing efforts to modernize and make this happen). If you don’t want to use an external integration, you can download NuGet packages manually from the gallery or through any other means and extract/copy assemblies targeting frameworks Unity is compatible with (Unity 6 uses .NET Framework 4.8 / .NET Standard 2.1). You also need to include any non-BCL dependency assemblies the same way.