Right now I'm backporting issues that were fixed in a new version and adding them to an old version. It is .NET and Im using Visual Studios so once I add the code it seems it needed to be added to a decompiled class that will only allow me to read-only. What I did was copy the full path and I was able to write to the file itself and now my changes work. My main question is Im new to working with files that are decompiled and wanted to know if this is the correct way to make changes to a decompiled class. Note the class is serialized and just using enum only so I only added one new enum to the class. Again is there a better way to use Visual Studios to make decompiled updates, or did I do this incorrectly? Right now I can find it in the solution and when I copied the path this was the basic path "C:\User\name\AppData\Local\Temp\MetadataAsSource(guid id)\DecompilationMetaDataAsSourceFileProvider(guid id)\decompiled.cs"?
I need to update decompiled class in .NET is this the correct way?
491 Views Asked by Richard Brescher At
1
There are 1 best solutions below
Related Questions in C#
- Passing arguments to main in C using Eclipse
- kernel module does not print packet info
- error C2016 (C requires that a struct or union has at least one member) and structs typedefs
- Drawing with ncurses, sockets and fork
- How to catch delay-import dll errors (missing dll or symbol) in MinGW(-w64)?
- Configured TTL for A record(s) backing CNAME records
- Allocating memory for pointers inside structures in functions
- Finding articulation point of undirected graph by DFS
- C first fgets() is being skipped while the second runs
- C std library don't appear to be linked in object file
- gcc static library compilation
- How to do a case-insensitive string comparison?
- C programming: Create and write 2D array of files as function
- How to read a file then store to array and then print?
- Function timeouts in C and thread
Related Questions in ASP.NET
- Implementing Azure AD B2C Authentication in .NET 8 Blazor Project (RenderMode: InteractiveAuto)
- Azure Application Insights Not Displaying Custom Logs for Azure Functions with .NET 8
- IIS Rewrite Module exclude bots but allow GoogleBot
- Angular 16 sending null values to API
- I am the domain admin, newbie, how do I connect youtube.com on my domain?
- Dropdown list showing SQLServer2005SQLBrowserUser$DONSERVER instead of Active Directory group name in ASP.NET MVC C#
- ASP.NET Identity, Losing Ability to Login until Application Pool Recycles
- How to unprotect ASP.NET FormAuthentication cookie
- How does it work using ASP.NET FormAuthentication
- What is the purpose of a completely standalone 'this'?
- Is there a way to read .csproj PropertyGroup variable in c#
- MSBuild trying to copy different dll with similar name into project sporadically
- Minimizing IdentityServer4 Round Trips in Microservice Architecture with Ocelot
- Azure AD guest account in web app authentication user claims data
- Receiving 400 bad request on post when customer auth handler is used
Related Questions in .NET
- file download method in visual studio 2017
- Repository manager receives the wrong connection string in .net core
- MongoDb not connecting C#
- The current .NET SDK does not support targeting .NET Core 6.0. Brand new WPF Project VS Community 2022 17.9.5
- Why Scanning GSI on DynamoDb doesnt work as fast as expected when using CONTAINS?
- Are "blittable types" really unmanaged types for StructLayout Sequential
- Failed to fetch dynamically imported module on Blazor JS Interop
- Problem to upload several images per one request
- Implementing Azure AD B2C Authentication in .NET 8 Blazor Project (RenderMode: InteractiveAuto)
- Stripe connect payout - throws exceptions
- 'IOException: The cloud file provider is not running', when trying to delete 'cloud' folder
- Azure Application Insights Not Displaying Custom Logs for Azure Functions with .NET 8
- Convert C# DateTime.Ticks to Bigquery DateTime Format
- Socket.io nodejs server .NET connection
- Producer Batching Service Bus Vs Kafka
Related Questions in VISUAL-STUDIO
- The current .NET SDK does not support targeting .NET Core 6.0. Brand new WPF Project VS Community 2022 17.9.5
- Dotnet Run is not working but the application is running in Visual Studio
- Is there a way to support Tailwind @apply in Visual Studio?
- How can I eliminate compile warnings using ZLib in Visual Studio
- C++(or Visual Studio) saving the file will not preserve the original file contents
- VS Community 2022 cannot install dotnet-ef when i try to publish
- Visual Studio 2022 convert spaces to tabs on checkout and back to spaces on checkin
- What should I do if Visual Studio has a restriction on creating files with a long name or a long path to these files?
- Command line error D8036 - not allowed with multiple source files with node-gyp and VS2022
- Migrate Old VS 2015 .suo file to the New VS 2022 DocumentLayout.json
- How to make one executable visual studio, that users can run?
- Use tabs instead of spaces in .csproj file in Visual Studio 2022
- Unity - scrollview/dragging breaks after specific scene inactivity
- How to make Visual Studio 2022 project launch Windows Terminal instead of PowerShell?
- Why is 'EDITBIN /STACK:2097152 w3wp.exe' cmd is giving me an LNK1342 error?
Related Questions in BACKPORT
- Issues backporting HAPI FHIR Server HashmapResourceProvider bug fix to a previous version
- ERROR: Failed building wheel for backports.zoneinfo on an env Python
- I need to update decompiled class in .NET is this the correct way?
- OpenWRT backported ath11k can't find backported dependencies at build time
- ImportError: cannot import name 'zoneinfo' from 'backports' (unknown location)
- Properly backporting generic collections
- No module named 'backports'
- Unable to install rpy2 on MAC OS due to ERROR: Failed building wheel for backports.zoneinfo
- apache-airflow-backport-providers-google fails to install with apache-airflow(1.10.12)
- backport Synopsys DesignWare AXI DMA Driver on linux 4.14.226
- Reducing code duplication in C++: using same boilerplate snippets across slightly varying projects
- How to backport Python in Yocto build?
- How to enable or backport Bluethooth BLE feature in Linux kernel 3.10.0 version?
- ConnectivityManager NullPointerException while backporting an application
- Best way to run python 3.7 on Ubuntu 16.04 which comes with python 3.5
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
Well, you don't need or want to de-compile such referenced assemblies each time.
I would assume that you have source code to that assembly. And if you don't, then create a project, de-compile, and get a working build for that class.
Once done?
Then you are free to include that assembly as a reference in your projects.
To make changes to that referenced assembly?
You close the current project, open the project with the referenced assembly. Make source code changes (commit your changes to GitHub if using source control). Then you build.
You then close that project, and re-open your existing project.
If you are making lots of changes to that referenced assembly? Then simply include that project into the current project. That way, you can always edit the source code, and at build time, the. ddl’s will be re-created each time.
This is why you have the option to include multiple projects into one project.
Doing above also means that hitting shift F2 to jump to that class in code will NOT decompile, but jump to the source code for that class.
Keep in mind that the option to include "multiple" projects is allowed for most types of projects, but one exception is using a asp.net web site. Such a web site does not have a .sln (project file), and thus you don't have the option to include or "enjoy" multiple projects during the development process.
However, if you use a asp.net web site "application", then you do have a project file.
So, the standard approach for referenced assemblies?
If you need to modify source code of referenced assemblies (class)? Then you close your current project, open the project with the assembly, and then make changes to that source code. You then build, close the project, and go back to your existing project.
As noted, for "some kinds of active" development, this can be a pain. However, you can of course keep 2 copies of Visual Studio open.
The preferred approach is to simply add that project to your existing project.
Thus, multiple projects are allowed in one project.
You see in "bold" which project is the root, or "main" project, and it looks like this in practice.
And if you right click on either project?
You can choose "Build Dependencies".
So, this:
And in above panel you can use drag + drop to change the build order.
In above I have an external referenced project (CONTROLMIS), and thus that needs to be built BEFORE the main project builds. So, in above order, that project should be moved to the top and appear before the main project.
Thus, you are free to edit source code in both projects, and from your point of view, only one build process is required.
So, this is the "general" approach when you need to frequent edit external class assemblies you are working with.
As noted, this option requires your project is a "asp.net web site project", and you not using "just" a asp.net web site which does not have a .sln project file.
This ability (of multiple projects in one project) is one significant reason to use a asp.net web site project as opposed to working with a asp.net web site. Even rather old projects have the above options.