Jump to content
Sign in to follow this  
n2n1

Question about editing class/methods in dnSpy

Recommended Posts

skh3esO.jpg

 

It was already in the code - i didn't change anything here. This throws errors at the start of compilation.

 

 

I think this results from decompiling when the local class code refers to something outside his.

 

 

May be need to toggle some checkboxes in the settings dnSpy that the compiler ignored it ?

It should not be that this is a rarity - it occurs in the code quite often.

Then what is the way to edit a class that contains similar things?

Edited by n2n1 (see edit history)

Share this post


Link to post
Share on other sites

Hi n2n1,

 

The dnSpy compiler is having trouble with the switch statement so it's generating compiler code to handle it and the name is not allowed by the compiler (you can't have angle brackets in a name).

 

To fix it:

 

1) Raise an issue on dnSpy (mention it's a Unity build as it may already be fixed for normal .net)

2) Rename the class to remove the brackets

 

oQN4FFO.png

zv5zRhZ.png

 

Cheers,

 

Hal

  • Like 1

Share this post


Link to post
Share on other sites

Man, Thank You!

 

I did it!!! :) I did what i planned !!!!! :)

(I was afraid that i would have to do it through IL :D)

 

 

 

1) Raise an issue on dnSpy (mention it's a Unity build as it may already be fixed for normal .net)

You mean on dnSpy gitHub?

I'll try if I can describe it correctly.

UPD: Done!

(But i used your words to make it more correct :))

Edited by n2n1
no, it not fixed in dnSpy... (see edit history)

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×
×
  • Create New...