ILSpy decompiles namespaces incorrectly
I'm having an issue where ILSpy is decompiling scripts like this:
Instead of
Which is a big issue for the around 1000+ scripts it generates. I cannot fix it all manually. Did I configure something wrong?
15 Replies
So it literally contains the text "namespace namespace"?
they're confused about file-scoped vs block scoped.
I'd agree, if the first line wasn't
namespace namespace Sunless.Game.AI;
, with "namespace" repeated twice
If ILSpy is really outputting that, that's obviously a problem
If it's actually namespace Sunless.Game.AI;
then sure, it's just OP's confusionNope, that was my mistake, sorry
The problem is that Unity does not accept these files.
999+ errors
Ah right. That's just a file-scoped namespace: https://learn.microsoft.com/en-us/dotnet/csharp/whats-new/csharp-10#file-scoped-namespace-declaration
but also what are you doing?
why are you decompiling these files and putting them into a unity project?
Ah, was looking for that, thanks!
Recreating a Unity project from an existing game.
for what purpose?
Remastering
Well, fan remaster, I didn't make the game.
you'll need to make sure you actually have permission to
I plan to go the route of games like OpenRCT, Daggerfall Unity and OpenMW. Make the basegame a hard requirement.
in that case why are you not using a mod loader and patching the game on startup?
There are certain fundamental things that cannot be easily changed.