使用vs code 操作mysql,要添加dll
1.使用vs code创建MVC项目,在*****.csproj 文件里添加ItemGroup
点击查看代码
<Project Sdk="Microsoft.NET.Sdk.Web">
<PropertyGroup>
<TargetFramework>net5.0</TargetFramework>
</PropertyGroup>
<ItemGroup>
<Reference Include="mysql.data">
<HintPath>bin\Debug\net5.0\mysql.data.dll</HintPath>
</Reference>
<Reference Include="System.Configuration.ConfigurationManager">
<HintPath>bin\Debug\net5.0\System.Configuration.ConfigurationManager.dll</HintPath>
</Reference>
<Reference Include="MiniExcel">
<HintPath>bin\Debug\net5.0\MiniExcel.dll</HintPath>
</Reference>
</ItemGroup>
</Project>