Comments (1)
It does not make sense to add a --no-token
option, simply because the attribute you are seeing in your code is not a standardized custom attribute or pseudo attribute (like FieldOffset
for example).
A possible solution would be to add something like a --omit-attribute Fully.Qualified.NameOf.Attribute
option to filter certain custom attributes from the output, but where do we stop? The next person wants to only remove attributes from certain methods... how many options are we going to add?
There are two easier solutions:
- Use the ICSharpCode.Decompiler package directly to decompile the code in question and add your own
IAstTransform
to the decompiler pipeline, just like we do in our unit tests, see https://github.com/icsharpcode/ILSpy/blob/master/ICSharpCode.Decompiler.Tests/Helpers/RemoveCompilerAttribute.cs - Use a simple regex to filter out those lines, tools like WinMerge let you even specify such filters/regexes on the fly without having to post-process the files yourself. A possible regex would be something like
^\s*\[Token\(Token\s*=\s*"0x[A-Fa-f0-9]{1,8}"\)\]$
.
Hope this helps!
from ilspy.
Related Issues (20)
- Settings panel shows strange hover/selection behavior
- Decompiler Settings: Checkbox in group header does not reflect state of the group
- Weird cast HOT 4
- Failed to decompile file .NETCoreApp v8 HOT 7
- Quicksearch box font cut below HOT 6
- It is not possible to use NRT attributes in the ILSpy project HOT 4
- FR: IL view on the GUI HOT 2
- FR: Symbols removal & renaming in the ILSpy GUI HOT 1
- Empty dotnet version folders lead to problems with resolving core assemblies in DotNetCorePathFinder HOT 1
- Assert at ICSharpCode.Decompiler.CSharp.Transforms.DeclareVariables.ResolveCollisions() HOT 4
- ILSpy crash
- Can't export project: System.UnauthorizedAccessException: Access to the path 'xxxx' is denied.
- Open class in new tab by default option HOT 2
- Make it target a specific compiler, and add a tool to compare the recompiled IL to the original IL HOT 6
- Export C# code containing IL that can be re-assembled with InlineIL.Fody (https://github.com/ltrzesniewski/InlineIL.Fody) HOT 4
- Missing variable declarations in repeated nested for-loops HOT 3
- Sorry, we crashed: System.ArgumentException: Unsupported table index: FieldPtr HOT 5
- ILSpy crashes when it parses deconstruction constructs
- Support Alt + NumpadLeft/Right for backward/forward navigation
- Missing variable declaration in nested for-loop after many other loops
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ilspy.