nuget

Referencing NuGet packages from directory in solution

血红的双手。 提交于 2021-01-01 06:44:43
问题 I have a solution with several ASP.NET Core projects in it, managed in Visual Studio 2015. My NuGet packages are currently being stored in C:\Users\My User\.nuget\packages\ . I need to instead have a Packages directory in my solution and reference packages from there. Like this: SolutionFolder src Project1 Project2 [...] Packages I copied the packages from the default path above into a solution directory, then removed all references for a project. I then added my Packages directory as a NuGet

在.NET Core 3.0中的WPF中使用IOC图文教程

依然范特西╮ 提交于 2020-12-31 12:18:54
我们都知道.NET Core 3.0已经发布了第六个预览版,我们也知道.NET Core 3.0现在已经支持创建WPF项目了,刚好今天在写一个代码生成器的客户端的时候用到了WPF,所以就把WPF创建以及使用IOC的过程记录一下,希望能对大家有所帮助。当然文章实例我就以我曾阅读过的一篇文章的示例代码来进行演示了。 作者:依乐祝 原文链接: https://www.cnblogs.com/yilezhu/p/11099358.html 步骤 通过命令行创建wpf项目,当然你也可以通过vs2019来进行创建。具体的步骤就不演示了,当然,如果你还不会用vs2019创建项目,那么请你右上角关闭网页,省的烦心。 ❯ mkdir WpfIoc ❯ cd WpfIoc ❯ dotnet.exe --version 3.0.100-preview6-012264 ❯ dotnet new wpf The template "WPF Application" was created successfully. Processing post-creation actions... Running 'dotnet restore' on C:\Users\laure\projects\WpfIoc\WpfIoc.csproj... Restore completed in 90.03 ms for C:

【ASP.Net】OWIN host

杀马特。学长 韩版系。学妹 提交于 2020-12-31 06:03:11
资料来源: https://www.asp.net/aspnet/overview/owin-and-katana ####传统的asp.net模式的局限性 无论谁在讨论一个工程的框架或者最终产品时, 很重要的一点就是知道创建这个产品的潜在的动机是什么. OWIN总的说来就是asp.net web api的宿主不再是传统的寄宿于IIS上, 而是可以在一个windows service上面, 一个console application或者其他上面的这种web api模式. 那么为什么要有这种模式? **首先,**传统意义上的asp.net web api框架是一个整体的,在逻辑上与system.web.dll紧密的耦合. **其次,**asp.net被包含在更大的.net framework当中, 这就意味着release周期跨度往往会很大,这样就会造成asp.net很难与当下日新月异的web技术保持同一个节奏. 最后, system.web.dll本身和web host: IIS过度耦合. ####革命性的进步: ASP.NET MVC 与 ASP.NET WEB API 当下, web application进展迅速并且被开发的越来越"小", 专注于组件而不是大的框架.大量的组件被频繁的发布, 所以这就要求asp.net如果想要跟上时代的节奏就必须进行解耦,将自己变小,

[Visual Studio] 记一次排错:打不开 Nuget 包管理器里的安装package页面,无法 安装 / 恢复 包

匆匆过客 提交于 2020-12-30 06:50:30
出差一阵子PC很久没用了, 回来在用Visual Studio (2017) 的时候, 工程里无法安装Package了 >_< --- 也不知道电脑做了什么?--- Nuget包管理器打开就一直转,读不出页面, 但网页访问 【nuget.org】很快,没有问题,不是网络的原因。 Package Manager 的控制台显示 读api index失败,proxy不能用https (大概这个意思) https://nuget.cdn.azure.cn/v3/index.json 在vs设置对话框的nuget包管理器的设置里,https改成http,也不管用。 (事实上保存关闭后再打开,还是https) https://api.nuget.org/v3/index.json ↓ http://api.nuget.org/v3/index.json --- 解决 --- 查看IE里的上网代理配置,是否启用代理要跟VS的配置文件【deven.exe.config】保持一致 即, 要么,使用代理,在 config 文件里就配置 system.net 节点下的 defaultProxy , 要么,不使用代理,在 config 文件里删掉 system.net 节点下的 defaultProxy ------------------------ config文件路径: C:\Program

Publish *.snupkg symbol package to private feed in VSTS

喜欢而已 提交于 2020-12-30 05:58:22
问题 I want to package and publish a .net standard based code as a nuget package using VSTS build. I have created a private nuget feed (in VSTS Artifacts) to which I would like to publish nuget package along with symbols package. I tried using dotnet CLI tasks to build and publish but it only publish .nupkg and not *.snupkg to the nuget feed. I googled alot but I only found articles related to publishing to nuget.org and not to a private feed. 回答1: Publish *.snupkg symbol package to private feed

Could not install package '--'. You are trying to install this package into a project that targets '.NETFramework,Version=v4.5'

狂风中的少年 提交于 2020-12-30 04:51:24
问题 I created this package, I need it in a project but couldn't install it, this error appears: Could not install package 'Mshwf.NiceLinq 1.0.9'. You are trying to install this package into a project that targets '.NETFramework,Version=v4.5', but the package does not contain any assembly references or content files that are compatible with that framework. For more information, contact the package author I don't know why this happen, in another project (Console) I changed the framework to 4.6 and

Could not install package '--'. You are trying to install this package into a project that targets '.NETFramework,Version=v4.5'

流过昼夜 提交于 2020-12-30 04:51:11
问题 I created this package, I need it in a project but couldn't install it, this error appears: Could not install package 'Mshwf.NiceLinq 1.0.9'. You are trying to install this package into a project that targets '.NETFramework,Version=v4.5', but the package does not contain any assembly references or content files that are compatible with that framework. For more information, contact the package author I don't know why this happen, in another project (Console) I changed the framework to 4.6 and

Nuget package from CMake

人走茶凉 提交于 2020-12-29 13:18:43
问题 I am generating an C# WPF project using CMake. I followed this CMakeLists.txt example from Github. My question is: How can add a Nuget package to this project using CMake? 回答1: CMake 3.15 and above supports referencing Nuget packages with VS_PACKAGE_REFERENCES. To add a Nuget package reference to a CMake target, use the package name and package version separated by an underscore _ . Here is an example for BouncyCastle version 1.8.5: set_property(TARGET MyApplication PROPERTY VS_PACKAGE

Nuget package from CMake

送分小仙女□ 提交于 2020-12-29 13:12:39
问题 I am generating an C# WPF project using CMake. I followed this CMakeLists.txt example from Github. My question is: How can add a Nuget package to this project using CMake? 回答1: CMake 3.15 and above supports referencing Nuget packages with VS_PACKAGE_REFERENCES. To add a Nuget package reference to a CMake target, use the package name and package version separated by an underscore _ . Here is an example for BouncyCastle version 1.8.5: set_property(TARGET MyApplication PROPERTY VS_PACKAGE

Nuget package from CMake

让人想犯罪 __ 提交于 2020-12-29 13:10:01
问题 I am generating an C# WPF project using CMake. I followed this CMakeLists.txt example from Github. My question is: How can add a Nuget package to this project using CMake? 回答1: CMake 3.15 and above supports referencing Nuget packages with VS_PACKAGE_REFERENCES. To add a Nuget package reference to a CMake target, use the package name and package version separated by an underscore _ . Here is an example for BouncyCastle version 1.8.5: set_property(TARGET MyApplication PROPERTY VS_PACKAGE