何らかの理由で、特定のデータベースの型プロバイダーを作成できません。次のようなコードがあります (明らかに実際のデータベース名ではありません)。
type db1 = SqlDataConnection<"Data Source=SQL_05;Initial Catalog=**DATABASE1**;Integrated Security=true;MultipleActiveResultSets=True">
type db2 = SqlDataConnection<"Data Source=SQL_08;Initial Catalog=**DATABASE2**;Integrated Security=true;MultipleActiveResultSets=True">
type db3 = SqlDataConnection<"Data Source=SQL_10;Initial Catalog=**DATABASE3**;Integrated Security=true;MultipleActiveResultSets=True">
最初の 2 行はまったく問題ありません。必要なデータベースがそれらだけである限り、私のプログラムは正常に動作していました。ただし、3 行目を追加すると、次の行に沿って 1 つの大きなエラーが発生しました。
The type provider 'Microsoft.FSharp.Data.TypeProviders.DesignTime.DataProviders' reported an error:
tmp7AA1.cs(12,7): warning CS0437: The type 'System' in '...\AppData\Local\Temp\tmp7AA1.cs' conflicts with the imported namespace 'System' in 'c:\Windows\Microsoft.NET\Framework\v4.0.30319\System.Configuration.dll'. Using the type defined in '...\AppData\Local\Temp\tmp7AA1.cs'.
tmp7AA1.cs(88967,22): (Location of symbol related to previous warning)
c:\Windows\Microsoft.NET\Framework\v4.0.30319\System.Configuration.dll: (Location of symbol related to previous warning)
tmp7AA1.cs(12,7): error CS0138: A using namespace directive can only be applied to namespaces; 'System' is a type not a namespace
tmp7AA1.cs(88967,22): (Location of symbol related to previous error)tmp7AA1.cs(13,7):
warning CS0437: The type 'System' in '...\AppData\Local\Temp\tmp7AA1.cs' conflicts with the imported namespace 'System' in 'c:\Windows\Microsoft.NET\Framework\v4.0.30319\System.Configuration.dll'. Using the type defined in '...\AppData\Local\Temp\tmp7AA1.cs'.
tmp7AA1.cs(88967,22): (Location of symbol related to previous warning)
c:\Windows\Microsoft.NET\Framework\v4.0.30319\System.Configuration.dll: (Location of symbol related to previous warning)
tmp7AA1.cs(88967,31): error CS0246: The type or namespace name 'INotifyPropertyChanging' could not be found (are you missing a using directive or an assembly reference?)
tmp7AA1.cs(88967,56): error CS0246: The type or namespace name 'INotifyPropertyChanged' could not be found (are you missing a using directive or an assembly reference?)
tmp7AA1.cs(13,14): error CS0426: The type name 'Collections' does not exist in the type 'System'
tmp7AA1.cs(14,7): warning CS0437: The type 'System' in '...\AppData\Local\Temp\tmp7AA1.cs' conflicts with the imported namespace 'System' in 'c:\Windows\Microsoft.NET\Framework\v4.0.30319\System.Configuration.dll'. Using the type defined in '...\AppData\Local\Temp\tmp7AA1.cs'.
tmp7AA1.cs(88967,22): (Location of symbol related to previous warning)
c:\Windows\Microsoft.NET\Framework\v4.0.30319\System.Configuration.dll: (Location of symbol related to previous warning)
tmp7AA1.cs(14,14): error CS0426: The type name 'ComponentModel' does not exist in the type 'System'
などなど、116460 行で!
SSMS で各サーバーに接続して、これらの接続文字列が機能することを確認できます。ここに私が見るものがあります:
SQL_05
バージョン 10.0.2531 (SQL Server 2008)SQL_08
バージョン 10.0.2500 (SQL Server 2008)SQL_10
バージョンは 10.50.4286 (SQL Server 2008 R2)
これ以外には、3 つのサーバーに違いは見られません。私がここに欠けているものはありますか?この特定のサーバーの型プロバイダーを作成できるようにするには、参照を追加する必要がありますか?