# System.Configuration issue

**URL:** https://discussions.unity.com/t/system-configuration-issue/664130
**Category:** C# & .NET
**Tags:** Bug
**Created:** [May 9, 2017, 3:19pm UTC](https://discussions.unity.com/t/system-configuration-issue/664130 "2017-05-09T15:19:56Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![Saryk360](https://avatars.discourse-cdn.com/v4/letter/s/258eb7/32.png) [@Saryk360](https://discussions.unity.com/u/Saryk360)
#### Post date: [May 9, 2017, 3:19pm UTC](https://discussions.unity.com/t/system-configuration-issue/664130/1 "2017-05-09T15:19:56Z")

</div>

So i want to use System.Configuration to manage a configuration file for my project.

The problem I have is the following error in Unity :

```csharp
error CS0103: The name `ConfigurationManager' does not exist in the current context

```

I am `using System.Configuration;` AND I have added it to the Project References in Visual Studio, but Unity gives the error. Moreover, if I close Visual and Unity, when I open it again the reference to System.Confiuration.dll is unticked.

I tried browsing and adding it manually, doesn’t change anything.  
This is annoying and frustrating, does anyone have an idea of what’s going wrong ?

---

<div class="post-metadata">

### Author: ![MirelesJ\_1](https://avatars.discourse-cdn.com/v4/letter/m/bcef8e/32.png) [@MirelesJ\_1](https://discussions.unity.com/u/MirelesJ_1)
#### Post date: [July 9, 2017, 10:29pm UTC](https://discussions.unity.com/t/system-configuration-issue/664130/2 "2017-07-09T22:29:51Z")

</div>

My research revealed that you have to add a local copy reference of System.Configuration.dll and System.Configuration.Install.dll in the local plugins folder so the code compiles at design time. However, regardless of what I’ve tried so far appSettings.Count always comes back 0, and when I try to use the AddUpdateAppSettings() procedure in the sample to create the file, it fails, too.

I posted this question on July 4, with no reply yet.

> **[.NET C# ConfigurationManager for XML configuration (app.config)](https://discussions.unity.com/threads/net-c-configurationmanager-for-xml-configuration-app-config.481689/)**
>
> I have scoured the Interwebs for a solution on this. Has anyone successfully implemented https://msdn.microsoft.com/en-us/library/system.configuration.configurationmanager(v=vs.110).aspx? I am able to build a script component based on this MSDN...

---

<div class="post-metadata">

### Author: ![jessekcooley](https://dub1.discourse-cdn.com/unity/user_avatar/discussions.unity.com/jessekcooley/32/539880_2.png) [@jessekcooley](https://discussions.unity.com/u/jessekcooley)
#### Post date: [April 23, 2022, 3:21pm UTC](https://discussions.unity.com/t/system-configuration-issue/664130/3 "2022-04-23T15:21:24Z")

</div>

This might be an old post but anyone still struggling with this should try:

1. Ensure your VS editor and VS packages are up to date via the package manager
2. Go to Edit-\> Project Setting-\>Player-\>Other-\>API compatibility and switch to 2.0 (even if you’re on 2.0 just switch it and switch it back).
