Forum Visual Studio

Xamarin Studio 5.9 seems to broke StyleCop.MSBuild

I have a PCL project that has StyleCop.MSBuild installed via NuGet. Before the upgrade to Studio 5.9, it builds fine. Not anymore with 5.9

I get the following:

Task "StyleCopTask"
error : Error initializing task StyleCopTask: The classes in the module cannot be loaded.
Error initializing task StyleCopTask: System.Reflection.ReflectionTypeLoadException: The classes in the module cannot be loaded.
at (wrapper managed-to-native) System.Reflection.Assembly:GetTypes (System.Reflection.Assembly,bool)
at System.Reflection.Assembly.GetExportedTypes () [0x00000] in :0
at Microsoft.Build.BuildEngine.TaskDatabase.RegisterTask (System.String classname, Mono.XBuild.Framework.AssemblyLoadInfo assemblyLoadInfo) [0x00000] in :0
at Microsoft.Build.BuildEngine.UsingTask.Load (Microsoft.Build.BuildEngine.TaskDatabase db) [0x00000] in :0
at Microsoft.Build.BuildEngine.TaskDatabase.GetTypeFromClassName (System.String classname) [0x00000] in :0
at Microsoft.Build.BuildEngine.BuildTask.get_Type () [0x00000] in :0
at Microsoft.Build.BuildEngine.BuildTask.InitializeTask () [0x00000] in :0
at Microsoft.Build.BuildEngine.BuildTask.Execute () [0x00000] in :0

Did Studio 5.9 upgrade a new version of xbuild?



  • keannan5390keannan5390 USMember

    I'm running into this same issue.

  • AmitSharma.4177AmitSharma.4177 USMember, University

    Any luck finding workaround for this issue besides rolling back to older Xamarin version?

  • JimmyHutsonJimmyHutson USMember

    I don't think this is specific to Xamarin Studio 5.9. I see the same problem with XS 5.8.1, but with an up-to-date Xamarin.iOS:

    Xamarin Studio
    Version 5.8.1 (build 8)
    Mono 4.0.0 ((detached/d136b79)
    GTK+ 2.24.23 (Raleigh theme)

    Package version: 400000143

    Version: (Business Edition)
    Hash: 6481535
    Branch: master
    Build date: 2015-04-27 04:38:13-0400

    Operating System
    Mac OS X 10.10.2

  • travisntravisn USMember

    I see the stylecop error as well. Upgrading to mono 4.0 was the kicker. This is blocking us from upgrading to mono 4.0.

  • MirMajeed.1120MirMajeed.1120 USMember, University

    I am also facing same issue with Xamarin Studio 5.8.2.

  • JeffreyStedfastJeffreyStedfast USXamarin Team Xamurai

    The problem is either Mono 4.0 or Xamarin.iOS 8.10, it's not a Xamarin Studio issue.

  • edorphyedorphy USMember ✭✭

    @jstedfast Anyone at Xamarin report this to the MonoDevelop site or flag as an issue on GitHub?

  • jgalanakisjgalanakis USMember

    Same issue here, any updates?

  • JeffreyStedfastJeffreyStedfast USXamarin Team Xamurai

    Yes, a bug has been submitted here:

  • JimBordenJimBorden USMember ✭✭

    @jstedfast Is there a public-facing bug that we can track?

  • jogibear9988jogibear9988 USMember

    Any news to this ? I tried to access the Bug, but I'm not possible to view it...

  • JeffreyStedfastJeffreyStedfast USXamarin Team Xamurai

    When I linked the bug report, I didn't realize it was marked private by the customer that reported it. There's no public facing bug report, that's it.

  • jogibear9988jogibear9988 USMember

    When you can view the Bug, are there any news when or if it's fixed?

  • KenYeeKenYee USMember ✭✭

    This is more important to fix now that StyleCop via plugin (not the msbuild one) squawks about C# 6.0 stuff :-(

  • StevenMoyStevenMoy USMember

    I hate to dig up an old thread, but I still the see the issue with all the latest stable xamarin studio and PCL 4.5... How are others enforce code style via MSBuild if the this bug still exists?

Sign In or Register to comment.