SubSonic 3.0.0.2/3 | Structs.tt问题

时间:2009-07-21 10:52:43

标签: subsonic

Error   3   Running transformation: System.ArgumentException: Format of the initialization string does not conform to specification starting at index 0.
   at System.Data.Common.DbConnectionOptions.GetKeyValuePair(String connectionString, Int32 currentPosition, StringBuilder buffer, Boolean useOdbcRules, String& keyname, String& keyvalue)
   at System.Data.Common.DbConnectionOptions.ParseInternal(Hashtable parsetable, String connectionString, Boolean buildChain, Hashtable synonyms, Boolean firstKey)
   at System.Data.Common.DbConnectionOptions..ctor(String connectionString, Hashtable synonyms, Boolean useOdbcRules)
   at System.Data.SqlClient.SqlConnectionString..ctor(String connectionString)
   at System.Data.SqlClient.SqlConnectionFactory.CreateConnectionOptions(String connectionString, DbConnectionOptions previous)
   at System.Data.ProviderBase.DbConnectionFactory.GetConnectionPoolGroup(String connectionString, DbConnectionPoolGroupOptions poolOptions, DbConnectionOptions& userConnectionOptions)
   at System.Data.SqlClient.SqlConnection.ConnectionString_Set(String value)
   at System.Data.SqlClient.SqlConnection.set_ConnectionString(String value)
   at System.Data.SqlClient.SqlConnection..ctor(String connectionString)
   at Microsoft.VisualStudio.TextTemplating29C706144B7FE04D6F958B994FF0596C.GeneratedTextTransformation.GetReader(String sql)
   at Microsoft.VisualStudio.TextTemplating29C706144B7FE04D6F958B994FF0596C.GeneratedTextTransformation.LoadTables()
   at Microsoft.VisualStudio.TextTemplating29C706144B7FE04D6F958B994FF0596C.GeneratedTextTransformation.TransformText() C:\Documents and Settings\nobody\My Documents\Visual Studio 2008\Projects\web2008\SubSonic3ActiveRecords\Structs.tt 1   1   

2 个答案:

答案 0 :(得分:3)

发布堆栈跟踪?

Structs.tt在app / web.config中找不到连接字符串。

答案 1 :(得分:0)

在向创建app.config的类库项目添加服务引用后出现此错误。我想app.config必须优先于web.config。 我从我的项目中排除了app.config并为我解决了。