nuget

ABP框架(4)ABP框架中使用MySQL数据库

允我心安 提交于 2021-01-25 17:32:14
1.移除SQL Server的Nuget包 打开程序包管理器控制台,并选中.EntityFrameworkCore 然后依次执行: uninstall-package microsoft.entityframeworkcore.design uninstall-package microsoft.entityframeworkcore.sqlserver 2.安装MySQL的Nuget包 依次执行: install-package pomelo.entityframeworkcore.mysql.design install-package pomelo.entityframeworkcore.mysql 3.更改配置文件 在解决方案的EntityFrameCore层找到DbContextConfigurer文件,并做如下修改: 4.修改数据库连接字符串 在appsetting.json文件中修改数据库连接字符串: "Default" : "Server=localhost;Port=3306;Database=你的数据库名;Uid=数据库用户名;Pwd=密码;" 5.添加数据迁移 删除EntityFrameCore层中Migrations文件夹里的所有文件,别删除Migrations文件夹,然后重新生成解决方案,接着打开程序包管理器控制台,选中

基于Dapper的开源LINQ扩展,且支持分库分表自动生成实体二

痴心易碎 提交于 2021-01-25 03:23:05
LnskyDB LnskyDB是基于Dapper的Lambda扩展,支持按时间分库分表,也可以自定义分库分表方法.而且可以T4生成实体类免去手写实体类的烦恼. 文档地址: https://liningit.github.io/LnskyDB/ 开源地址: https://github.com/liningit/LnskyDB nuget地址: https://www.nuget.org/packages/LnskyDB/ 功能特点 Lambda表达式查询方便 基于Dapper的Lambda表达式扩展可以方便的进行查询筛选操作 支持分库分表 默认支持按年分库按月分表,也支持自定义分库分表.从此大数据不用愁 T4自动生成实体 有T4模板自动生成实体类,再也不用手写那些烦人的实体类了.仓储类及接口也支持自动生成 使用门槛低,快速上手 使用非常简单,可以快速上手 注意问题 本框架只支持单表的Lambda表达式查询,如果多表需要手写sql,框架支持根据sql查询修改等. 另外不太建议连表查询,推荐在逻辑层处理 开源协议 MIT license. 上一期我们写了分库分表的增删改查,这一期我们写一下不分库分表的增删改查: 不分库分表 查询 根据主键查询 var repository = RepositoryFactory.Create<ProductSaleByDayNSEntity>();

Failed to download package 'runtime.win10-x86.Microsoft.Net.UWPCoreRuntimeSdk.2.1.1'

坚强是说给别人听的谎言 提交于 2021-01-22 05:09:45
问题 I'm working with Mobile App in Visual Studio 2017, but when I first created this project and tried to build it, the following error occurred: Failed to download package 'runtime.win10-x86.Microsoft.Net.UWPCoreRuntimeSdk.2.1.1' from 'https://api.nuget.org/v3-flatcontainer/runtime.win10-x86.microsoft.net.uwpcoreruntimesdk/2.1.1/runtime.win10-x86.microsoft.net.uwpcoreruntimesdk.2.1.1.nupkg'. The HTTP request to 'GET https://api.nuget.org/v3-flatcontainer/runtime.win10-x86.microsoft.net

Failed to download package 'runtime.win10-x86.Microsoft.Net.UWPCoreRuntimeSdk.2.1.1'

我怕爱的太早我们不能终老 提交于 2021-01-22 05:05:07
问题 I'm working with Mobile App in Visual Studio 2017, but when I first created this project and tried to build it, the following error occurred: Failed to download package 'runtime.win10-x86.Microsoft.Net.UWPCoreRuntimeSdk.2.1.1' from 'https://api.nuget.org/v3-flatcontainer/runtime.win10-x86.microsoft.net.uwpcoreruntimesdk/2.1.1/runtime.win10-x86.microsoft.net.uwpcoreruntimesdk.2.1.1.nupkg'. The HTTP request to 'GET https://api.nuget.org/v3-flatcontainer/runtime.win10-x86.microsoft.net

Unable to load System.Threading.Tasks.Extensions

倾然丶 夕夏残阳落幕 提交于 2021-01-21 06:37:21
问题 I have a web project build on .net framework 4.5.1. We are trying to added PostgreSQL support for the project. Using Nuget, I have installed 4.0.4 npgsql to the project. Under references, I see the following being added to the project. Npgsql - 4.0.4.0 - Runtime version v4.0.30319 System.Threading.Tasks.Extensions - 4.2.0.0 - Runtime version v4.0.30319 When I tried run the project and connect and get the data from the database, I am getting the following error saying FileNotFoundException:

Nuget restore fails on Azure Devops with message “unable to load the service index for source”

狂风中的少年 提交于 2021-01-21 06:18:37
问题 I have a build for a .NET solution that is running in a private agent. The solution contains both .NET Core 2.1 and .NET Standard 2.0 projects. Some of the nuget packages installed are the following: NETStandard.Library v2.0.3 Microsoft.AspNetCore.Mvc v2.0.0 Microsoft.NETCore.App v2.1.5 The build fails when trying to restore the nuget packages with the following error: "F:\Agent01\w\141\s\xxxxxxx.sln" (Restore target) (1) -> (Restore target) -> C:\Program Files\dotnet\sdk\2.1.500\NuGet

Azure Devops nuget artifact feed and docker

牧云@^-^@ 提交于 2021-01-20 12:35:10
问题 Is there a good way to create an authentication mechanism to Devops to be able to access the artifact NuGet feed? I would like to create a base image for my team that would allow them to just pull an image from our Azure Container Registry that has access to our devops nuget feed. Ideally people wouldn't have to have the same stock dockerfile code in every single project that grabs a PAT from their host build system. This would also allow us to CICD this a little more nicely. My current

Azure Devops nuget artifact feed and docker

馋奶兔 提交于 2021-01-20 12:34:14
问题 Is there a good way to create an authentication mechanism to Devops to be able to access the artifact NuGet feed? I would like to create a base image for my team that would allow them to just pull an image from our Azure Container Registry that has access to our devops nuget feed. Ideally people wouldn't have to have the same stock dockerfile code in every single project that grabs a PAT from their host build system. This would also allow us to CICD this a little more nicely. My current

How to create NuGet package that add only JavaScript/CSS to web-based project?

亡梦爱人 提交于 2021-01-19 17:59:43
问题 I have some NuGet package that contains both DLL file and web related files like JavaScript, Stylesheet and image files. I want to create package that only install web related file to web project only (including ASP.NET and ASP.NET MVC project). What is the easiest way to do that? Thanks, PS. I think it should be possible via Powershell script. But I think, it is quite complex for me. 回答1: You probably want to use the Nuget Package Explorer. It allows you to create a package without the

Project 'Default' not found error when installing a NuGet package

不羁岁月 提交于 2021-01-18 05:02:11
问题 I copied the following project from win 8.1 to windows 7 and deleted the Migration folder. Now when I run PM> Add-Migration MyFirstMigration -context BloggingContext command in VS2015 I get the error: Project "Default" is not found . Both the machines have ASP.NET Core 1.0 and VS2015-Update 3 installed. I get the same error if I run Install-Package command for any package. Project runs fine on Win8.1 UPDATE I do not have the same issue when copying a project from Windows 7 to Windows 8.1 or