NServiceBus关于更新版本的问题

时间:2011-03-10 12:24:55

标签: nservicebus

我试图将使用NServiceBus 2.0.0.1145的应用程序更新到2.5.0.1446,但是当我启动应用程序时,我收到以下异常

FATAL NServiceBus.Host.Internal.GenericHost [(null)]
 - StructureMap.StructureMapException: StructureMap Exception Code:  207
Internal exception while creating Instance '19f293a7-8f99-4e87-b670-5083f8297fec
' of PluginType NServiceBus.IStartableBus, NServiceBus, Version=2.5.0.1446, Cult
ure=neutral, PublicKeyToken=9fc386479f8a226c.  Check the inner exception for mor
e details. ---> StructureMap.StructureMapException: StructureMap Exception Code:
  207
Internal exception while creating Instance '2155d2b3-df42-493b-a893-d80db8c77d60
' of PluginType NServiceBus.Unicast.Transport.ITransport, NServiceBus.Core, Vers
ion=2.5.0.1446, Culture=neutral, PublicKeyToken=9fc386479f8a226c.  Check the inn
er exception for more details. ---> StructureMap.StructureMapException: Structur
eMap Exception Code:  207
Internal exception while creating Instance '628f6283-6f33-4d61-8dd8-d6e2e75c7779
' of PluginType NServiceBus.Serialization.IMessageSerializer, NServiceBus, Versi
on=2.5.0.1446, Culture=neutral, PublicKeyToken=9fc386479f8a226c.  Check the inne
r exception for more details. ---> StructureMap.StructureMapException: Structure
Map Exception Code:  207
Internal exception while creating Instance '32bd9546-42f3-41a3-9459-45591704c2cc
' of PluginType NServiceBus.Serializers.XML.MessageSerializer.  Check the inner
exception for more details. ---> System.ArgumentNullException: Value cannot be n
ull.
Parameter name: con
   at System.Reflection.Emit.CustomAttributeBuilder.InitCustomAttributeBuilder(C
onstructorInfo con, Object[] constructorArgs, PropertyInfo[] namedProperties, Ob
ject[] propertyValues, FieldInfo[] namedFields, Object[] fieldValues)
   at System.Reflection.Emit.CustomAttributeBuilder..ctor(ConstructorInfo con, O
bject[] constructorArgs)
   at NServiceBus.MessageInterfaces.MessageMapper.Reflection.MessageMapper.AddCu
stomAttributeToProperty(Object customAttribute, PropertyBuilder propBuilder) in
d:\BuildAgent-02\work\20b5f701adefe8f8\src\impl\messageInterfaces\NServiceBus.Me
ssageInterfaces.MessageMapper.Reflection\MessageMapper.cs:line 211
   at NServiceBus.MessageInterfaces.MessageMapper.Reflection.MessageMapper.Creat
eTypeFrom(Type t, ModuleBuilder moduleBuilder) in d:\BuildAgent-02\work\20b5f701
adefe8f8\src\impl\messageInterfaces\NServiceBus.MessageInterfaces.MessageMapper.
Reflection\MessageMapper.cs:line 158
   at NServiceBus.MessageInterfaces.MessageMapper.Reflection.MessageMapper.Gener
ateImplementationFor(Type interfaceType, ModuleBuilder moduleBuilder) in d:\Buil
dAgent-02\work\20b5f701adefe8f8\src\impl\messageInterfaces\NServiceBus.MessageIn
terfaces.MessageMapper.Reflection\MessageMapper.cs:line 98
   at NServiceBus.MessageInterfaces.MessageMapper.Reflection.MessageMapper.InitT
ype(Type t, ModuleBuilder moduleBuilder) in d:\BuildAgent-02\work\20b5f701adefe8
f8\src\impl\messageInterfaces\NServiceBus.MessageInterfaces.MessageMapper.Reflec
tion\MessageMapper.cs:line 76
   at NServiceBus.MessageInterfaces.MessageMapper.Reflection.MessageMapper.Initi
alize(IEnumerable`1 types) in d:\BuildAgent-02\work\20b5f701adefe8f8\src\impl\me
ssageInterfaces\NServiceBus.MessageInterfaces.MessageMapper.Reflection\MessageMa
pper.cs:line 37
   at NServiceBus.Serializers.XML.MessageSerializer.set_MessageTypes(List`1 valu
e) in d:\BuildAgent-02\work\20b5f701adefe8f8\src\impl\Serializers\NServiceBus.Se
rializers.XML\MessageSerializer.cs:line 70
   at NServiceBusSerializersXMLMessageSerializerInstanceBuildera71d199d1ac44181b
