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
Related
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:
What are .NET Assemblies?
(13 answers)
Closed 6 years ago.
Are assemblies basically executable files? Thanks. I'm writing more because I can't bypass quality standards and it needs more words in my current problem written in.
No they are not executable files. As it is stated here:
In general, a static assembly can consist of four elements:
The assembly manifest, which contains assembly metadata.
Type metadata.
Microsoft intermediate language (MSIL) code that implements the types.
A set of resources.
Actually an assembly is loaded in the runtime environemt (CLR) and the MSIL code is compiled to native code on demand (this is called just in time compliation).
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 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
This question already has answers here:
Get the icon for a given extension
(4 answers)
Closed 7 years ago.
I want that a user can enter a filename and it shows him the "symbol" of the file.... like those ones:
I know that I could extract them out of their dlls and add them to my project, but I think there could be a solution which grabs them out of windows...
I would like to have a very simple implementation, because it'll be part of a school project and the examiners hate importing DLLs, it would be "unsafe", so , a function which is supported by C#'s default stuff would be very nice for me.
I found something that is much much much easier than importing DLLs or such higher things.
Icon.ExtractAssociatedIcon(filename);
it returns an icon, so you have to convert it to an Image:
(Image)new ImageConverter().ConvertFrom(Icon.ExtractAssociatedIcon(filename));
It even extracts icons of .exe 's, which is even more than I asked for.
I'm really happy that I can provide an easier answer. Thanks Stackoverflow ☺