7

I need this package to access settings in the Web.config:

Restoring packages for D:\ ... path ... \dozor-backend.csproj...
Package System.Configuration.ConfigurationManager 4.4.0 is not compatible with netcoreapp1.1 (.NETCoreApp,Version=v1.1). Package System.Configuration.ConfigurationManager 4.4.0 supports:
  - net461 (.NETFramework,Version=v4.6.1)
  - netstandard2.0 (.NETStandard,Version=v2.0)
Package restore failed. Rolling back package changes for 'dozor-backend'.
Time Elapsed: 00:00:01.0720066
========== Finished ==========

I've seen other people use this package in net core app, so what's the issue? How can I use it in .NET Core app?

1
  • 2
    The error is explicit; not sure what the confusion is here. The package is not compatible with .NET Core 1.1. That means you need to be running .NET Core 2.0, or you can't use this package. Plain and simple. Commented Sep 28, 2017 at 17:10

1 Answer 1

11

As error said, you can use System.Configuration.ConfigurationManager only starting from .NETCoreApp 2.0. For the previous version, you only have new ASP.NET Core configuration mechanism provided by Configuration API.

Regarding a provided link: reread it carefully, it doesn't say that ConfigurationManager` is available and works with the previous version of .NET Core.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.