nuget

Error NU1101: Unable to find package ProjectABC.Core.Services. No packages exist with this id in source(s)

倾然丶 夕夏残阳落幕 提交于 2020-05-15 07:44:05
问题 I am trying to implement CI/CD on Azure DevOps for my Asp.net Core project. Project having Nuget packages from three different sources: MSBUild in Azure Pipeline is going to find nuget packages in Offline Packages or Nuget.org only but not going to find external source which i am also using: http://dev-abc-api-nugetserver-wi.azurewebsites.net/nuget/ I have tried below code in Azure Pipeline Build but that didn't work /p:RestoreAdditionalSources="http://dev-abc-api-nugetserver-wi.azurewebsites

Nuget package creation - Class library that targets .NET framework 4.6.1 can not target correct framework

☆樱花仙子☆ 提交于 2020-05-15 05:07:12
问题 I created a class library that targets .net framework 4.6.1 (so pretty much a blank canvas, with a single method to return a string, just for testing purposes). I want to make this into a nuget package. I'm following this article https://docs.microsoft.com/en-us/nuget/quickstart/create-and-publish-a-package-using-visual-studio-net-framework , but when I get to "nuget pack" I get the following warning: "WARNING: NU5128: Some target frameworks declared in the dependencies group of the nuspec

Nuget Package Icon Not getting Displayed

江枫思渺然 提交于 2020-05-14 18:37:34
问题 I'm developing an Nuget Package. I have icon.png placed inside Images folder inside my package code. In my .csproj file I have added required tags related to icon. But still icon is not getting displayed. Instead default blue icon is displayed in Nuget. Here is my .csproj file, <PropertyGroup> <PackageIcon>icon.png</PackageIcon> </PropertyGroup> <ItemGroup> <None Include="Images\icon.png" Pack="true" PackagePath=""/> </ItemGroup> Am I missing anything? please assist. 回答1: Currently,

Azure Devops publishing to own feed suddenly results in 403 forbidden

醉酒当歌 提交于 2020-05-14 15:57:54
问题 I am using azure devops for a project for quite some time but now all of a sudden publishing to my own organisation/collection feed results in a 403. I created a feed and I can select it on the "nuget push" build step but it does not work. I created a new feed to publish the nugets and this works perfectly again. It seems to me like a token ran out but I never created one or used it to authenticate. I also do not want to change my nuget feed to the new one, as I want to use older packages

Azure Devops publishing to own feed suddenly results in 403 forbidden

孤者浪人 提交于 2020-05-14 15:57:28
问题 I am using azure devops for a project for quite some time but now all of a sudden publishing to my own organisation/collection feed results in a 403. I created a feed and I can select it on the "nuget push" build step but it does not work. I created a new feed to publish the nugets and this works perfectly again. It seems to me like a token ran out but I never created one or used it to authenticate. I also do not want to change my nuget feed to the new one, as I want to use older packages

C# Autofac学习笔记

▼魔方 西西 提交于 2020-05-09 20:24:12
一、为什么使用Autofac? Autofac是.NET领域最为流行的IoC框架之一,传说是速度最快的一个。 1.1、性能 有人专门做了测试: 1.2、优点 1)与C#语言联系很紧密。C#里的很多编程方式都可以为Autofac使用,例如可以使用Lambda表达式注册组件。 2)较低的学习曲线。学习它非常的简单,只要你理解了IoC和DI的概念以及在何时需要使用它们。 3)支持JSON/XML配置。 4)自动装配。 5)与Asp.Net MVC集成。 6)微软的Orchad开源程序使用的就是Autofac,可以看出它的方便和强大。 1.3、资源 官方网站: http://autofac.org/ GitHub网址: https://github.com/autofac/Autofac 学习资料: Autofac中文文档 二、数据准备 2.1、新建项目 IService下的接口类: using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace LinkTo.Test.Autofac.IService { /// <summary> /// 动物吠声接口类 /// </summary> public

关于Microsoft.Data.SqlClient(链接)

断了今生、忘了曾经 提交于 2020-05-09 16:16:23
官方NuGet链接如下: Microsoft.Data.SqlClient 微软官方文档介绍: Introduction to Microsoft.Data.SqlClient namespace 另一篇很详细的介绍文章: Introducing the new Microsoft.Data.SqlClient 从文章中,我们可以得知,微软以后将逐渐放弃System.Data.SqlClient的更新,对ADO.NET的新功能支持将都在Microsoft.Data.SqlClient上,所以微软也鼓励开发人员在新的项目中应该使用Microsoft.Data.SqlClient,放弃使用老的System.Data.SqlClient。 来源: oschina 链接: https://my.oschina.net/u/4312696/blog/4272110

