none
problem with app.config RRS feed

  • Question

  • Hi everyone;

    here is my app.config:

    <?xml version="1.0"?>

    <configuration>

        <configSections>

        </configSections>

        <connectionStrings>

            <add name="typeddataset.My.MySettings.stockConnectionString" connectionString="Data Source=USER-MSI\MSSQLSERVER2014;Initial Catalog=stock;Integrated Security=True" providerName="System.Data.SqlClient"/>

        </connectionStrings>

        <startup>

            <useLegacyV2RuntimeActivationPolicy="true"/>

            <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0"/>

        </startup>

    </configuration>

     

     and i am receiving these errors messages below all related to the startup section.

    Can anyone suggest a solution? Thinks. vblover


    Error      1              Application Configuration file "App.config" is invalid. Name cannot begin with the ' ' character, hexadecimal value 0x20. Line 9, position 10.   C:\Users\User\documents\visual studio 2010\Projects\typeddataset\typeddataset\App.config 9              10           typeddataset

    Error      2              Missing required whitespace.    C:\Users\User\documents\visual studio 2010\Projects\typeddataset\typeddataset\App.config 9              44           typeddataset

    Error      3              Missing attribute name.                C:\Users\User\documents\visual studio 2010\Projects\typeddataset\typeddataset\App.config 9              44           typeddataset

    Saturday, July 15, 2017 1:37 AM

Answers

  • Try the next fix:

       <startup useLegacyV2RuntimeActivationPolicy="true">
          <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0"/>
       </startup>

    • Marked as answer by vblover29 Monday, July 17, 2017 10:38 AM
    Monday, July 17, 2017 5:44 AM

All replies