2015-05-23 58 views
1

我的應用程序在Mono 3.1.2上正常工作,但一旦升級到單聲道4.0,我的應用程序無法啓動:單聲道4(3.1.2工作正常),無法加載類型Microsoft.CSharp.RuntimeBinder.RuntimeBinderContext

未能從程序集「Microsoft.CSharp,版本= 4.0.0.0加載類型Microsoft.CSharp.RuntimeBinder.RuntimeBinderContext'文化= neutral`

任何人都不會有爲什麼這會發生的任何想法?我正在使用導致問題的NancyHost。

以下是完整的堆棧跟蹤:

System.TypeLoadException:無法從組件 加載類型 'Microsoft.CSharp.RuntimeBinder.RuntimeBinderContext'「Microsoft.CSharp,版本= 4.0.0.0,文化=中立, PublicKeyToken = b03f5f7f11d50a3a'。在 Microsoft.CSharp.RuntimeBinder.CSharpGetIndexBinder.FallbackGetIndex (System.Dynamic.DynamicMetaObject目標, System.Dynamic.DynamicMetaObject []的索引, System.Dynamic.DynamicMetaObject errorSuggestion)[0x00000]在 :0在 System.Dynamic .GetIndexBinder.FallbackGetIndex (System.Dynamic.DynamicMetaObject目標, System.Dynamic.DynamicMetaObject []索引)[0x00000]中:0在System.Dynamic.DynamicMetaObject.BindGetIndex (System.Dynamic.GetIndexBinder粘合劑, System.Dynamic .DynamicMetaObject []索引)[0x00000] in:0 at System.Dynamic.DynamicObject + MetaDynamic.BindGetIndex (System.Dynamic.GetIndexBinder活頁夾,System.Dynamic.DynamicMetaObject [] args)[0x00000] in:0 at(System.Dynamic.DynamicMetaObject [] Index)[0x00000] in:0 at System.Dynamic.GetIndexBinder.Bind (System.Dynamic.DynamicMetaObject target, System.Dynamic.DynamicMetaObject [] args)在南西0:System.Dynamic.DynamicMetaObjectBinder.Bind (System.Object的[]指定參數時, System.Collections.ObjectModel.ReadOnlyCollection 1 parameters, System.Linq.Expressions.LabelTarget returnLabel) [0x00000] in <filename unknown>:0 at System.Runtime.CompilerServices.CallSiteBinder.BindCore[Func 4] (System.Runtime.CompilerServices.CallSite 1 site, System.Object[] args) [0x00000] in <filename unknown>:0 at System.Dynamic.UpdateDelegates.UpdateAndExecute2[Object,String,Object] (System.Runtime.CompilerServices.CallSite site, System.Object arg0, System.String arg1) [0x00000] in <filename unknown>:0 at Nancy.Conventions.BuiltInCultureConventions.FormCulture (Nancy.NancyContext context) [0x00000] in <filename unknown>:0 at Nancy.Culture.DefaultCultureService.DetermineCurrentCulture (Nancy.NancyContext context) [0x00000] in <filename unknown>:0 at Nancy.DefaultNancyContextFactory.Create (Nancy.Request request) [0x00000] in <filename unknown>:0 at Nancy.Routing.RouteCache..ctor (INancyModuleCatalog moduleCatalog, INancyContextFactory contextFactory, IRouteSegmentExtractor routeSegmentExtractor, IRouteDescriptionProvider routeDescriptionProvider, ICultureService cultureService, IEnumerable 1 routeMetadataProviders)[0x00000]在 。 Diagnostics.DiagnosticsHook.Enable (Nancy.Diagnostics.DiagnosticsConfiguration diagnosticsConfiguration, IPipelines pipeline,IEnumerable responseProcessor,IEnumerable 1 routeSegmentConstraints, ICultureService cultureService, IRequestTraceFactory requestTraceFactory, IEnumerable 1 routeM etadataProviders, ITextResource textResource)[0x00000]中:0在 Nancy.Diagnostics.DefaultDiagnostics.Initialize(IPipelines管道) [0x00000]中:0在 Nancy.Bootstrapper.NancyBootstrapperBase`1 [Nancy.TinyIoc.TinyIoCContainer] .Initialise ()[0x00000]中:0在 Nancy.Hosting.Self.NancyHost..ctor(INancyBootstrapper引導程序, Nancy.Hosting.Self.HostConfiguration配置,的System.Uri [] baseUris)[0x00000]中:0在 Nancy.Hosting.Self.NancyHost..ctor(的System.Uri基本URI, INancyBootstrapper引導程序,Nancy.Hosting.Self.HostConfiguration 配置)[0x00000]在:0

回答

2

是自我解釋,該RuntimeBinderContext類型不存在Microsoft.CSharp裝配誤差在單4.0.0

如果您在下面的圖片仔細觀察,你會看到只有這些類型爲程序集定義,其中沒有RuntimeBinderContext。因此錯誤。

Disassembly of Microsoft.CSharp 4.0.0.0

我知道這不是你的問題的解決方案,我在這裏處理同樣的情況。如果我找到解決方案,我會發布。但我想指出你的方向,爲什麼你得到這個錯誤。

+0

欣賞細節。奇怪的是單聲道項目有這個類,並定義了方法。我不確定它爲什麼不在4.0。 – Geesu

+0

https://github.com/mono/mono/blob/master/mcs/class/Microsoft.CSharp/Microsoft.CSharp.RuntimeBinder/RuntimeBinderContext.cs – Geesu

+0

你是否曾經能夠確定任何@javier?我打開了一個單聲道但沒有聽到任何聲音的錯誤。 – Geesu

相關問題