System.TypeLoadException when start a template of client-server project on mono #491

Closed
flypixel opened this Issue Nov 13, 2015 · 2 comments

Comments

Projects
None yet
3 participants
@flypixel

Hello, I got this exception when I try to navigate at client-server template application (Monodevelop) on mono:

System.TypeLoadException
Could not load type 'WebSharper.Sitelets.Offline.HtmlCommand' from assembly WebSharper.Sitelets, Version=3.5.0.0, Culture=neutral, PublicKeyToken=dcd983dec8f76a71'.

The full trace of calls, if it helps

@bradphelan

This comment has been minimized.

Show comment
Hide comment
@bradphelan

bradphelan Dec 1, 2015

Got the same when running a the UI.Next with sitelets demo generated from Xamarin Studio. Latest version Xamarin and latest version of plugin.

Application Exception
System.TypeLoadException
Could not load type 'WebSharper.Sitelets.Offline.HtmlCommand' from assembly 'WebSharper.Sitelets, Version=3.6.0.0, Culture=neutral, PublicKeyToken=dcd983dec8f76a71'.

Description: HTTP 500.Error processing request.
Details: Non-web exception.
Exception stack trace:
  at (wrapper managed-to-native) System.RuntimeType:GetPropertiesByName (System.RuntimeType,string,System.Reflection.BindingFlags,bool,System.Type)
  at System.RuntimeType.GetPropertyCandidates (System.String name, BindingFlags bindingAttr, System.Type[] types, Boolean allowPrefixLookup) [0x00010] in /private/tmp/source-mono-mac-4.2.0-branch/bockbuild-mono-4.2.0-branch/profiles/mono-mac-xamarin/build-root/mono-4.2.1/external/referencesource/mscorlib/system/rttype.cs:2882 
  at System.RuntimeType.GetProperties (BindingFlags bindingAttr) [0x00000] in /private/tmp/source-mono-mac-4.2.0-branch/bockbuild-mono-4.2.0-branch/profiles/mono-mac-xamarin/build-root/mono-4.2.1/external/referencesource/mscorlib/system/rttype.cs:3090 
  at WebSharper.Sitelets.SiteLoading+TryLoadSiteB@58[a].Invoke (System.Type ty) [0x0000d] in <filename unknown>:0 
  at Microsoft.FSharp.Collections.SeqModule.TryPick[T,TResult] (Microsoft.FSharp.Core.FSharpFunc`2 chooser, IEnumerable`1 source) [0x0003e] in <filename unknown>:0 
  at WebSharper.Sitelets.SiteLoading.TryLoadSiteB[a] (System.Reflection.Assembly assembly) [0x0002a] in <filename unknown>:0 
  at WebSharper.Sitelets.SiteLoading.TryLoadSite (System.Reflection.Assembly assembly) [0x0000d] in <filename unknown>:0 
  at WebSharper.Sitelets.SiteLoading+LoadFromAssemblies@89-1.Invoke (System.Reflection.Assembly assembly) [0x00001] in <filename unknown>:0 
  at Microsoft.FSharp.Collections.IEnumerator+choose@202[TResult,T].System-Collections-IEnumerator-MoveNext () [0x00064] in <filename unknown>:0 
  at Microsoft.FSharp.Collections.SeqModule.ToList[T] (IEnumerable`1 source) [0x0003f] in <filename unknown>:0 
  at WebSharper.Sitelets.SiteLoading+LoadFromAssemblies@84.Invoke (Microsoft.FSharp.Core.Unit unitVar0) [0x0001e] in <filename unknown>:0 
  at WebSharper.Sitelets.Extensions.Timed[a,b] (WebSharper.Sitelets.a message, Microsoft.FSharp.Core.FSharpFunc`2 action) [0x0000d] in <filename unknown>:0 
  at WebSharper.Sitelets.SiteLoading.LoadFromAssemblies (System.Web.HttpApplication app) [0x0000b] in <filename unknown>:0 
  at WebSharper.Sitelets.HttpModule.System-Web-IHttpModule-Init (System.Web.HttpApplication app) [0x00001] in <filename unknown>:0 
  at System.Web.Configuration.HttpModulesSection.LoadModules (System.Web.HttpApplication app) [0x00052] in /private/tmp/source-mono-mac-4.2.0-branch/bockbuild-mono-4.2.0-branch/profiles/mono-mac-xamarin/build-root/mono-4.2.1/mcs/class/System.Web/System.Web.Configuration_2.0/HttpModulesSection.cs:82 
  at System.Web.HttpApplication.InitOnce (Boolean full_init) [0x000a4] in /private/tmp/source-mono-mac-4.2.0-branch/bockbuild-mono-4.2.0-branch/profiles/mono-mac-xamarin/build-root/mono-4.2.1/mcs/class/System.Web/System.Web/HttpApplication.cs:216 
Version Information: 4.2.1 (explicit/6dd2d0d Fri Nov 6 12:25:19 EST 2015); ASP.NET Version: 4.0.30319.17020
Powered by Mono

