How to connect to MySQL Database?

Install Oracle’s MySql.Data NuGet package. using MySql.Data; using MySql.Data.MySqlClient; namespace Data { public class DBConnection { private DBConnection() { } public string Server { get; set; } public string DatabaseName { get; set; } public string UserName { get; set; } public string Password { get; set; } private MySqlConnection Connection { get; set;} private … Read more

Build NuGet Package automatically including referenced dependencies

Your point #3 (Add references to various .dll files/other projects <– this is the missing part) really contains two different issues: (1) add references to various dll files, and (2) add references to other projects in the same solution. Number (2) here has gotten some added support as of NuGet 2.5. You can add an … Read more

NuGet Package Manager errors when trying to update

Update: The recently released NuGet 2.0 also may require uninstalling an older version of NuGet first. From the NuGet 2.0 Release Notes: (http://docs.nuget.org/docs/release-notes/nuget-2.0) Known Installation Issue If you are running VS 2010 SP1, you might run into an installation error when attempting to upgrade NuGet if you have an older version installed. The workaround is … Read more

How can I use NuGet packages in my Azure Functions?

Yes! Although the Azure Functions portal does not currently provide a mechanism to add and manage NuGet packages, the runtime supports NuGet references and will make sure they are correctly used when compiling and executing your functions. In order to define your dependencies, you need to create a Project.json file with the required NuGet package … Read more

Add native files from NuGet package to project output directory

Using the Copy target in the targets file to copy required libraries won’t copy those files to other projects which reference the project, resulting in a DllNotFoundException. This can be done with a much simpler targets file though, using a None element, as MSBuild will copy all None files to referencing projects. <Project xmlns=”http://schemas.microsoft.com/developer/msbuild/2003″> <ItemGroup> … Read more

What are .NET Platform Extensions on docs.microsoft.com?

It represents APIs that are shipped as NuGet packages instead of being part of the shared framework for .NET Core. We don’t have the ability right now to identify the different packages and which target frameworks they support on learn.microsoft.com, but it’s something that is in our backlog to solve. So adding that as a … Read more

‘nuget’ is not recognized but other nuget commands working

Nuget.exe is placed at .nuget folder of your project. It can’t be executed directly in Package Manager Console, but is executed by Powershell commands because these commands build custom path for themselves. My steps to solve are: Download NuGet.exe from https://github.com/NuGet/NuGet.Client/releases (give preference for the latest release); Place NuGet.exe in C:\Program Files\NuGet\Visual Studio 2012 (or … Read more