This question already has answers here:
How do I decompile a .NET EXE into readable C# source code?
(9 answers)
Closed 7 years ago.
I have been working on a project for my college course for a couple of months. When I went to submit it the other day the source code has gone missing. It was a WPF C# application. Because all of the work was done on my memory stick I have no backup of it.
I tried running a recovery tool but it was unable to find anything.
What I have is the following:
The contents of the bin > Debug folder including an up to date compiled version of the application (an exe file)
The .sln file for the project.
I really need the source code for this as without it I might end up failing the project. Is there any way to get it with what I have?
If you have DLLs you can use something like .netReflector and peep into code..
use dlls in a new project and then you can drill into them
Related
This question already has answers here:
How to call an external program in python and retrieve the output and return code?
(5 answers)
Closed 3 years ago.
I'm working with python on a project using OPT GIGE cameras. What I need now is to show the camera vision and capture a frame with my Python script. I didn't find anyway to connect to the gige camera with opencv in python, so I decide to use halcon to capture the image. But halcon can only export to .cs file I wonder is there anyway to use python to execute a .cs script?
It seems that you confused C# source code file and C# Script file.
The former has a .cs extension and is just a source code file, wich should be included in the project and compiled, and requires .NET Framework or other .NET runtime, depending on the OS version, to run.
The latter has a .csx extension and looks more like what you are looking for - however, it still requires .net libraries. More about .csx files can be found here and here
This question already has answers here:
How do I decompile a .NET EXE into readable C# source code?
(9 answers)
Closed 5 years ago.
I have an exe file which is written in .net language . I have no source code for same but I want to change some functionality in this so convert it to visual studio source code. is there any way to do this?
have a look on IL Spy-
https://www.gallery.expression.microsoft.com/8ef1d688-f80c-4380-8004-2ec7f814e7de
Also you can download it from here-
http://sourceforge.net/projects/sharpdevelop/files/ILSpy/2.0/ILSpy_Master_2.1.0.1603_RTW_Binaries.zip/download.
Just unzip the contents in a folder somewhere - no installer. Then run ILSpy.exe.
This question already has answers here:
HttpUtility does not exist in the current context
(10 answers)
Closed 5 years ago.
I'd like to use HttpUtility.HtmlDecode() to process some strings in my application, but for some reason Visual Studio doesn't seem to know where it's at.
I'm fairly new to C# so I'm just guessing I've missed something like importing a library, but I don't even know what to Google.
I've tried using System.Web but it only seems to contain AspNetHostingPermission and friends, no HttpUtility.
I'm using VS2015 Community Edition on a Windows 10 machine.
I've tried "using System.Web" but it only seems to contain "AspNetHostingPermission" and friends, no HttpUtility.
You simply need to reference the DLL System.Web, right click References > Add Reference > Assemblies > Framework > System.Web
Also check you're not targeting the Client Profile, in which System.Web.dll is not available. You can target the full framework in Project Properties.
This question already has answers here:
How do I decompile a .NET EXE into readable C# source code?
(9 answers)
Closed 7 years ago.
I have a dll file that I want to decompile. I know there are ILSpy, dotPeek and similar programs, but I have yet to find one that will actually create the cs file.
The dll I'm dealing with has several hundred classes in it and it would take days to manually copy everything.
Is there a tool that will take a dll file and return a set of cs files?
ILSpy
If you have loaded a dll in ILSpy, select File -> Save Code... or type Ctrl + S.
If you select the dll in the tree, then it will create a cs
project in a selected folder, along with C# files for each
class.
If you select just a class in the tree, it will create just
the C# file for the class.
See ILSpy.
This question already has an answer here:
How can we add embedded resources to a file which is compiled from a source file at run-time
(1 answer)
Closed 9 years ago.
I am generating C# code at runtime and compiling it with the CSharpCodeProvider The two problems I'm having are
How to add resources to the generated exe?
How to set the executable description (i.e company name and others) to it?
Thanks.
Have a look here my friend. I think this will sort you out as the guy was having the very same issue:
How can we add embedded resources to a file which is compiled from a source file at run-time