这是我的 App.coconfig
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5" />
</startup>
<connectionstrings>
<add connectionstring="Data Source=YourDataSource; User Id=YourUserName;Password=YourPassword; Initial Catalog=Pubs;" name="ConString"/>
</connectionstrings>
</configuration>
但我得到错误。我曾经创建过 app.xsd,但我无法禁用其他 xsd。这是示例 http://www.codeproject.com/Tips/362436/Data-binding-in-WPF-DataGrid-control 但我帮助我,这有效
<?xml version="1.0"?>
<configuration>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5"/>
</startup>
<connectionStrings>
<add name="pubs"
providerName="System.Data.SqlClient"
connectionString="server=(local);integrated security=SSPI;database=pubs" />
</connectionStrings>
</configuration>