nuget

Visual Studio 2019 suddenly requires nuget Microsoft.NET.Test.Sdk to run xUnit unit-tests

拜拜、爱过 提交于 2021-01-29 07:19:04
问题 I'm using xUnit for implementing tests. I used to install the xUnit Visual Studio runner, xunit.runner.visualstudio nuget package to run tests using the VS GUI. Below is are xUnit-related branches of the dependency tree in VS. You can clearly see the xUnit VS runner has no dependencies: Visual Studio is suddenly asking me to install the Microsoft.NET.Test.Sdk nuget in order to run tests in the GUI. Anyone knows why? Note: I have been using VS 2019 for over a year frequently updating asap. The

Restore nuget package in different folder

穿精又带淫゛_ 提交于 2021-01-29 06:42:13
问题 We have some projects (Plugins) which use in several projects, the output of these projects will copy to the specific folder in the target projects (Plugins folder). We pack project with Visual studio 2019 Pack option and after that, we push npkg files to our local NuGet server for further use. The problem is when we want to get these packages, Package Manager should put lib files in the Plugins folder, but unfortunately, the package manager extracts these in the root folder (bin). My

Cannot load file or assembly 'Microsoft.Extensions.Configuration.Abstractions, Version=3.1.0.0' in MSTest project

有些话、适合烂在心里 提交于 2021-01-29 02:10:48
问题 I'm having problem with MSTest, Here the issue Open VS2019 Make sure that package management is set to [PackageReference] Create a .Net Framework test project Add Nuget package Microsoft.Extentions.Configuration last version (3.1.3.0) Add the code below Run test ==> Test fail with error [Cannot load file or assembly Microsoft.Extensions.Configuration.Abstractions, Version=3.1.0.0 ...] error PS : using package.config instead of PackageReference solve the issue. Downgrading to Microsoft

Cannot load file or assembly 'Microsoft.Extensions.Configuration.Abstractions, Version=3.1.0.0' in MSTest project

百般思念 提交于 2021-01-29 02:08:57
问题 I'm having problem with MSTest, Here the issue Open VS2019 Make sure that package management is set to [PackageReference] Create a .Net Framework test project Add Nuget package Microsoft.Extentions.Configuration last version (3.1.3.0) Add the code below Run test ==> Test fail with error [Cannot load file or assembly Microsoft.Extensions.Configuration.Abstractions, Version=3.1.0.0 ...] error PS : using package.config instead of PackageReference solve the issue. Downgrading to Microsoft

Problem with multi target frameworks in asp web site project

生来就可爱ヽ(ⅴ<●) 提交于 2021-01-29 01:41:50
问题 I have developed a C# Library Framework that targets both .NetStandard & .NetFramework. This was done by editing the .csproj file, changing TargetFramework to TargetFramework s and adding both of them in the tag: <TargetFrameworks>netstandard2.0;net471</TargetFrameworks> I'm now able to add this framework as a ProjectReference in my other projects. This works great for all projects that have a .csproj file. However when adding the framework to an asp web site project (That does not have a

Problem with multi target frameworks in asp web site project

断了今生、忘了曾经 提交于 2021-01-29 01:36:11
问题 I have developed a C# Library Framework that targets both .NetStandard & .NetFramework. This was done by editing the .csproj file, changing TargetFramework to TargetFramework s and adding both of them in the tag: <TargetFrameworks>netstandard2.0;net471</TargetFrameworks> I'm now able to add this framework as a ProjectReference in my other projects. This works great for all projects that have a .csproj file. However when adding the framework to an asp web site project (That does not have a

How to apply Entity Framework code first approach to a project

陌路散爱 提交于 2021-01-28 19:54:47
问题 I use Visual Studio 2013 and need to use Entity Framework code first approach in a project. I used NuGet Manager to install EF v6.1 into my project. But I can't create an empty code first model or even a code first model from database although there are two other choices (DB first and Model first). How I can add Entity Framework code first feature to my project? 回答1: Here is a beginners tutorial for using entity framework code first: An Absolute Beginner's Tutorial for understanding Entity

.Net Plugin Architecture Not Working with Nuget

徘徊边缘 提交于 2021-01-28 18:59:28
问题 I have a .Net Core 3.1 console application that loads plugins. One of my plugins connects to Sqlite and so it has a Nuget dependency on Microsoft.Data.Sqlite. However, I'm getting a missing DLL exception from the console app when loading/running the plugin because the following path doesn't exist: MyConsoleApp\bin\x86\Debug\netcoreapp3.1\runtimes\win-x86\native\e_sqlite3.dll I also have an MsTest project which tests this Sqlite plugin project. It does not have the same problem. Apparently the

The source at nuget.org is unreachable?

若如初见. 提交于 2021-01-28 11:54:02
问题 I'm trying to install SignalR in my C# project, but all I get when running install-package Microsoft.AspNet.SignalR is: The source at nuget.org [https://www.nuget.org/api/v2/] is unreachable. Falling back to NuGet Local Cache(...) At line:1 char:1 + install-package Microsoft.AspNet.SignalR + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : NotSpecified: (:) [Install-Package], InvalidOperationException + FullyQualifiedErrorId : NuGetCmdletUnhandledException,NuGet.PowerShell.Commands

.Net Core Nuget Package - Copy files to package consumer wwwroot

喜你入骨 提交于 2021-01-28 11:50:48
问题 I have a .Net Core 2.2 Library project. All this project contains is a bunch of static files that have the "Build Action" set as Content. The sole purpose of this projectis to be built into a Nuget package, and for any consumers to have the included contents added to their wwwroot folder. Unfortunately, the files "appear" as if they are there, when looking at Solution Explorer, but they actual path is: C:\Users\MyName\.nuget\package\mylib.staticfiles\0.0.1\contentFiles\any\netcoreapp2.2