This question already has an answer here:
Dotpeek recompile decompiled files
(1 answer)
Closed 6 years ago.
I have a c# project that includes a dll which I need to make changes to. So I decompiled it using dotpeek, exported the code and made my changes. Now I need to recompile it to add it back to my project.
The issue is that I am not sure if I am going about this problem the right way. And if I was how would I recompile the code into a dll again?
Sorry about this question but I am new to c# and visual studio but thank you for your help!
You will need to create a new C# project in visual studio, put the decompiled code in the new project and then you can convert the modified decompiled code back to dll which can be referenced in your project.
Related
This question already has answers here:
How do I decompile a .NET EXE into readable C# source code?
(9 answers)
Closed 6 years ago.
I lost the original source code of my .exe. Now I want to edit some more changes. Is there is any way to make the published code of .exe as readable in C# asp.net?
Reflector and its add in FileDisassembler
Reflector will show the source code and FileDisassembler will convert it into Visual Studio Solution.
Please check out this link.
And for more knowledge you can check this link as well.
This question already has answers here:
Edit .NET assembly and recompile
(3 answers)
Closed 7 years ago.
I have used many decompilers but have too little experience to understand where it is that I can edit the c# code of specific objects within the DLL. Is it possible to simply edit the C# code and save the changes? If so how could I go about doing this?
TL:DR
How do I edit C# code inside a DLL that I do not have the source code for?
You can edit & patch .NET DLL/EXE with https://github.com/0xd4d/dnSpy
Worked perfectly well for me.
This question already has answers here:
How to use a class from one C# project with another C# project
(11 answers)
Closed 7 years ago.
Environment :
In C#, I have a solution with many project. They were added with *.csproj files.
Problem :
In a project, you can use classes of other files through namespace. However, is there a way to use namespace and classes of another project in the same solution?
In visual studio you should have a "References" area in the Solution Explorer. Right click that and click "Add Reference..."
From here, it's just a matter of locating where you other code is on your machine.
Edit: Here is some additional information on DLLs, in case it helps you.
This question already has answers here:
How to reference a C# Class Library project in Visual Studio 2010?
(2 answers)
Closed 8 years ago.
I am trying to write a page that displays a flow Diagram to the user. I downloaded the Tree Chart Generator from: http://www.codeproject.com/Articles/20508/Tree-Chart-Generator and added the Tree Generator project to my solution. However, when I try to reference TreeGenerator from my code behind, it is not recognized. I am sorry if this is a simplistic question, I am pretty new to .NET development.
Go to your web site project in the Solution Explorer, right click, click Add Reference, and select the project you want to reference. You may need to change to a "Solution" tab depending on your version of Visual Studio. I'm assuming Visual Studio because you didn't provide that detail in your question.
This question already has answers here:
How do you share code between projects/solutions in Visual Studio?
(17 answers)
Closed 8 years ago.
I want to have a file with some enum's and use them in several projects in the same solution.
How could I use the same enums throught projects in the same solution instead of having to copy them into every .cs file?
Im from xcode and obj-c and not very used to Visual Studio c# :(
If you have multiple projects that need to share source code you would create a new project as a class library type. Add the code to that project and then add it as a reference to the other projects that need it. Visual Studio will then handle building and sharing of the code for you.
To use the code in those projects you will have to define the using of the shared project in the C# files that need it.
If you need more detailed instructions. Just let me know.