Mefhisto1
Mefhisto1

Reputation: 2228

Application configuration is invalid - application won't start

I had configuration warning in app.config of my wpf application.

my entire app.config:

<?xml version="1.0" encoding="utf-8" ?>
<configuration xmlns="schema URL">
    <startup> 
        <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5" />
    </startup>
</configuration>

I tried :

How to remove warning 'The 'configuration' element is not declared.' Visual Studio C#

and

The configuration element is not declared

and as stated in one of answers, tried to restart VS and start again. No luck

enter image description here

The configuration warning is gone, however the application can't start

Upvotes: 2

Views: 6271

Answers (1)

Amol Bavannavar
Amol Bavannavar

Reputation: 2062

Use this App.config file :

<?xml version="1.0" encoding="utf-8" ?>
    <configuration>
        <startup> 
            <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5" />
        </startup>
    </configuration>

Upvotes: 4

Related Questions