Giter Site home page Giter Site logo

Comments (22)

copygirl avatar copygirl commented on August 17, 2024

Is this only an issue on the server or does the mod also not load when you're playing singleplayer?

from vintagestory-issues.

milochristiansen avatar milochristiansen commented on August 17, 2024

It loads fine in single player. I'm guessing it has something to do with the working directory not being the binary directory, but I'm not familiar enough with .NET to tell for sure.

I don't really want to experiment too much on the server, since I don't want to screw anything up.

EDIT: I made a similar setup in single player on Windows (setting the working directory to something other than the game directory), and was not able to duplicate the issue.

from vintagestory-issues.

tyronx avatar tyronx commented on August 17, 2024

https://stackoverflow.com/questions/14490247/csc-error-cs0006-metadata-file-could-not-be-found-building-a-net-3-5-applicatio mentions C# 7 language features as issue - which would make sense because mono 4.6 supports only up to C# 6.

Assuming to be this issue. Please reopen if that is not the case.

from vintagestory-issues.

milochristiansen avatar milochristiansen commented on August 17, 2024

I added <LangVersion>6</LangVersion> to the .csproj file and compiled, and it worked fine, so that shouldn't be the issue here. (To make sure that key was working correctly I set it to various other values to see what errors I got, for example it won't compile with iso-1.)

(I can't reopen the issue since I didn't close it...)

from vintagestory-issues.

tyronx avatar tyronx commented on August 17, 2024

Send me source files please

from vintagestory-issues.

milochristiansen avatar milochristiansen commented on August 17, 2024

BrickTransitionBehavior.zip

from vintagestory-issues.

milochristiansen avatar milochristiansen commented on August 17, 2024

The whole mod is over here

from vintagestory-issues.

tyronx avatar tyronx commented on August 17, 2024

Did you run this from within the IDE or from console?

from vintagestory-issues.

milochristiansen avatar milochristiansen commented on August 17, 2024

When test compiling I used the console (dotnet build), when running on the server I used the (whole mod) zip linked above with the command in the first post (the zip was in /home/vintage/data/gamedata/Mods).

from vintagestory-issues.

milochristiansen avatar milochristiansen commented on August 17, 2024

Just to be 100% clear, when I compiled the .cs file and tried to load the mod with a dll instead of the .cs it worked. I would prefer not to have to do this, but for now that will be an acceptable workaround.

Whatever the issue is, it is limited to loading raw .cs files, probably only in mono.

from vintagestory-issues.

tyronx avatar tyronx commented on August 17, 2024

Thanks for the feedback. Another theory is that the currently used CSharpCodeProvider seemingly (https://stackoverflow.com/a/31641533/1873041) only compiles c# code until C# 5.0 and thus causes issues when trying to reference C# 6.0 libs?

from vintagestory-issues.

tyronx avatar tyronx commented on August 17, 2024

Hm but then again, my source mod works just fine on debian / mono 5.4.1.7
What if you update to mono 5?

from vintagestory-issues.

milochristiansen avatar milochristiansen commented on August 17, 2024

Sorry, I read this yesterday, but forgot to reply :(

The system in question isn't mine, so I don't want to mess with it any more than I have to.

from vintagestory-issues.

tyronx avatar tyronx commented on August 17, 2024

@copygirl does your updates on the modloader also load stuff in order of dependency? This should fix this problem then.

from vintagestory-issues.

copygirl avatar copygirl commented on August 17, 2024

I don't think I do ordering, but it's something that could be done.

from vintagestory-issues.

tyronx avatar tyronx commented on August 17, 2024

@milochristiansen does this issue still happen with 1.5.3?

from vintagestory-issues.

tyronx avatar tyronx commented on August 17, 2024

copygirls refactorings should fix this, so assuming this is fixed. Please reopen otherwise

from vintagestory-issues.

milochristiansen avatar milochristiansen commented on August 17, 2024

This is not fixed.

3:22:20 PM [Server Warning]: Error discovering files for 'BrickInTheWall.zip': 'BrickTransitionBehavior.cs' found at invalid path 'BrickTransitionBehavior.cs'. All .cs files should be in a subfolder 'src' of the mod folder / archive. This will be an ERROR in the future!
3:22:20 PM [Server Warning]: Mod 'BrickInTheWall.zip' (brickinthewall): Error parsing version string '1.2' at index 3: Expected PATCH version, found end of string (best guess: 1.2.0)
3:22:20 PM [Server Error]: Compiler errors during compiling mod 'BrickInTheWall.zip' (brickinthewall):
3:22:20 PM [Server Error]: [:0] [CS0006] Metadata file `VintagestoryAPI.dll' could not be found
3:22:20 PM [Server Error]: [:0] [CS0006] Metadata file `Lib/Newtonsoft.Json.dll' could not be found
3:22:20 PM [Server Error]: [:0] [CS0006] Metadata file `Lib/protobuf-net.dll' could not be found
3:22:20 PM [Server Error]: [:0] [CS0006] Metadata file `Lib/Tavis.JsonPatch.dll' could not be found
3:22:20 PM [Server Error]: Error loading mod 'BrickInTheWall.zip' (brickinthewall):
3:22:20 PM [Server Error]: System.Exception: Error(s) compiling mod 'BrickInTheWall.zip' (brickinthewall) from source files
3:22:20 PM [Server Error]: at _gpHtMiskGLjqPGZxwTher6nxdoG._KR6aEbe5eiNuqwaa2EH6wfBLvSd (_QtTCbWTgLzQ0L5pnJ4SA0p0S4nW , System.Collections.Generic.IEnumerable`1[T] ) [0x00141] in <00cbb88cfc944a46ba4ac8d0bbad9be6>:0
3:22:20 PM [Server Error]: at _QtTCbWTgLzQ0L5pnJ4SA0p0S4nW._QsEdKSeIRDVeKF6yvYWCoIe6ZXp (Vintagestory.API.Common.ILogger , _gpHtMiskGLjqPGZxwTher6nxdoG , _qTMXzQjTmZCapFMQ0QaS7GReooq ) [0x000d3] in <00cbb88cfc944a46ba4ac8d0bbad9be6>:0

There are a few other warnings in there, but the core error is the same.

from vintagestory-issues.

copygirl avatar copygirl commented on August 17, 2024

What happens if you change to the directory the VintagestoryServer.exe is in before you run it? That would confirm that the working directory is the issue.

from vintagestory-issues.

milochristiansen avatar milochristiansen commented on August 17, 2024

Well, since the server exhibiting this issue is being run under the monitor, and it would be a pain in the rear to run it manually, I decided to see what would happen if I ran the VS server with the current working directory not set to the same directory as the EXE on my PC. The result? I can reproduce the issue on my system now.

It seems this is 100% reliable. Run VS with the working directory set to anything other than the binary directory, and it fails to load mods that are not compiled.

BTW: This issue is still marked closed, and I cannot change that.

from vintagestory-issues.

copygirl avatar copygirl commented on August 17, 2024

Should be fixed for 1.5.4 now. Only waiting for Tyron to accept my merge request.

from vintagestory-issues.

tyronx avatar tyronx commented on August 17, 2024

I'll assume this is fixed now.

from vintagestory-issues.

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.