question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Unable to use runtime reloading - "The version is exactly the same as the previous one"

See original GitHub issue

I’m trying to use runtime reloading to be able to quickly iterate on my mod without having to restart the game. I’m using UMM 0.17.0 and I put "ManagerVersion" : "0.17.0.0" in my Info.json to get support for runtime reloading. My main class has the [EnableReloading] attribute on it, and when I load I see that modEntry.CanReload is true.

When I get in-game, clicking the Reload button does nothing. The log says Reload is not needed. The version is exactly the same as the previous one. This happens even if I change the [assembly: AssemblyVersion("1.0.0.0")] in my AssemblyInfo.cs between builds, and it comes from here: https://github.com/newman55/unity-mod-manager/blob/master/UnityModManager/ModManager.cs#L605

First, I’m not sure why this check is here – if it’s a debug / testing option, wouldn’t it be OK to just let me reload my assembly without having to modify my assembly version every time? Second, I’m not sure why this is failing – it seems like it should find the version to be different in my case, since I’m manually modifying the assembly version & rebuilding before hitting “Reload”.

I am testing this on Garden Paws. Any ideas on what could be going on?

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:6 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
newman55commented, Mar 31, 2020

In different versions of unity, it works differently. I also saw games in which assembly loading is hard cached.

0reactions
d-simplecommented, Mar 31, 2020

Can’t get reloading to work too and get same “Reloading isn’t needed” message. I produced two dlls with differing versions and made a test snippet:

static void Main(string[] args)
        {
            string aPath;

            aPath = @"C:\test.dll";
            var asbl = Assembly.Load(File.ReadAllBytes(aPath));
            Version v1 = asbl.GetName().Version;
            Console.WriteLine(v1);

            aPath = @"C:\testOld.dll";
            asbl = Assembly.ReflectionOnlyLoad(File.ReadAllBytes(aPath));
            Version v2 = asbl.GetName().Version;
            Console.WriteLine(v2);

            if (v1 == v2)
            //Error!
                Console.WriteLine("What the actual");
        }

This obviously works fine, i.e. versions are different.

Read more comments on GitHub >

github_iconTop Results From Across the Web

unable to load vi in LV runtime engine - AGAIN - NI Community
"Unable to load VI 'PopupDialogue.vi' with the labVIEW Run-Time Engine ... However it should be exactly the same version as the runtime ......
Read more >
Could not load file or assembly 'System.Runtime, Version= ...
This is when the error was introduced. I resolved the error by using NuGet to install the previous version of System. Runtime then...
Read more >
Fast Refresh had to perform a full reload · Issue #40184
Just updated to newest version, previously using 12.3.1. The stated issue exists in version 13.x.x and isn't solved yet in the latest one....
Read more >
Cannot debug net6.0-macos Apps - Developer Community
This is a regression. I can no longer debug net6.0-macos apps. It also fails for net6.0-maccatalyst apps. When I hit debug, the following ......
Read more >
Two sub library projects in one solution use same dll but ...
In my research, I have found that we can load DLL from a different location using the tag in the app config file...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found