CAP.DotNet源码追踪(一)消息是如何执行的,执行后又是如何执行回调的

北慕城南 提交于 2020-05-09 15:09:41
CAP源码追踪(一)消息是如何执行的,执行后又是如何执行回调的 场景 .NET Core 3.1 nuget包:DotNetCore.CAP.RabbitMQ 3.0.2 前言 以对话为引,梳理我们的问题: 小明-聪明绝顶的程序猿,小红-绝美程序媛 小红:小明,在CAP中,我们通过 CapSubscribe 特性来订阅方法,而我们写的消息处理中,返回值一般都是void/Task,那么这个返回值类型有什么用呀或者说这个返回值有什么用呢? 小明一看表现的机会来了,马上回复了一句:百因必有果,既然有返回类型这个东西,那么CAP设计者肯定会利用这一点来进行应用,不会无故忽视这个功能的 小红:小明,那它到底有什么作用呢? 小明:既然想知道它的作用,那么就应该去学习它的消息执行原理,分析其执行过程,自然就明白它的返回值的作用了。 小红:哇,问题一下从返回值的作用上升到了CAP执行原理了,小明,快给我讲讲呀😉 小明心想是时候表演真正的技术了~✨ @# *$&( #@*&(^$#@( 正文 从应用层面来看,我们使用CAP主要就是使用它的消息发送和订阅,既然要学习它的执行原理,那么就直接从消息发送出发来学习 MQ发送 以常用情况为例,我们通过注册的 ICapPublisher 下的 PublishAsync 来发送消息 首先先看一下方法定义: Task PublishAsync<T>(string

关于HslCommunication组件的双模式客户端的说明,此说明适用于所有的派生类客户端,包括三菱,西门子,欧姆龙,modbustcp,机器人,simplifyNet客户端等等

♀尐吖头ヾ 提交于 2020-05-09 06:33:38
前言 本文主要是答疑文章,针对广大网友非常频繁的提问而总结的问题 nuget地址: https://www.nuget.org/packages/HslCommunication/ github地址: https://github.com/dathlin/HslCommunication 如果喜欢可以star或是fork,还可以打赏支持。 联系作者及加群方式(激活码在群里发放): http://www.hslcommunication.cn/Cooperation 在Visual Studio 中的NuGet管理器中可以下载安装,也可以直接在NuGet控制台输入下面的指令安装: Install-Package HslCommunication NuGet安装教程 http://www.cnblogs.com/dathlin/p/7705014.html 最简单的使用-短连接 在使用读写数据功能之前,自然是要实例化对象的,然后指定IP地址和端口号的,比如西门子,不需要指定端口好像也能访问,因为内部初始化默认值102了。还有欧姆龙的连接还要指定一些其他的参数信息,所有的客户端访问类只要实例化并指定了相关的参数后,可以理解进行读写数据了,下面随便举几个例子: 三菱的 MelsecMcNet melsec_net = new MelsecMcNet( "192.168.0.188"

Dapper simplecrud的使用

拜拜、爱过 提交于 2020-05-08 17:42:48
  为了方便Dapper操作可以使用Dapper的相关扩展dapper simplecrud。   1.首先点击管理NuGet 2.在管理页面中搜索 Dapper.SimpleCRUD并安装 然后就可以使用该包下的扩展 经过好久的寻找找到该文章,随便吐槽一下百度真的十分坑爹,找的无用信息太多 https://github.com/ericdc1/Dapper.SimpleCRUD/ 为了方便以后查找故对方法进行总结 以下是对方法使用的总结 1.Get方法 public static T Get<T>( this IDbConnection connection, int id) 首先建立和表相对应的实体类 public class User { public int Id { get ; set ; } public string Name { get ; set ; } public int Age { get ; set ; } } 然后查询至实体 var user = connection.Get<User>( 1 ); 相当于sql: Select Id, Name, Age from [ User ] where Id = 1 下面我们对实体类进行一下相关改动 [Table( " Users " )]//真实表名 public class User { [Key]