Git Product home page Git Product logo

Comments (11)

rfht avatar rfht commented on June 8, 2024

see discussion here which seems to be the exact same thing. If you run with --debug you could confirm if it's also on line 31.

Wondering if this could be an xbuild-related problem - IIUC @0x0ade uses msbuild and hasn't encountered this problem.

from xnatofna.

0x0ade avatar 0x0ade commented on June 8, 2024

I'm extremely sorry for the late response, as I've been busy with a few other projects.

The previous discussion was about the exact same error, and it seems like something I have less control over than I thought.

Moving back from AppDomain hacks to RuntimeDetour-ing FNA seems to be the way to go forward, which I'll do after the weekend. I need to update the version of MonoMod used by XnaToFna anyway, and MonoMod.RuntimeDetour has been revamped from the ground up, fixing all previous memory corruption issues I've encountered.

from xnatofna.

0x0ade avatar 0x0ade commented on June 8, 2024

Can you please retry building and running XnaToFna? I've updated all dependencies and have switched to the new MonoMod.RuntimeDetour, which should fix the AppDomain issue.

from xnatofna.

jxors avatar jxors commented on June 8, 2024

Thanks for all your work! Unfortunately I'm having some issues cloning and building the repo.

First, when I ran git clone I got this error:

Submodule path 'lib-projs/FNA': checked out '39b27547c5d14779033668ae1c017e2be8cfcf13'
Submodule 'lib/MojoShader-CS' (https://github.com/0x0ade/MojoShader-CS.git) registered for path 'lib-projs/FNA/lib/MojoShader-CS'
Submodule 'lib/OpenAL-CS' (https://github.com/flibitijibibo/OpenAL-CS.git) registered for path 'lib-projs/FNA/lib/OpenAL-CS'
Submodule 'lib/SDL2-CS' (https://github.com/flibitijibibo/SDL2-CS.git) registered for path 'lib-projs/FNA/lib/SDL2-CS'
fatal: No url found for submodule path 'lib-projs/FNA/lib/TheoraPlay-CS' in .gitmodules
Submodule path 'lib-projs/MonoGame.Net': checked out '842fb53db2bc7f45cf2192b2004530452324f6d5'
Submodule path 'lib-projs/MonoMod': checked out '7a367606ce39264f89c183e504bb8767b5208462'
Failed to recurse into submodule path 'lib-projs/FNA'

When I tried building, I got a bunch of errors about things missing, which I assume are caused by the error above. I then ran git submodule update --recursive which fixed some of the errors.

I'm still seeing the following errors when I run xbuild:

/home/[...]/workspace/XnaToFna/XnaToFna.sln (default targets) ->
(Build target) ->
/home/[...]/workspace/XnaToFna/lib-projs/FNA/FNA.csproj (default targets) ->
/usr/lib/mono/xbuild/14.0/bin/Microsoft.CSharp.targets (CoreCompile target) ->

        CSC: error CS2001: Source file `lib/Vorbisfile-CS/Vorbisfile.cs' could not be found
        CSC: error CS2001: Source file `lib/Theorafile/csharp/Theorafile.cs' could not be found

/home/[...]/workspace/XnaToFna/XnaToFna.sln (default targets) ->
(Build target) ->
/home/[...]/workspace/XnaToFna/lib-projs/MonoMod/MonoMod.Utils/MonoMod.Utils.csproj (default targets) ->
/usr/lib/mono/xbuild/14.0/bin/Microsoft.CSharp.targets (CoreCompile target) ->

        CSC: error CS0518: The predefined type `System.Object' is not defined or imported
        CSC: error CS0518: The predefined type `System.ValueType' is not defined or imported
        CSC: error CS0518: The predefined type `System.Attribute' is not defined or imported
        CSC: error CS0518: The predefined type `System.Int32' is not defined or imported
        CSC: error CS0518: The predefined type `System.UInt32' is not defined or imported
        CSC: error CS0518: The predefined type `System.Int64' is not defined or imported
        CSC: error CS0518: The predefined type `System.UInt64' is not defined or imported
        CSC: error CS0518: The predefined type `System.Single' is not defined or imported
        CSC: error CS0518: The predefined type `System.Double' is not defined or imported
        CSC: error CS0518: The predefined type `System.Char' is not defined or imported
        CSC: error CS0518: The predefined type `System.Int16' is not defined or imported
        CSC: error CS0518: The predefined type `System.Decimal' is not defined or imported
        CSC: error CS0518: The predefined type `System.Boolean' is not defined or imported
        CSC: error CS0518: The predefined type `System.SByte' is not defined or imported
        CSC: error CS0518: The predefined type `System.Byte' is not defined or imported
        CSC: error CS0518: The predefined type `System.UInt16' is not defined or imported
        CSC: error CS0518: The predefined type `System.String' is not defined or imported
        CSC: error CS0518: The predefined type `System.Enum' is not defined or imported
        CSC: error CS0518: The predefined type `System.Delegate' is not defined or imported
        CSC: error CS0518: The predefined type `System.MulticastDelegate' is not defined or imported
        CSC: error CS0518: The predefined type `System.Void' is not defined or imported
        CSC: error CS0518: The predefined type `System.Array' is not defined or imported
        CSC: error CS0518: The predefined type `System.Type' is not defined or imported
        CSC: error CS0518: The predefined type `System.Collections.IEnumerator' is not defined or imported
        CSC: error CS0518: The predefined type `System.Collections.IEnumerable' is not defined or imported
        CSC: error CS0518: The predefined type `System.IDisposable' is not defined or imported
        CSC: error CS0518: The predefined type `System.IntPtr' is not defined or imported
        CSC: error CS0518: The predefined type `System.UIntPtr' is not defined or imported
        CSC: error CS0518: The predefined type `System.RuntimeFieldHandle' is not defined or imported
        CSC: error CS0518: The predefined type `System.RuntimeTypeHandle' is not defined or imported
        CSC: error CS0518: The predefined type `System.Exception' is not defined or imported

If it helps, this is the output of git submodule:

39b27547c5d14779033668ae1c017e2be8cfcf13 lib-projs/FNA (17.01-243-g39b2754)
842fb53db2bc7f45cf2192b2004530452324f6d5 lib-projs/MonoGame.Net (heads/master)
7a367606ce39264f89c183e504bb8767b5208462 lib-projs/MonoMod (legacy-322-g7a36760)

from xnatofna.

0x0ade avatar 0x0ade commented on June 8, 2024

That's because one last remainder of the now removed TheoraPlay-CS submodule in the FNA submodule was still hanging around. That's been fixed now, please try again.

from xnatofna.

jxors avatar jxors commented on June 8, 2024

I'm still getting some errors:

[...]/XnaToFna/XnaToFna.sln (default targets) ->
(Build target) ->
[...]/XnaToFna/lib-projs/MonoMod/MonoMod.Utils/MonoMod.Utils.csproj (default targets) ->
/usr/lib/mono/xbuild/14.0/bin/Microsoft.CSharp.targets (CoreCompile target) ->

        CSC: error CS0518: The predefined type `System.Object' is not defined or imported
        CSC: error CS0518: The predefined type `System.ValueType' is not defined or imported
        CSC: error CS0518: The predefined type `System.Attribute' is not defined or imported
        CSC: error CS0518: The predefined type `System.Int32' is not defined or imported
        CSC: error CS0518: The predefined type `System.UInt32' is not defined or imported
        CSC: error CS0518: The predefined type `System.Int64' is not defined or imported
        CSC: error CS0518: The predefined type `System.UInt64' is not defined or imported
        CSC: error CS0518: The predefined type `System.Single' is not defined or imported
        CSC: error CS0518: The predefined type `System.Double' is not defined or imported
        CSC: error CS0518: The predefined type `System.Char' is not defined or imported
        CSC: error CS0518: The predefined type `System.Int16' is not defined or imported
        CSC: error CS0518: The predefined type `System.Decimal' is not defined or imported
        CSC: error CS0518: The predefined type `System.Boolean' is not defined or imported
        CSC: error CS0518: The predefined type `System.SByte' is not defined or imported
        CSC: error CS0518: The predefined type `System.Byte' is not defined or imported
        CSC: error CS0518: The predefined type `System.UInt16' is not defined or imported
        CSC: error CS0518: The predefined type `System.String' is not defined or imported
        CSC: error CS0518: The predefined type `System.Enum' is not defined or imported
        CSC: error CS0518: The predefined type `System.Delegate' is not defined or imported
        CSC: error CS0518: The predefined type `System.MulticastDelegate' is not defined or imported
        CSC: error CS0518: The predefined type `System.Void' is not defined or imported
        CSC: error CS0518: The predefined type `System.Array' is not defined or imported
        CSC: error CS0518: The predefined type `System.Type' is not defined or imported
        CSC: error CS0518: The predefined type `System.Collections.IEnumerator' is not defined or imported
        CSC: error CS0518: The predefined type `System.Collections.IEnumerable' is not defined or imported
        CSC: error CS0518: The predefined type `System.IDisposable' is not defined or imported
        CSC: error CS0518: The predefined type `System.IntPtr' is not defined or imported
        CSC: error CS0518: The predefined type `System.UIntPtr' is not defined or imported
        CSC: error CS0518: The predefined type `System.RuntimeFieldHandle' is not defined or imported
        CSC: error CS0518: The predefined type `System.RuntimeTypeHandle' is not defined or imported
        CSC: error CS0518: The predefined type `System.Exception' is not defined or imported

         31 Warning(s)
         31 Error(s)

I also tried to compile on another machine to make sure this wasn't an issue with my local configuration. That also gives the same error. So I'm seeing this error both on Ubuntu 18.04 (mono 4.6.2) and Ubuntu 16.04 (mono 4.2.1)

from xnatofna.

0x0ade avatar 0x0ade commented on June 8, 2024

That is bizarre, as those are types provided by the framework. Are you compiling using xbuild or msbuild? And can you please try updating to Mono 5+?

from xnatofna.

jxors avatar jxors commented on June 8, 2024

I was using xbuild, since mono 4 doesn't come with msbuild. I've upgraded to mono 5.12.0.226.

Using msbuild gives me 177 errors:

"[...]/XnaToFna/XnaToFna.sln" (default target) (1) ->                                                                        
"[...]/XnaToFna/XnaToFna.csproj" (default target) (2) ->                                                                     
"[...]/XnaToFna/lib-projs/MonoMod/MonoMod.RuntimeDetour/MonoMod.RuntimeDetour.csproj" (default target) (4:2) ->              
"[...]/XnaToFna/lib-projs/MonoMod/MonoMod.Utils/MonoMod.Utils.csproj" (default target) (5:3) ->                              
(CoreCompile target) ->                                                                                                                    
  MonoModExt.cs(1,7): error CS0246: The type or namespace name 'Mono' could not be found (are you missing a using directive or an assembly reference?) [[...]/XnaToFna/lib-projs/MonoMod/MonoMod.Utils/MonoMod.Utils.csproj]                                            
  MonoModExt.cs(2,7): error CS0246: The type or namespace name 'Mono' could not be found (are you missing a using directive or an assembly reference?) [[...]/XnaToFna/lib-projs/MonoMod/MonoMod.Utils/MonoMod.Utils.csproj]                                            
  MonoModExt.cs(3,7): error CS0246: The type or namespace name 'Mono' could not be found (are you missing a using directive or an assembly reference?) [[...]/XnaToFna/lib-projs/MonoMod/MonoMod.Utils/MonoMod.Utils.csproj]                                            
  RelinkFailedException.cs(6,7): error CS0246: The type or namespace name 'Mono' could not be found (are you missing a using directive or an assembly reference?) [[...]/XnaToFna/lib-projs/MonoMod/MonoMod.Utils/MonoMod.Utils.csproj]                                 
  RelinkTargetNotFoundException.cs(6,7): error CS0246: The type or namespace name 'Mono' could not be found (are you missing a using directive or an assembly reference?) [/[...]/XnaToFna/lib-projs/MonoMod/MonoMod.Utils/MonoMod.Utils.csproj]                         
  MonoModExt.cs(36,64): error CS0246: The type or namespace name 'ReaderParameters' could not be found (are you missing a using directive or an assembly reference?) [/[...]/XnaToFna/lib-projs/MonoMod/MonoMod.Utils/MonoMod.Utils.csproj]                              
  MonoModExt.cs(36,23): error CS0246: The type or namespace name 'ModuleDefinition' could not be found (are you missing a using directive or an assembly reference?) [/[...]/XnaToFna/lib-projs/MonoMod/MonoMod.Utils/MonoMod.Utils.csproj]                              
  MonoModExt.cs(49,65): error CS0246: The type or namespace name 'ReaderParameters' could not be found (are you missing a using directive or an assembly reference?) [/[...]/XnaToFna/lib-projs/MonoMod/MonoMod.Utils/MonoMod.Utils.csproj]               

[... Many more lines here ...]

    32 Warning(s)
    177 Error(s)

Time Elapsed 00:00:03.68

xbuild gives 2 errors:

[...]/XnaToFna/XnaToFna.sln (default targets) ->
(Build target) ->
[...]/XnaToFna/lib-projs/MonoMod/MonoMod/MonoMod.csproj (default targets) ->
/usr/lib/mono/xbuild/14.0/bin/Microsoft.CSharp.targets (CoreCompile target) ->

        MonoModder.cs(3,18): error CS0234: The type or namespace name 'Mdb' does not exist in the namespace 'Mono.Cecil' (are you missing an assembly reference?)
        MonoModder.cs(4,18): error CS0234: The type or namespace name 'Pdb' does not exist in the namespace 'Mono.Cecil' (are you missing an assembly reference?)

         33 Warning(s)
         2 Error(s)

from xnatofna.

0x0ade avatar 0x0ade commented on June 8, 2024

That seems like missing nuget packages. Can you please run nuget restore MonoMod.sln in the MonoMod submodule directory?

from xnatofna.

jxors avatar jxors commented on June 8, 2024

Running nuget restore mostly resolved my issues. I still got this error:

Which I fixed by removing this line from XnaToFnaUtil.Processor.cs:

         public static ConstructorInfo m_XmlIgnore_ctor = typeof(XmlIgnoreAttribute).GetConstructor(Type.EmptyTypes); 

After that, it compiled successfully.

from xnatofna.

0x0ade avatar 0x0ade commented on June 8, 2024

You forgot to paste the error into your comment, but I've removed the line anyway.

Thank you :)

from xnatofna.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.