我安裝RavenDB然後在配置我所做的:未能從程序集加載類型「GatewayDeduplication「NServiceBus.Core
public static void ConfigurePersistence(BusConfiguration configuration)
{
var defaultStore = new DocumentStore
{
Url = "http://localhost:8085",
DefaultDatabase = "MyTestb"
}
.RegisterListener(new UniqueConstraintsStoreListener())
.Initialize();
configuration.UsePersistence<RavenDBPersistence>()
.DoNotSetupDatabasePermissions()
.SetDefaultDocumentStore(defaultStore);
}
當我運行該項目,然後我看到下面的錯誤:
System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.TypeLoadException: Could not load t
ype 'GatewayDeduplication' from assembly 'NServiceBus.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=9fc386479f8a226c'.
at NServiceBus.Persistence.RavenDBPersistence..ctor()
--- End of inner exception stack trace ---
at System.RuntimeTypeHandle.CreateInstance(RuntimeType type, Boolean publicOnly, Boolean noCheck, Boolean& canBeCached, RuntimeMethodHandleInternal
& ctor, Boolean& bNeedSecurityCheck)
at System.RuntimeType.CreateInstanceSlow(Boolean publicOnly, Boolean skipCheckThis, Boolean fillCache, StackCrawlMark& stackMark)
at System.RuntimeType.CreateInstanceDefaultCtor(Boolean publicOnly, Boolean skipCheckThis, Boolean fillCache, StackCrawlMark& stackMark)
at System.Activator.CreateInstance(Type type, Boolean nonPublic)
at System.Activator.CreateInstance(Type type)
at NServiceBus.Utils.Reflection.ExtensionMethods.Construct[T](Type type) in c:\BuildAgent\work\1b05a2fea6e4cd32\src\NServiceBus.Core\Utils\Reflecti
on\ExtensionMethods.cs:line 22
at NServiceBus.Persistence.PersistenceStartup.Run(Configure config) in c:\BuildAgent\work\1b05a2fea6e4cd32\src\NServiceBus.Core\Persistence\Persist
enceStartup.cs:line 32
at NServiceBus.Configure.<Initialize>b__7(IWantToRunBeforeConfigurationIsFinalized t) in c:\BuildAgent\work\1b05a2fea6e4cd32\src\NServiceBus.Core\C
onfigure.cs:line 114
at NServiceBus.Configure.<>c__DisplayClasse`1.<ActivateAndInvoke>b__d(Type t) in c:\BuildAgent\work\1b05a2fea6e4cd32\src\NServiceBus.Core\Configure
.cs:line 180
at System.Collections.Generic.List`1.ForEach(Action`1 action)
at NServiceBus.Configure.ForAllTypes[T](IList`1 types, Action`1 action) in c:\BuildAgent\work\1b05a2fea6e4cd32\src\NServiceBus.Core\Configure.cs:li
ne 138
at NServiceBus.Configure.ActivateAndInvoke[T](IList`1 types, Action`1 action) in c:\BuildAgent\work\1b05a2fea6e4cd32\src\NServiceBus.Core\Configure
.cs:line 182
at NServiceBus.Configure.Initialize() in c:\BuildAgent\work\1b05a2fea6e4cd32\src\NServiceBus.Core\Configure.cs:line 116
at NServiceBus.Bus.Create(BusConfiguration configuration) in c:\BuildAgent\work\1b05a2fea6e4cd32\src\NServiceBus.Core\Bus.cs:line 21
at NServiceBus.GenericHost.PerformConfiguration(Action`1 moreConfiguration) in c:\BuildAgent\work\a3de8759ee491634\src\NServiceBus.Hosting.Windows\
GenericHost.cs:line 121
at NServiceBus.GenericHost.Start() in c:\BuildAgent\work\a3de8759ee491634\src\NServiceBus.Hosting.Windows\GenericHost.cs:line 58
我無法找到爲什麼會出現這種情況。什麼是
GatewayDeduplication I never tried to load this DLL I dont care this but still Nservicebus is trying to load this dll and failing.
有什麼想法?
我試圖做'configuration.DisableFeature(typeof運算(GatewayMessage))的問題; '仍然沒有運氣。 –
我陷入這個錯誤無法繼續。即使我安裝了Nservicebus.Gateway,它仍然顯示相同的錯誤。 –
在這一行中,只有GatewayDeduplication'總線= NServiceBus 。總線 。創建(配置) .Start();' –