I have two windows Form apps with C# and .NET Framework 4.0.
On both projects I have this App.Config:
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<configSections>
<sectionGroup name="userSettings" type="System.Configuration.UserSettingsGroup, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<section name="CameraSim.Properties.Settings" type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" allowExeDefinition="MachineToLocalUser" requirePermission="false" />
</sectionGroup>
<section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />
<!-- For more information on Entity Framework configuration, visit http://go.microsoft.com/fwlink/?LinkID=237468 --></configSections>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0" />
</startup>
<userSettings>
<CameraSim.Properties.Settings>
<setting name="TRZICConn" serializeAs="String">
<value>Data Source=UIC181;Initial Catalog=TRZIC-L;Integrated Security=False;User ID=xxxxxxx;Password=xxxxx;Connect Timeout=15;Encrypt=False;TrustServerCertificate=False</value>
</setting>
</CameraSim.Properties.Settings>
</userSettings>
<entityFramework>
<defaultConnectionFactory type="System.Data.Entity.Infrastructure.SqlConnectionFactory, EntityFramework" />
<providers>
<provider invariantName="System.Data.SqlClient" type="System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer" />
</providers>
</entityFramework>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="System.Net.Http" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-2.2.29.0" newVersion="2.2.29.0" />
</dependentAssembly>
</assemblyBinding>
</runtime>
</configuration>
In one of them the project compiles without any problem, but in the other one don't.
The error is:
You can not find schema information for the 'usersettings' element.
I have the same error with supportedRuntime, version, sku, setting, etc.
What have I forgotten?
I have also test this one, but I'm having the same problems. And on that page doesn't say anything about doing something else like adding a dll.