Detected package downgrade warning (dotnet core, vs 2017)

This situation occurred to me after opening an existing solution but instead of Warnings, they were Errors. I opened the YourAwesomeApp.csproj file and went through the “Detected package downgrade” errors one-by-one and manually changed the version of that line item from the existing version to the specified version that was shown in the error itself. … Read more

Unable to return Tuple from a method using Visual Studio 2017 and C# 7.0

I Just ran through this page on Roslyn which describes the following steps to get this working: Start a C# project Add a reference to the System.ValueTuple package from NuGet (pre-release) Following those steps, it is now working. But it is really very weird that we need to do that for every single project that … Read more

How do I uninstall *all* nuget packages from a solution in Visual Studio

To get all packages from all projects in the solution use Get-Package. To get all packages from a specific project use Get-Package -ProjectName “YourProjectName”. Remove all packages from all projects in the solution Be careful: This will uninstall ALL packages in the solution. If -Force parameter is used, packages are removed even if dependencies exist. … Read more

Assets file obj\project.assets.json doesn’t have a target – VS2017

According to the Microsoft blog (which, bizarrely, my account doesn’t have permissions to post in), this isn’t a bug, and is entirely caused by ReSharper. If you disable this, the problem goes away. Errr, one problem: I’m getting this error, and I don’t have ReSharper. After a lot of hunting around, I found the reason … Read more

Lambda implicit capture fails with variable declared from structured binding

Core issue 2313 changed the standard so that structured bindings are never names of variables, making them never capturable. P0588R1’s reformulation of lambda capture wording makes this prohibition explicit: If a lambda-expression […] captures a structured binding (explicitly or implicitly), the program is ill-formed. Note that this wording is supposedly a placeholder while the committee … Read more

The current .NET SDK does not support targeting .NET Standard 2.0 error in Visual Studio 2017 update 15.3

It sounds like installing the VS2017 update for that specific version didn’t also install the .NET Core 2.0 SDK. You can download that here. To check which version of the SDK you’ve already got installed, run dotnet –info from the command line. Note that if there’s a global.json file in either your current working directory … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)