Skip to content

System.Configuration and System.Configuration.ConfigurationManager issue #8025

@pamanes

Description

@pamanes

Description

I have a .Net Framework Console Project in .Net 4.6.1 with a reference to a class library in .Net Standard 2.0.

Both projects use class ConnectionStringSettings from System.Configuration.

The console project has a reference to System.Configuration 4.0 (just plain assembly reference) and the class library from nuget package System.Configuration.ConfigurationManager 4.7.0 and it all works fine.

The moment I upgrade the .net standard class library's nuget package System.Configuration.ConfigurationManager from 4.7.0 to 7.0 the compiler throws an error in the .Net Framework 4.6.1 console project:

Error CS0433 The type 'ConnectionStringSettings' exists in both 'System.Configuration.ConfigurationManager, Version=7.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51' and 'System.Configuration, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'

ANY tips are greatly appreciated.

Configuration

VS2022 version 17.4.2
OS: Win10 64 bit

Regression?

all works fine if I leave version 4.7.0 of System.Configuration.ConfigurationManager in the class library project.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Staleneeds-more-infoNot enough information has been provided. Please share more detail as requested.question

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions