1. Head to the 33rd Modeling Contest Poll and drink to your heart's desire.
    Dismiss Notice
  2. Choose your means of doom in the 17th Mini Mapping Contest Poll.
    Dismiss Notice
  3. A slave to two rhythms, the 22nd Terraining Contest is here.
    Dismiss Notice
  4. The heavens smile on the old faithful. The 16th Techtree Contest has begun.
    Dismiss Notice
  5. The die is cast - the 6th Melee Mapping Contest results have been announced. Onward to the Hive Cup!
    Dismiss Notice
  6. The glory of the 20th Icon Contest is yours for the taking!
    Dismiss Notice
  7. Check out the Staff job openings thread.
    Dismiss Notice
Dismiss Notice
60,000 passwords have been reset on July 8, 2019. If you cannot login, read this.
MindWorX
Last Activity:
Sep 16, 2020
Joined:
Aug 3, 2004
Messages:
690

Awarded Medals 3

Birthday:
Jul 17, 1987 (Age: 33)
Location:
Ireland
Occupation:
Software Developer/Business Owner

MindWorX

Wulfy loves Nex!, 33, from Ireland

Staff Member
MindWorX was last seen:
Sep 16, 2020
    1. Chief_Of_GxBxL
      Chief_Of_GxBxL
      Thanks, 'unblock'ing the dlls has fixed the issue with the plugins not being loaded correctly.

      I've been testing a map with someone else that we call 'Server Test', it is just a simple map to send an HTTP request and return data in a game of two players. It used to work in Local Area Network on the previous version of SharpCraft (v3...).

      Now on Battle.Net we try to test it together on the new version of SharpCraft v4.0.0.136 and get a peculiar error:
      [IMG]
      Actually, this is the first time we've tried testing over Battle.Net. In the past we've always used LAN. Is there some sort of security measure that you know of that Blizzard has in place that is preventing us from hosting this map? Or could it be a local security feature like User Account Control. We both have tried running Launcher.exe as an administrator.

      Further, in the past I've also been able to play said Server Test map by myself in Single Player or LAN. Now when I try to load the map I cannot get into the lobby phase. The wc3 menus just animate as they do and I'm back in the map-selection screen. As shown in the screenshot below, this is after I try to host the map in LAN and the debug window seems fine with no errors, and loading all those war3map files.

      [IMG]

      Is this an issue with plugin compatibility (I'm still using the old plugins, e.g. Http.cs -> Http.dll)? I'd assumed that since there were no errors on startup with loading these plugins that they were OK, but this may be the issue here, in which case I'd need to write an updated version of the plugins.
    2. Chief_Of_GxBxL
      Chief_Of_GxBxL
      That is correct, the JassAPI plugin was not in the plugins folder. However, I did try putting it in the folder in the past in order to resolve this issue, and it looks like another error pops up, this time with WarAPI:

      Error when JassAPI is present in the Plugins folder...

      ----------
      Preparing folders . . .
      Done! (0.09 ms)
      Loading plugins from 'L:\Users\chief\Desktop\SharpCraft\SharpCraft-4.0.0.136\TinkerWorX.SharpCraft.Launcher\bin\Debug\plugins' . . .
      Locating plugins . . .
      File: Http.dll
      File: Input.dll
      File: Interface.dll
      File: MindWorX.Modules.Stopwatch.dll
      Type: MindWorX.Modules.Stopwatch.StopwatchPlugin
      File: MindWorX.SharpCraft.Modules.JassAPI.dll
      Exception: System.Reflection.ReflectionTypeLoadException: Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information.
      at System.Reflection.RuntimeModule.GetTypes(RuntimeModule module)
      at System.Reflection.RuntimeModule.GetTypes()
      at System.Reflection.Assembly.GetTypes()
      at TinkerWorX.SharpCraft.PluginSystem.LoadPlugins(String folder, PluginContext context) in L:\Users\chief\Desktop\SharpCraft\jassnewgenpack207\SharpCraft-4.0.0.136\TinkerWorX.SharpCraft\PluginSystem.cs:line 46
      LoaderException: System.IO.FileLoadException: Cannot resolve dependency to assembly 'MindWorX.SharpCraft.Modules.WarAPI, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' because it has not been preloaded. When using the ReflectionOnly APIs, dependent assemblies must be pre-loaded or loaded on demand through the ReflectionOnlyAssemblyResolve event.
      LoaderException: System.IO.FileLoadException: Cannot resolve dependency to assembly 'MindWorX.SharpCraft.Modules.WarAPI, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' because it has not been preloaded. When using the ReflectionOnly APIs, dependent assemblies must be pre-loaded or loaded on demand through the ReflectionOnlyAssemblyResolve event.
      LoaderException: System.IO.FileLoadException: Cannot resolve dependency to assembly 'MindWorX.SharpCraft.Modules.WarAPI, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' because it has not been preloaded. When using the ReflectionOnly APIs, dependent assemblies must be pre-loaded or loaded on demand through the ReflectionOnlyAssemblyResolve event.
      LoaderException: System.IO.FileLoadException: Cannot resolve dependency to assembly 'MindWorX.SharpCraft.Modules.WarAPI, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' because it has not been preloaded. When using the ReflectionOnly APIs, dependent assemblies must be pre-loaded or loaded on demand through the ReflectionOnlyAssemblyResolve event.
      LoaderException: System.IO.FileLoadException: Cannot resolve dependency to assembly 'MindWorX.SharpCraft.Modules.WarAPI, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' because it has not been preloaded. When using the ReflectionOnly APIs, dependent assemblies must be pre-loaded or loaded on demand through the ReflectionOnlyAssemblyResolve event.
      File: StopWatch.dll
      File: String.dll
      Done! (90.84 ms)
      Loading plugin assemblies and instanciating types. . .
      ----------

      Since it's complaining about WarAPI, I've tried placing WarAPI in the plugins directory as well, and I get this:
      [IMG]


      Something about sandboxing and networking.. Lidgren.Network.dll is in the folder from which I'm running Launcher.exe. Is there a setting/flag I'm missing? Excerpt taken from the screenshot:


      ----------
      An attempt was made to load an assembly from a network location which would have caused the assembly to be sandboxed in previous versions of the .NET Framework. [...] does not enable CAS policy by default, so this load may be dangerous. [...] enable the loadFromRemoteSources switch.
      ----------
      Should I enable this so-called 'loadFromRemoteSources' switch?
    3. Chief_Of_GxBxL
      Chief_Of_GxBxL
      Ok I'm almost there I think. The new stopwatch plugin which I've been using is still getting upset though, when it loads in Launcher.exe. Here is the plugin: [IMG]

      Then I get this mess when running Launcher.exe with the stopwatch.dll in the plugins folder...

      ----------
      Loading plugins from 'L:\Users\chief\Desktop\SharpCraft\SharpCraft-4.0.0.136\TinkerWorX.SharpCraft.Launcher\bin\Debug\plugins' . . .
      Locating plugins . . .
      File: Http.dll
      File: Input.dll
      File: Interface.dll
      File: MindWorX.Modules.Stopwatch.dll
      Exception: System.Reflection.ReflectionTypeLoadException: Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information.
      at System.Reflection.RuntimeModule.GetTypes(RuntimeModule module)
      at System.Reflection.RuntimeModule.GetTypes()
      at System.Reflection.Assembly.GetTypes()
      at TinkerWorX.SharpCraft.PluginSystem.LoadPlugins(String folder, PluginContext context) in L:\Users\chief\Desktop\SharpCraft\jassnewgenpack207\SharpCraft-4.0.0.136\TinkerWorX.SharpCraft\PluginSystem.cs:line 46
      LoaderException: System.IO.FileLoadException: Cannot resolve dependency to assembly 'MindWorX.SharpCraft.Modules.JassAPI, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' because it has not been preloaded. When using the ReflectionOnly APIs, dependent assemblies must be pre-loaded or loaded on demand through the ReflectionOnlyAssemblyResolve event.
      LoaderException: System.IO.FileLoadException: Cannot resolve dependency to assembly 'MindWorX.SharpCraft.Modules.JassAPI, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' because it has not been preloaded. When using the ReflectionOnly APIs, dependent assemblies must be pre-loaded or loaded on demand through the ReflectionOnlyAssemblyResolve event.
      LoaderException: System.IO.FileLoadException: Cannot resolve dependency to assembly 'MindWorX.SharpCraft.Modules.JassAPI, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' because it has not been preloaded. When using the ReflectionOnly APIs, dependent assemblies must be pre-loaded or loaded on demand through the ReflectionOnlyAssemblyResolve event.
      LoaderException: System.IO.FileLoadException: Cannot resolve dependency to assembly 'MindWorX.SharpCraft.Modules.JassAPI, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' because it has not been preloaded. When using the ReflectionOnly APIs, dependent assemblies must be pre-loaded or loaded on demand through the ReflectionOnlyAssemblyResolve event.
      File: StopWatch.dll
      File: String.dll
      Done! (24.61 ms)
      ----------
      It looks like the dependency on JassAPIPlugin is failing, and complaining about some pre-loading stuff. Does this mean that things are not being loaded in the correct order?


      - - -
      In response to your documentation, I think a post for each module would work very well! If I can get this plugin to work, I'd love to re-write the older plugins to be aligned with the new plugin framework you've made, in which case I can contribute some documentation.
    4. Chief_Of_GxBxL
      Chief_Of_GxBxL
      That worked, I missed that module. Will I need to grab the WarAPI as well? The compiler has no complaints so far about other things being missing..

      In the previous version, v3, running `Start game windowed` would launch Sharpcraft.exe with some flags. In this version it looks like you've gotten rid of that in favor of the Launcher.exe. While it is not yet implemented, I've simply copied over the Sharpcraft.exe along with the old plugins and modified the batch file, although I'm sure that the script compilation errors were caused by this. Is this not a safe practice to be using the old Sharpcraft.exe?

      So with the new version, v4, is there a good way to launch wc3 as we used to in v3, or should be continue to use Sharpcraft.exe? Also, does this mean Lidgren.Network.dll is obsolete in the new version?
    5. Chief_Of_GxBxL
      Chief_Of_GxBxL
      Thanks for updating this. I'm almost there, the only issue: where is MindWorX.SharpCraft.Modules.JassAPI defined? Am I missing a dll?

      I've downloaded the v4 zip from Github and built the TinkerWorX.SharpCraft project, and imported SharpCraft.dll into the Stopwatch example. Now all that's left is to find the missing directive above.

      - Chief
    6. Chief_Of_GxBxL
      Chief_Of_GxBxL
      Thanks for the hard work MindWorx, I really look forward to playing around with the new API! Best, ~Chief
    7. Chief_Of_GxBxL
      Chief_Of_GxBxL
      Hi MindWorX,

      I've downloaded your source code for SharpCraft from the github repo and am trying to practice making plugins (in this case, I'm just rewriting the StopWatch plugin to familiarize myself with the plugin process).

      I've noticed in the StopWatch.cs file you've imported TinkerWorX.SharpCraft.Game(.Jass). [IMG]

      However, when I open the .sln and try to write the plugin for scratch, Game is not found under SharpCraft (see: [IMG]
      How exactly do I get this to recognize TinkerWorX.SharpCraft.Game? Once I get that settled, do I just build the entire project and get the .dlls? In essence, how do you most easily create a plugin and then export it as a .dll?

      Thanks for the help!

      ~ Chief
    8. Ezekiel12
      Ezekiel12
      Yes that's where one puts it normally and where it should be if we have 1 Sharpcraft per 1 wc3 folder, right?
    9. Ezekiel12
      Ezekiel12
      ----------
      That's definitely doable. Lemme see if I can cook something up. Would a commandline argument be okay? Something like: -path "C:\Games\Warcraft III\"
      ----------
      An optimal priority for checking for war3.exe might be:
      1. Command line argument
      if not existant
      2. parent folder
      if not existant
      3. registry keys

      This does allow an custom path but does not require one, also you can have multiple wc3/Sharpcrafts per computer.
    10. Ezekiel12
      Ezekiel12
      Hey MindWorX. What do you think about letting SharpCraft only check for war3.exe in it's parent folder? Checking via registry keys prohibits multiple installations of Sharpcraft/wc3 on one computer and can cause problems, as seen here for example. After some bug search it was determined that it was SharpCraft's "fault" I could not copy my wc3 folder and test new tools (which include SharpCraft) with the copy.
    11. PurgeandFire
      PurgeandFire
      Happy birthday!
    12. General Frank
      General Frank
      Happy birthday!
    13. MasterHaosis
      MasterHaosis
      No problem man, I can do it still... I can go to my gmail account and send him mail. yes, site has option to send mail via this field, but still with your own mail you are sure. I am not sure how this works...
    14. MasterHaosis
      MasterHaosis
      sure I can do it with my gmail. What is his mail?
    15. MasterHaosis
      MasterHaosis
      [22-45-12] MasterHaosis: MindWorX, sorry
      [22-45-14] MasterHaosis: I was afk
      [22-45-25] MasterHaosis: MindWorX, I can try. What do you need?
    16. StoPCampinGn00b
      StoPCampinGn00b
      Happy Birthday MindWorX!!!
    17. Triggs
      Triggs
      I love you.
    18. TriggerHappy
      TriggerHappy
      Something odd (I know I should report to github).

      When using sharpcraft I2S(GetRandomInt) returns "st@y!" ? lol
    19. PlankingWolf
    20. gorillabull
      gorillabull
      halp.. im getting a bunch of access denied errors when i run your sharpcraft at fist i figured it was my antivirus so i turned it off but then i got the error box, and every time after that i got all the erros in the cmd regardless of weither the antivirus was on or off

      [IMG]
  • Loading...
  • Loading...
  • About

    Birthday:
    Jul 17, 1987 (Age: 33)
    Location:
    Ireland
    Occupation:
    Software Developer/Business Owner
    WarCraft 3 Account:
    MindWorX
    WarCraft 3 Realm:
    Northrend (Europe)
    Favourite Race:
    Draenei
    Favorite Organization/Clan:
    Bloodhoof

    Signature

    Anything I say, do, utter or exclaim is only coming from me personally, and definitely is not the views or opinions of Blizzard.
  • Loading...
  • Loading...