Questions tagged [.net-core-2.0]

Use this tag for questions specifically related to .NET Core 2.0, in addition to using the '.NET Core' tag.

See the tag .net-core for more information or What's new in .NET Core 2.0?

343 questions
13
votes
2 answers

ASP.NET Core 2 Seed Database

I've seen some of the similar examples on SO regarding this but I don't know enough about the language just yet to see what I'm doing wrong. I've cobbled together a demo to learn more but I'm having trouble seeding my database. I receive the…
forcequitIO
  • 388
  • 2
  • 4
  • 16
13
votes
1 answer

netcore not logging to console

I have a simple test project to experiment with logging with NetCore 2.0 using the Microsoft Logging Extensions package. The problem I'm having is that when I run my app the very first time, it logs informational messages as expected. The weird…
ajawad987
  • 3,990
  • 2
  • 26
  • 42
13
votes
3 answers

How to manually parse a JSON string in net-core 2.0

I have a json string with the following structure { "resource": "user", "method": "create", "fields": { "name": "John", "surname: "Smith", "email": "john@gmail.com" } } The keys inside fields are variable,…
opensas
  • 52,870
  • 69
  • 227
  • 340
12
votes
2 answers

Does .NET Core 2.0 have SFTP client?

Needing to use an SFTP client and looking to build it in a .NET Core 2.0 application. I was wondering if SFTP is already part of .NET standard 2.0 or will I need to use a 3rd party library for this, e.g. SSH.NET?
Los Morales
  • 1,623
  • 4
  • 20
  • 34
12
votes
2 answers

.Net Core 2.0 "Generate Nuget package on build" issue with Post-build events

The new .NET Core 2.0 projects provide and easy and convenient way to create Nuget Package from the project output. Just click on the "Generate Nuget package on build" check box and it is done. It works fine but I have an issue with Post-build…
Major
  • 3,421
  • 2
  • 24
  • 45
11
votes
9 answers

How to dynamically create a sitemap.xml in .NET core 2?

Can anyone tell me how to create a Sitemap in .NET Core 2? These articles/alternate link are not working in .NET Core 2.
Beginner
  • 149
  • 1
  • 1
  • 7
11
votes
5 answers

Binding a configuration to an object graph in .NET Core 2.0

I'm making a .NET Core 2.0 app and I need to configure it. I'm looking at this documentation and it seems that in .NET Core 1.0 you could do: var appConfig = new AppSettings(); config.GetSection("App").Bind(appConfig); And in .NET Core 1.1 you…
Joshua Walsh
  • 1,676
  • 5
  • 21
  • 45
11
votes
3 answers

Detecting .net core 2.0

In a dotnet core 2.0 console application, the output of: Console.WriteLine("Hello World from "+ System.Runtime.InteropServices.RuntimeInformation.FrameworkDescription); Is a rather unexpected value: Hello World from .NET Core 4.6.00001.0 Is there…
Warren P
  • 58,696
  • 38
  • 168
  • 301
10
votes
2 answers

VS 2017 and Docker: Operation aborted

.Net Core 2 came out, so I updated Visual Studio 2017 (Community) to release 15.3.0 (and subsequently 15.3.2) which has support for Docker which I've installed on my machine (Windows 10), and I believe I've configured things correctly. I created a…
ricksmt
  • 843
  • 2
  • 12
  • 31
10
votes
5 answers

.NET Core 2 and SwashBuckle Swagger UI is not Displaying

I have followed a few tutorials and have gotten this to work at work but for some reason I am not able to get the UI to display but the Swagger Json is created. Last tutorial I looked at is here. My setup is like so: Nuget Package:…
10
votes
2 answers

InvalidOperationException: No IAuthenticationSignInHandler is configured to handle sign in for the scheme: MyCookieAuthenticationScheme

I am trying to follow the instructions here to add Cookie Authentication to my site. So far I have added the following: Invoke the UseAuthentication method in the Configure method of the Startup.cs file: app.UseAuthentication(); Invoke the…
Liam
  • 1,043
  • 10
  • 21
9
votes
3 answers

How to pass dependencies to a custom .NET Core ILoggerProvider

I am creating a custom .NET Core ILoggerProvider that requires some dependencies to be passed into its constructor. I believe I am using a fairly common pattern to initialize my logging implementation; it looks something like this: var services =…
Tim Coulter
  • 8,323
  • 10
  • 60
  • 88
9
votes
3 answers

.Net core 2.0 console app as a windows service

I am trying to set up a .Net Core Console application as a service. Using .Net standard I usually make use of Topshelf but this does not seem to support .Net Core. Since Topshelf is not an option what can I do to run the the .Net Core Console…
Matthew P.
  • 93
  • 1
  • 1
  • 4
9
votes
2 answers

dotnet publish include extra files

I have a netcore application depends on my custom project. Because I cannot reference it directly, I have written postbuildevents that are copying my files to output: xcopy "$(SolutionDir)Ethereum.Contracts\bin\$(ConfigurationName)\*.abi"…
Alex Zhukovskiy
  • 8,186
  • 2
  • 51
  • 123
9
votes
1 answer

additionalProbingPaths not respected after dotnet publish?

I'm using dotnet 2.1.4 on Windows. dotnet --info shows: .NET Command Line Tools (2.1.4) Product Information: Version: 2.1.4 Commit SHA-1 hash: 5e8add2190 Runtime Environment: OS Name: Windows OS Version: 10.0.16299 OS…
Michael Stum
  • 167,397
  • 108
  • 388
  • 523
1
2
3
22 23