Optimizing CSS and JS on MVC6 Dot Net Core

I am presently trying to streamline an MVC .NET Core project. The first time load for a user is between 4 and 5 seconds which by many metrics appears to be on the sluggish side. Currently i have tried..... Image optimization and compression (Optim...
more »

2017-12-02 03:12 (0) Answers

Using Migrations with Entity Framework Core

I'm just trying to use migrations in my .Net Core class library, but for some reason I have the following return: $ dotnet ef migrations add InitialMigration No executable found matching command "dotnet-ef" I googled many times, but none of examp...
more »

2017-11-29 02:11 (1) Answers

How to install dotnet core sdk in Debian Jessie

I'm having issues installing Dotnet Core SDK on my Debian Jessie Box. This is the guide i've followed https://docs.microsoft.com/en-us/dotnet/core/linux-prerequisites?tabs=netcore2x. After Registering the Product Key and Feed all i get is Unable to...
more »

2017-11-27 21:11 (1) Answers

Dotnet core 2 process start with timeout

I have a method to start process from my c# code in dotnet core 2. This method is like following: internal static string[] RunCommand(string filename, string args, string workingDirectory = null) { var proc = new Process { ...
more »

2017-11-27 19:11 (1) Answers

User Management with ASP.NET Core 2.0

Maybe I miss something but, I read a bunch of documentation and articles regarding authentication and authorization using .NET Core 2.0, but I didn't find anything regarding user management. What I'm trying to achieve is to have an Administrator use...
more »

2017-11-17 15:11 (0) Answers

running .NET in sles 11

i'm trying to figure out if it is possible to run .NET on the server at work. we mainly run COBOL but i want to know if it is possible to run .NET also. this is what i can find that is installed on the server: cobol v5.1.00 PRN=RXCVF/AAP:9t.r3.51.13...
more »

2017-11-15 09:11 (1) Answers

How can I get CPU name in .NET Core?

Given that WMI is Windows only and the absence of registry in operating systems such as Linux and Mac, how could one obtain processor name in .NET Core? I intend to make the following method (which uses registry) cross platform: private static str...
more »

2017-11-12 23:11 (0) Answers

Error in omnisharp extension for vs code

I've been facing the next issue from quite a while now. I'm starting with asp.net core 2.0 and vs code. I have installed VS Code 1.17.2, dotnet sdk 2.0 and C# extension 1.13.0 by omnisharp. I created a mvc project runing dotnet new mvc. When I open v...
more »

2017-11-09 22:11 (1) Answers

Why is ReadAsStringAsync async?

So, in the following snippet, why is ReadAsStringAsync an async method? var response = await _client.SendAsync(request); var body = await response.Content.ReadAsStringAsync(); Originally I expected SendAsync to send the request and load the respon...
more »

2017-10-27 16:10 (1) Answers

EF model property not null without [Required]

Is it possible to have Entity framework generate a table, from a model, with the column marked as not null without using the [Required] annotation on the model's property? Reason: The object is posted to an api and I check ModelState.IsValid in the...
more »

2017-10-24 17:10 (2) Answers

CA1821 Remove empty Finalizers

Why VS complains about this finalizer? VS 2017 -- 15.3.5 Microsoft Code Analysis 2017 -- 2.3.0.62003 using System; namespace ConsoleApp { class DisposableClass : IDisposable { #if DEBUG ~DisposableClass () // CA1821 Remove empty Fi...
more »

2017-10-18 21:10 (1) Answers

Call (C#) .NET Core method from C++

I have 2 components: - .Net Core Application running on Ubuntu OS. - C++ shared library (.so) Now I want C++ component to be able to call .Net Core method, either passing interface to C++ component which will use this interface to callback metho...
more »

2017-10-18 16:10 (0) Answers

Exclude folder in ASP.NET Core 2

How can I exclude my X folder from the build? If I remove it manually and dotnet build and dotnet run it takes along the lines of 20 seconds to run both commands and get me a working server. On the other hand if I include it manually it takes some...
more »

2017-10-17 18:10 (1) Answers

EF Core 2.0 - System.NotSupportedException On Add

I am using EF Core 2.0. I have a table with 4 columns where the PK is made up of all 4 columns. One of the columns (IsDefault) is a bit field in the database. If I insert a record with IsDefault set to true everything works fine. If I insert a re...
more »

2017-10-04 20:10 (1) Answers

Missing .NET Framework Template Visual Studio 2017

I am using Visual Studio 2017 community edition. I have installed .NET Core SDK 2.0.3 version and .NET Core 2.0.0 runtime. But I don't see the ASP.NET Core with .NET Framework template option in Visual Studio 2017. Do I need to install anything else?...
more »

2017-10-04 15:10 (1) Answers

dotnet compiler error while publishing f# project

I am trying to publish a dotnet core 2.0.0 (release version) project from command line. I am getting an error as below. EXEC(1,1): error CS8301: Invalid name for a preprocessing symbol; '' is not a valid identifier [C:\Work\FloAppGit\FloAppStpl\FloM...
more »

2017-10-04 10:10 (1) Answers

Binding complex model to form in .net core MVC

I'm a little new to .NET Core MVC and wondering if anyone can point me toward a tutorial or offer some simple advice for accomplishing the following. I have a complex data model that looks kinda like below. Syntax isn't too important; the point is t...
more »

2017-10-03 23:10 (0) Answers