Error: "There was an error running the selected code generator: Package restore failed"
I am trying to add controller to my solution in ASP.NET Core project: [](https://i.stack.imgur.com/C6s4v.png) When I try to do so I get this error: [](https://i.stack.imgur.com/S4qS1.png) I get the sa...
- Modified
- 12 Apr at 10:17
How to query many-to-many releationship in EF Core
I'm using .NET Core and EF Core for a web project. I'm struggling how to query a many-to-many releationship. This is what my models look like: ``` public class Begrip { public int ID { get; set; ...
- Modified
- 12 Jun at 13:40
Web API: Configure JSON serializer settings on action or controller level
Overriding the default JSON serializer settings for web API on application level has been covered in a lot of SO threads. But how can I configure its settings on action level? For example, I might wan...
- Modified
- 12 Jun at 12:7
ASP.NET Core modify/substitute request body
I want to do a substitution on `HttpContext.Request.Body`. I've tried to do it inside a middleware: ``` public async Task Invoke(HttpContext context) { if (context.Request.Path.Value.Contains("Dat...
- Modified
- 24 Sep at 07:35
How do you add additional files to a NuGet package in Visual Studio 2017?
I recently moved to Visual Studio 2017 Community Edition. It has 2 nice new features: 1. You don't need to explicitly include your source files in the csproj. It does this automatically. 2. It can bu...
- Modified
- 21 Jan at 00:51
What's the difference between implementation, api and compile in Gradle?
After updating to Android Studio 3.0 and creating a new project, I noticed that in `build.gradle` there is a new way to add new dependencies instead of `compile` there is `implementation` and instead ...
- Modified
- 16 Jul at 17:16
Equal height rows in CSS Grid Layout
I gather that this is impossible to achieve using Flexbox, as each row can only be the minimal height required to fit its elements, but can this be achieved using the newer CSS Grid? To be clear, I w...
- Modified
- 12 Jun at 18:32
Android SDK cannot be found by flutter
I have installed [flutter through AUR.](https://aur.archlinux.org/packages/flutter/) I also have `aur/android-sdk 26.0.2-1` installed. When I run `flutter run` I get: ``` Warning! This package refere...
Unable to resolve service for type 'Microsoft.AspNetCore.Identity.UserManager` while attempting to activate 'AuthController'
I'm getting this error in Login Controller. > InvalidOperationException: Unable to resolve service for type 'Microsoft.AspNetCore.Identity.UserManager`1[Automobile.Models.Account]' while attempting t...
- Modified
- 11 Jun at 12:2
HasOne not found in EF 6
I am very new to Entity Framework and I am trying to figure out relations. I have found this code: ``` class MyContext : DbContext { public DbSet<Post> Posts { get; set; } public DbSet<Tag> T...
- Modified
- 11 Jun at 08:7
Identity Server 4 and docker
I'm trying to configure IdentityServer4 with docker but I cannot make it work. To get started, I took the Client Credential example of the identity server documentation: [Protecting an API using Clien...
- Modified
- 13 Jun at 17:17
How do you change the icon of the `wwwroot` folder in a .NET Core project?
In Visual Studio 2017, when I want to create an ASP.NET Core Web Application from scratch using either one of these standard .NET Core project templates: - - These project templates; obviously woul...
- Modified
- 11 Jun at 03:43
servicestack angular 2 template on mac
is there any way to generate project without visual studio just on mac with rider or vs code? Don't really want to install windows only for creating empty project to try real promising template.
- Modified
- 10 Jun at 21:47
How does FirstAsync work?
In my everlasting quest to suck less I'm trying to understand Rx.net's `FirstAsync()` syntax. Most documentation is for the deprecated `First()` If I understand correctly it allows me to start a stre...
- Modified
- 7 May at 05:55
Getting "The path to the driver executable must be set by the webdriver.chrome.driver system property"though set correct path
My code is very simple code: ``` WebDriver wd =new ChromeDriver(); System.setProperty("webdriver.chrome.driver", "D:\\List_of_Jar\\chromedriver.exe"); String baseUrl ...
- Modified
- 6 Nov at 08:55
ServiceStack OrmLite: JSON fild deserialization Issue
I have a table in MySql: ``` CREATE TABLE db.catalog ( id varchar(36) NOT NULL, pictures json DEFAULT NULL ) ``` and declaration form code ``` public class catalog { public stri...
- Modified
- 10 Jun at 17:10
How to prevent Gremlin injection in C#?
When user enters data in a text box, many possibilities of SQL Injection are observed. To prevent this, many methods are available to have placeholders in the SQL query, which are replaced in the next...
- Modified
- 12 Jun at 11:3
ServiceStack Caching No Ceremony Razor
I have a simple website that is using the no ceremony razor views mostly for handling the layouts of a bunch of static pages. This is on an azure web app. The pages seem to load a little slower than...
- Modified
- 10 Jun at 05:15
Better way to disable console inside unit tests
I wonder if there is a better way to disable console errors inside a Jest test (i.e. restore the original console before/after each test). Here is my current approach: ``` describe("Some description"...
- Modified
- 25 Sep at 18:18
Bootstrap 4: Multilevel Dropdown Inside Navigation
What's the easiest way to make a multilevel dropdown in Bootstrap 4? All the examples I managed to find on SO were either too messy or not included in nav. I've tried just placing a dropdown inside a...
- Modified
- 9 Jun at 22:14
ASP.NET Core DbContext injection
I have a `ConfigurationDbContext` that I am trying to use. It has multiple parameters, `DbContextOptions` and `ConfigurationStoreOptions`. How can I add this DbContext to my services in ASP.NET Core...
- Modified
- 11 Jun at 14:4
Inject Service Reference into .NET with AppSettings.json and Startup.cs
My project is not finding the service reference endpoint in runtime. I believe it's due to incorrect injection in my Startup.cs. I'm new to the appsettings.json and Startup.cs method of configuration ...
- Modified
- 12 Jun at 18:40
Xamarin Forms Icons
I'm wondering how I can implement icons inside my Xamarin Forms app. I want to use something like glyphicons or font awesome. However, I have no idea how to implement it into my xaml/c# pages. Ideall...
- Modified
- 9 Jun at 15:5
How do I set the ServiceStack ResponseStatus StatusCode?
I have developed a custom exception which I throw from my ServiceStack service. The status code and description are mapped correctly, but the inner 'statusCode' value always appears to be '0'. Here i...
- Modified
- 9 Jun at 15:31
ServiceStack.OrmLite.Sqlite.Core Can't Load Proper Sqlite DLL
I'll keep this short and sweet... OS: Windows 7 x64 Latest Updates IDE: Visual Studio 2017 15.2 Framework: .Net Core 1.1 / Standard 1.3 Steps to reproduce: 1) File -> New Project (.Net Core Consol...
- Modified
- 9 Jun at 12:23