How can I set the base path in ConfigurationBuilder in Core 2.0. I have googled and found this question, this from Microsoft docs, and the 2.0 docs online but...
Problem I want to return a file in my ASP.Net Web API Controller, but all my approaches return the HttpResponseMessage as JSON. Code so far public async Task<HttpResponseMessage> DownloadAsync(string...
I’m building a .NET Core MVC on the latest version 2.2. I have a problem when I make changes to the CSHTML file and refresh the page, my changes...
I’ve got a method that reads settings from my config file like this: var value = ConfigurationManager.AppSettings[key]; It compiles fine when targeting .NET Standard 2.0 only. Now I need...
I have a simple dotnet core class library with a single XUnit test method: TestLib.csproj: <Project Sdk="Microsoft.NET.Sdk"> <PropertyGroup> <TargetFramework>netstandard2.0</TargetFramework> </PropertyGroup> <ItemGroup> <PackageReference Include="Microsoft.NET.Test.SDK" Version="15.9.0" /> <PackageReference Include="xunit" Version="2.4.1" />...
Having the following service constructor public class Service : IService { public Service(IOtherService service1, IAnotherOne service2, string arg) { } } What are the choices of passing the parameters...
I had an Asp.Net core 2.2 project. Recently, I changed the version from .net core 2.2 to .net core 3.0 Preview 8. After this change I see this warning...
I’m building one RESTful API using ASP.NET Core MVC and I want to use querystring parameters to specify filtering and paging on a resource that returns a collection. In...
What exactly is the difference between .NET Core and ASP.NET Core? Are they mutually exclusive? I heard ASP.NET Core is built on .NET Core, but it can also be...
I have a .NET Core console application and have run dotnet publish. However, I can’t figure out how to run the application from the command line. Any hints? 7...