9d8ee38416ba70b.BuildInstance(IConfiguredInstance , BuildSession )
   at StructureMap.Pipeline.ConfiguredInstanceBase`1.StructureMap.Pipeline.IConf
iguredInstance.Build(Type pluginType, BuildSession session, InstanceBuilder buil
der) in d:\dev\structuremap\Source\StructureMap\Pipeline\ConfiguredInstanceBase.
cs:line 105
   --- End of inner exception stack trace ---
   at StructureMap.Pipeline.ConfiguredInstanceBase`1.StructureMap.Pipeline.IConf
iguredInstance.Build(Type pluginType, BuildSession session, InstanceBuilder buil
der) in d:\dev\structuremap\Source\StructureMap\Pipeline\ConfiguredInstanceBase.
cs:line 117
   at StructureMap.Pipeline.ConfiguredInstanceBase`1.build(Type pluginType, Buil
dSession session) in d:\dev\structuremap\Source\StructureMap\Pipeline\Configured
InstanceBase.cs:line 166
   at StructureMap.Pipeline.Instance.createRawObject(Type pluginType, BuildSessi
on session) in d:\dev\structuremap\Source\StructureMap\Pipeline\Instance.cs:line
 140
   at StructureMap.Pipeline.Instance.Build(Type pluginType, BuildSession session
) in d:\dev\structuremap\Source\StructureMap\Pipeline\Instance.cs:line 106
   at StructureMap.Pipeline.ObjectBuilder.ConstructNew(Type pluginType, Instance
 instance, BuildSession session) in d:\dev\structuremap\Source\StructureMap\Pipe
line\ObjectBuilder.cs:line 41
   at StructureMap.Pipeline.ObjectBuilder.Resolve(Type pluginType, Instance inst
ance, BuildSession session) in d:\dev\structuremap\Source\StructureMap\Pipeline\
ObjectBuilder.cs:line 29
   at StructureMap.BuildSession.CreateInstance(Type pluginType, Instance instanc
e) in d:\dev\structuremap\Source\StructureMap\BuildSession.cs:line 143
   at StructureMap.BuildSession.<>c__DisplayClass3.<.ctor>b__1() in d:\dev\struc
turemap\Source\StructureMap\BuildSession.cs:line 32
   at StructureMap.BuildSession.CreateInstance(Type pluginType) in d:\dev\struct
uremap\Source\StructureMap\BuildSession.cs:line 177
   at StructureMap.BuildSession.StructureMap.IContext.GetInstance[T]() in d:\dev
\structuremap\Source\StructureMap\BuildSession.cs:line 80
   at NServiceBus.ObjectBuilder.StructureMap.StructureMapExtensions.Registration
`2.<RegisterServiceInterface>b__0(IContext ctx)
   at StructureMap.Pipeline.ConstructorInstance`1.build(Type pluginType, BuildSe
ssion session) in d:\dev\structuremap\Source\StructureMap\Pipeline\ConstructorIn
stance.cs:line 28
   --- End of inner exception stack trace ---
   at StructureMap.Pipeline.ConstructorInstance`1.build(Type pluginType, BuildSe
ssion session) in d:\dev\structuremap\Source\StructureMap\Pipeline\ConstructorIn
stance.cs:line 32
   at StructureMap.Pipeline.Instance.createRawObject(Type pluginType, BuildSessi
on session) in d:\dev\structuremap\Source\StructureMap\Pipeline\Instance.cs:line
 140
   at StructureMap.Pipeline.Instance.Build(Type pluginType, BuildSession session
) in d:\dev\structuremap\Source\StructureMap\Pipeline\Instance.cs:line 106
   at StructureMap.Pipeline.ObjectBuilder.ConstructNew(Type pluginType, Instance
 instance, BuildSession session) in d:\dev\structuremap\Source\StructureMap\Pipe
line\ObjectBuilder.cs:line 41
   at StructureMap.Pipeline.ObjectBuilder.Resolve(Type pluginType, Instance inst
ance, BuildSession session) in d:\dev\structuremap\Source\StructureMap\Pipeline\
ObjectBuilder.cs:line 29
   at StructureMap.BuildSession.CreateInstance(Type pluginType, Instance instanc
e) in d:\dev\structuremap\Source\StructureMap\BuildSession.cs:line 143
   at StructureMap.BuildSession.<>c__DisplayClass3.<.ctor>b__1() in d:\dev\struc