Got the same when running a the UI.Next with sitelets demo generated from Xamarin Studio. Latest version Xamarin and latest version of plugin.

Application Exception
System.TypeLoadException
Could not load type 'WebSharper.Sitelets.Offline.HtmlCommand' from assembly 'WebSharper.Sitelets, Version=3.6.0.0, Culture=neutral, PublicKeyToken=dcd983dec8f76a71'.

Description: HTTP 500.Error processing request.
Details: Non-web exception.
Exception stack trace:
  at (wrapper managed-to-native) System.RuntimeType:GetPropertiesByName (System.RuntimeType,string,System.Reflection.BindingFlags,bool,System.Type)
  at System.RuntimeType.GetPropertyCandidates (System.String name, BindingFlags bindingAttr, System.Type[] types, Boolean allowPrefixLookup) [0x00010] in /private/tmp/source-mono-mac-4.2.0-branch/bockbuild-mono-4.2.0-branch/profiles/mono-mac-xamarin/build-root/mono-4.2.1/external/referencesource/mscorlib/system/rttype.cs:2882 
  at System.RuntimeType.GetProperties (BindingFlags bindingAttr) [0x00000] in /private/tmp/source-mono-mac-4.2.0-branch/bockbuild-mono-4.2.0-branch/profiles/mono-mac-xamarin/build-root/mono-4.2.1/external/referencesource/mscorlib/system/rttype.cs:3090 
  at WebSharper.Sitelets.SiteLoading+TryLoadSiteB@58[a].Invoke (System.Type ty) [0x0000d] in <filename unknown>:0 
  at Microsoft.FSharp.Collections.SeqModule.TryPick[T,TResult] (Microsoft.FSharp.Core.FSharpFunc`2 chooser, IEnumerable`1 source) [0x0003e] in <filename unknown>:0 
  at WebSharper.Sitelets.SiteLoading.TryLoadSiteB[a] (System.Reflection.Assembly assembly) [0x0002a] in <filename unknown>:0 
  at WebSharper.Sitelets.SiteLoading.TryLoadSite (System.Reflection.Assembly assembly) [0x0000d] in <filename unknown>:0 
  at WebSharper.Sitelets.SiteLoading+LoadFromAssemblies@89-1.Invoke (System.Reflection.Assembly assembly) [0x00001] in <filename unknown>:0 
  at Microsoft.FSharp.Collections.IEnumerator+choose@202[TResult,T].System-Collections-IEnumerator-MoveNext () [0x00064] in <filename unknown>:0 
  at Microsoft.FSharp.Collections.SeqModule.ToList[T] (IEnumerable`1 source) [0x0003f] in <filename unknown>:0 
  at WebSharper.Sitelets.SiteLoading+LoadFromAssemblies@84.Invoke (Microsoft.FSharp.Core.Unit unitVar0) [0x0001e] in <filename unknown>:0 
  at WebSharper.Sitelets.Extensions.Timed[a,b] (WebSharper.Sitelets.a message, Microsoft.FSharp.Core.FSharpFunc`2 action) [0x0000d] in <filename unknown>:0 
  at WebSharper.Sitelets.SiteLoading.LoadFromAssemblies (System.Web.HttpApplication app) [0x0000b] in <filename unknown>:0 
  at WebSharper.Sitelets.HttpModule.System-Web-IHttpModule-Init (System.Web.HttpApplication app) [0x00001] in <filename unknown>:0 
  at System.Web.Configuration.HttpModulesSection.LoadModules (System.Web.HttpApplication app) [0x00052] in /private/tmp/source-mono-mac-4.2.0-branch/bockbuild-mono-4.2.0-branch/profiles/mono-mac-xamarin/build-root/mono-4.2.1/mcs/class/System.Web/System.Web.Configuration_2.0/HttpModulesSection.cs:82 
  at System.Web.HttpApplication.InitOnce (Boolean full_init) [0x000a4] in /private/tmp/source-mono-mac-4.2.0-branch/bockbuild-mono-4.2.0-branch/profiles/mono-mac-xamarin/build-root/mono-4.2.1/mcs/class/System.Web/System.Web/HttpApplication.cs:216 
Version Information: 4.2.1 (explicit/6dd2d0d Fri Nov 6 12:25:19 EST 2015); ASP.NET Version: 4.0.30319.17020
Powered by Mono

@Tarmil Tarmil closed this in 66b1812 Dec 1, 2015

@Tarmil

This comment has been minimized.

Show comment
Hide comment
@Tarmil

Tarmil Dec 1, 2015

Member

Sorry @flypixel for how long this took, the issue was a spurious reference from WebSharper.Sitelets.dll to WebSharper.Compiler.dll that caused the sitelet loader to fail. This fix will be in the next NuGet release.

Member

Tarmil commented Dec 1, 2015

Sorry @flypixel for how long this took, the issue was a spurious reference from WebSharper.Sitelets.dll to WebSharper.Compiler.dll that caused the sitelet loader to fail. This fix will be in the next NuGet release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment