I am trying to get data access to an SQL Server from a .NET class library running as an Add-In under AutoCAD 2011. I'm using the Data Access Application Block (DAAB). The data acces is in a separate assembly, that have worked perfectly well for similar add-in
scenarios under Word, Excel and Visio. In these scenarios, I just had to make sure that a xxx.dll.config file existed in the folder where the Add-In assembly was deployed. The config file contains:
<section name="dataConfiguration" type="Microsoft.Practices.EnterpriseLibrary.Data.Configuration.DatabaseSettings, Microsoft.Practices.EnterpriseLibrary.Data, Version=5.0.414.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"
<add name="AET18" connectionString="Database=AET;Server=AET18;Integrated Security=SSPI" providerName="System.Data.SqlClient"/>
When calling DatabaseFactory.CreateDatabase() I get the error message: Activation error occurred while trying to get instance of type Database, key ""
I have seen this error message before (using it under Word or Excel), namely when i failed to place a xx.dll.config file in the directory where the add-in resided. So it seems that the enterprise library can't find the config file and thus can't
read the connection strings.
Where should I put the config info?