turemap\Source\StructureMap\BuildSession.cs:line 32
   at StructureMap.BuildSession.CreateInstance(Type pluginType) in d:\dev\struct
uremap\Source\StructureMap\BuildSession.cs:line 177
   at StructureMap.Pipeline.DefaultInstance.build(Type pluginType, BuildSession
session) in d:\dev\structuremap\Source\StructureMap\Pipeline\DefaultInstance.cs:
line 14
   at StructureMap.Pipeline.Instance.createRawObject(Type pluginType, BuildSessi
on session) in d:\dev\structuremap\Source\StructureMap\Pipeline\Instance.cs:line
 140
   at StructureMap.Pipeline.Instance.Build(Type pluginType, BuildSession session
) in d:\dev\structuremap\Source\StructureMap\Pipeline\Instance.cs:line 106
   at StructureMap.Pipeline.ConfiguredInstanceBase`1.getChild(String propertyNam
e, Type pluginType, BuildSession buildSession) in d:\dev\structuremap\Source\Str
uctureMap\Pipeline\ConfiguredInstanceBase.cs:line 176
   at StructureMap.Pipeline.ConfiguredInstanceBase`1.StructureMap.Pipeline.IConf
iguredInstance.GetChild(String propertyName, Type pluginType, BuildSession build
Session) in d:\dev\structuremap\Source\StructureMap\Pipeline\ConfiguredInstanceB
ase.cs:line 91
   at NServiceBusUnicastTransportMsmqMsmqTransportInstanceBuilder1e093241493b413
4b568f6092322262b.BuildInstance(IConfiguredInstance , BuildSession )
   at StructureMap.Pipeline.ConfiguredInstanceBase`1.StructureMap.Pipeline.IConf
iguredInstance.Build(Type pluginType, BuildSession session, InstanceBuilder buil
der) in d:\dev\structuremap\Source\StructureMap\Pipeline\ConfiguredInstanceBase.
cs:line 109
   at StructureMap.Pipeline.ConfiguredInstanceBase`1.build(Type pluginType, Buil
dSession session) in d:\dev\structuremap\Source\StructureMap\Pipeline\Configured
InstanceBase.cs:line 166
   at StructureMap.Pipeline.Instance.createRawObject(Type pluginType, BuildSessi
on session) in d:\dev\structuremap\Source\StructureMap\Pipeline\Instance.cs:line
 140
   at StructureMap.Pipeline.Instance.Build(Type pluginType, BuildSession session
) in d:\dev\structuremap\Source\StructureMap\Pipeline\Instance.cs:line 106
   at StructureMap.Pipeline.ObjectBuilder.ConstructNew(Type pluginType, Instance
 instance, BuildSession session) in d:\dev\structuremap\Source\StructureMap\Pipe
line\ObjectBuilder.cs:line 41
   at StructureMap.Pipeline.ObjectBuilder.Resolve(Type pluginType, Instance inst
ance, BuildSession session) in d:\dev\structuremap\Source\StructureMap\Pipeline\
ObjectBuilder.cs:line 29
   at StructureMap.BuildSession.CreateInstance(Type pluginType, Instance instanc
e) in d:\dev\structuremap\Source\StructureMap\BuildSession.cs:line 143
   at StructureMap.BuildSession.<>c__DisplayClass3.<.ctor>b__1() in d:\dev\struc
turemap\Source\StructureMap\BuildSession.cs:line 32
   at StructureMap.BuildSession.CreateInstance(Type pluginType) in d:\dev\struct
uremap\Source\StructureMap\BuildSession.cs:line 177
   at StructureMap.BuildSession.StructureMap.IContext.GetInstance[T]() in d:\dev
\structuremap\Source\StructureMap\BuildSession.cs:line 80
   at NServiceBus.ObjectBuilder.StructureMap.StructureMapExtensions.Registration
