我從https://github.com/subsonic/SubSonic-3.0下載了SubSonic 3.0.0.4源碼並使用Visual Studio 2010進行了編譯。當我將編譯後的SubSonic.Core.dll添加到我自己的項目中,並試圖使用像這樣的SimpleRepository從源碼編譯SubSonic 3.0.0.4
SimpleRepository repo = new SimpleRepository(ProviderFactory.GetProvider(connectionString, "System.Data.SqlClient"), SimpleRepositoryOptions.RunMigrations);
的dll崩潰:
InterceptionStrategy = new DynamicProxyInterceptionStrategy(this);
:
An unhandled exception of type 'System.TypeInitializationException' occurred in SubSonic.Core.dll
Additional information: The type initializer for 'SubSonic.DataProviders.DynamicProxyInterceptionStrategy' threw an exception.
崩潰亞音速的DbDataProvider.cs上線56時210
所有工作正常,如果我從項目的網站下載現成的SubSonic.Core.dll並使用它。但我想自己編譯它,因爲我稍後會嘗試對它進行一些修改。
感謝
巴普