`2.<RegisterServiceInterface>b__0(IContext ctx)
   at StructureMap.Pipeline.ConstructorInstance`1.build(Type pluginType, BuildSe
ssion session) in d:\dev\structuremap\Source\StructureMap\Pipeline\ConstructorIn
stance.cs:line 28
   --- End of inner exception stack trace ---
   at StructureMap.Pipeline.ConstructorInstance`1.build(Type pluginType, BuildSe
ssion session) in d:\dev\structuremap\Source\StructureMap\Pipeline\ConstructorIn
stance.cs:line 32
   at StructureMap.Pipeline.Instance.createRawObject(Type pluginType, BuildSessi
on session) in d:\dev\structuremap\Source\StructureMap\Pipeline\Instance.cs:line
 140
   at StructureMap.Pipeline.Instance.Build(Type pluginType, BuildSession session
) in d:\dev\structuremap\Source\StructureMap\Pipeline\Instance.cs:line 106
   at StructureMap.Pipeline.ObjectBuilder.ConstructNew(Type pluginType, Instance
 instance, BuildSession session) in d:\dev\structuremap\Source\StructureMap\Pipe
line\ObjectBuilder.cs:line 41
   at StructureMap.Pipeline.ObjectBuilder.Resolve(Type pluginType, Instance inst
ance, BuildSession session) in d:\dev\structuremap\Source\StructureMap\Pipeline\
ObjectBuilder.cs:line 29
   at StructureMap.BuildSession.CreateInstance(Type pluginType, Instance instanc
e) in d:\dev\structuremap\Source\StructureMap\BuildSession.cs:line 143
   at StructureMap.BuildSession.<>c__DisplayClass3.<.ctor>b__1() in d:\dev\struc
turemap\Source\StructureMap\BuildSession.cs:line 32
   at StructureMap.BuildSession.CreateInstance(Type pluginType) in d:\dev\struct
uremap\Source\StructureMap\BuildSession.cs:line 177
   at StructureMap.Pipeline.DefaultInstance.build(Type pluginType, BuildSession
session) in d:\dev\structuremap\Source\StructureMap\Pipeline\DefaultInstance.cs:
line 14
   at StructureMap.Pipeline.Instance.createRawObject(Type pluginType, BuildSessi
on session) in d:\dev\structuremap\Source\StructureMap\Pipeline\Instance.cs:line
 140
   at StructureMap.Pipeline.Instance.Build(Type pluginType, BuildSession session
) in d:\dev\structuremap\Source\StructureMap\Pipeline\Instance.cs:line 106
   at StructureMap.Pipeline.ConfiguredInstanceBase`1.getChild(String propertyNam
e, Type pluginType, BuildSession buildSession) in d:\dev\structuremap\Source\Str
uctureMap\Pipeline\ConfiguredInstanceBase.cs:line 176
   at StructureMap.Pipeline.ConfiguredInstanceBase`1.StructureMap.Pipeline.IConf
iguredInstance.GetChild(String propertyName, Type pluginType, BuildSession build
Session) in d:\dev\structuremap\Source\StructureMap\Pipeline\ConfiguredInstanceB
ase.cs:line 91
   at NServiceBusUnicastUnicastBusInstanceBuilderb0bf705c932c4e979e9826afc26acef
4.BuildInstance(IConfiguredInstance , BuildSession )
   at StructureMap.Pipeline.ConfiguredInstanceBase`1.StructureMap.Pipeline.IConf
iguredInstance.Build(Type pluginType, BuildSession session, InstanceBuilder buil
der) in d:\dev\structuremap\Source\StructureMap\Pipeline\ConfiguredInstanceBase.
cs:line 109
   at StructureMap.Pipeline.ConfiguredInstanceBase`1.build(Type pluginType, Buil
dSession session) in d:\dev\structuremap\Source\StructureMap\Pipeline\Configured
InstanceBase.cs:line 166
   at StructureMap.Pipeline.Instance.createRawObject(Type pluginType, BuildSessi
on session) in d:\dev\structuremap\Source\StructureMap\Pipeline\Instance.cs:line
 140
   at StructureMap.Pipeline.Instance.Build(Type pluginType, BuildSession session
) in d:\dev\structuremap\Source\StructureMap\Pipeline\Instance.cs:line 106
   at StructureMap.Pipeline.ObjectBuilder.ConstructNew(Type pluginType, Instance
 instance, BuildSession session) in d:\dev\structuremap\Source\StructureMap\Pipe
line\ObjectBuilder.cs:line 41
   at StructureMap.Pipeline.ObjectBuilder.Resolve(Type pluginType, Instance inst
ance, BuildSession session) in d:\dev\structuremap\Source\StructureMap\Pipeline\
ObjectBuilder.cs:line 29
   at StructureMap.BuildSession.CreateInstance(Type pluginType, Instance instanc
e) in d:\dev\structuremap\Source\StructureMap\BuildSession.cs:line 143
   at StructureMap.BuildSession.<>c__DisplayClass3.<.ctor>b__1() in d:\dev\struc
turemap\Source\StructureMap\BuildSession.cs:line 32
   at StructureMap.BuildSession.CreateInstance(Type pluginType) in d:\dev\struct
uremap\Source\StructureMap\BuildSession.cs:line 177
   at StructureMap.BuildSession.StructureMap.IContext.GetInstance[T]() in d:\dev
\structuremap\Source\StructureMap\BuildSession.cs:line 80
   at NServiceBus.ObjectBuilder.StructureMap.StructureMapExtensions.Registration
`2.<RegisterServiceInterface>b__0(IContext ctx)
   at StructureMap.Pipeline.ConstructorInstance`1.build(Type pluginType, BuildSe
ssion session) in d:\dev\structuremap\Source\StructureMap\Pipeline\ConstructorIn
stance.cs:line 28
   --- End of inner exception stack trace ---
   at StructureMap.Pipeline.ConstructorInstance`1.build(Type pluginType, BuildSe
ssion session) in d:\dev\structuremap\Source\StructureMap\Pipeline\ConstructorIn
stance.cs:line 32
   at StructureMap.Pipeline.Instance.createRawObject(Type pluginType, BuildSessi
on session) in d:\dev\structuremap\Source\StructureMap\Pipeline\Instance.cs:line
 140
   at StructureMap.Pipeline.Instance.Build(Type pluginType, BuildSession session
) in d:\dev\structuremap\Source\StructureMap\Pipeline\Instance.cs:line 106
   at StructureMap.Pipeline.ObjectBuilder.ConstructNew(Type pluginType, Instance
 instance, BuildSession session) in d:\dev\structuremap\Source\StructureMap\Pipe
line\ObjectBuilder.cs:line 41
   at StructureMap.Pipeline.ObjectBuilder.Resolve(Type pluginType, Instance inst
ance, BuildSession session) in d:\dev\structuremap\Source\StructureMap\Pipeline\
ObjectBuilder.cs:line 29
   at StructureMap.BuildSession.CreateInstance(Type pluginType, Instance instanc
e) in d:\dev\structuremap\Source\StructureMap\BuildSession.cs:line 143
   at StructureMap.BuildSession.<>c__DisplayClass3.<.ctor>b__1() in d:\dev\struc
turemap\Source\StructureMap\BuildSession.cs:line 32
   at StructureMap.BuildSession.CreateInstance(Type pluginType) in d:\dev\struct
uremap\Source\StructureMap\BuildSession.cs:line 177
   at StructureMap.Container.GetInstance(Type pluginType) in d:\dev\structuremap
\Source\StructureMap\Container.cs:line 256
   at StructureMap.Container.TryGetInstance(Type pluginType) in d:\dev\structure
map\Source\StructureMap\Container.cs:line 208
   at NServiceBus.ObjectBuilder.StructureMap.StructureMapObjectBuilder.NServiceB
us.ObjectBuilder.Common.IContainer.Build(Type typeToBuild)
   at NServiceBus.ObjectBuilder.Common.CommonObjectBuilder.NServiceBus.ObjectBui
lder.IBuilder.Build[T]() in d:\BuildAgent-02\work\20b5f701adefe8f8\src\impl\Obje
ctBuilder.Common\ObjectBuilder.Common\CommonObjectBuilder.cs:line 93
   at NServiceBus.Host.Internal.GenericHost.Start() in d:\BuildAgent-02\work\20b
5f701adefe8f8\src\host\NServiceBus.Host\Internal\GenericHost.cs:line 75

当看到网络中的一个链接(http://tech.dir.groups.yahoo.com/group/nservicebus/message/7520)时,我得到的信息似乎有一些问题,结构图2.5.4.0但是当我试图更新2.6.2.0时它说版本2.5.4丢失了表示nservicebis内部使用2.5.4.0。 那么请你告诉我需要做什么?

谢谢, Ajai

1 个答案:

答案 0 :(得分:1)

仅用于纯诊断,请尝试下拉NServiceBus的源代码,将StructureMap的v2.6.2.0放入libraries文件夹(在旧的StructureMap程序集的顶部),然后运行以下命令:

。\ tools \ nant \ nant package

大约2-5分钟后(取决于您的系统),这将产生一个NServiceBus“包”,您可以提取和参考。

如果这解决了问题,我们可以看一下永久升级2.5分支以使用后面的StructureMap程序集。