Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking for code must demonstrate a minimal understanding of the problem being solved. Include attempted solutions, why they didn't work, and the expected results. See also: Stack Overflow question checklist
Closed 9 years ago.
Improve this question
Is there a way to create and build an .exe from C#? (Editor's Note: Basically a .NET app that can create and compile other .NET apps - see accepted answer)
I am NOT talking about getting the .exe of my project (which is the only exe building I could find on google), I am talking about generating .exe files from within my program.
How would I create a runnable .exe file from C#? I have no idea how and on google I only find questions on where to find the .exe of the Project, while I want the project to build .exe's itself.
The simplest way to do it without using external compilers is called CodeDOM, the relevant class you would use is called CSharpCodeProvider. There there are many tutorials on the internet (including one in the first link I gave) that will show you how to use it, the topic is too broad to explain in depth here.
Related
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question appears to be off-topic because it lacks sufficient information to diagnose the problem. Describe your problem in more detail or include a minimal example in the question itself.
Closed 8 years ago.
Improve this question
I want to use .Net Reflector to reverse engineering a windows application. All I have is the setup.exe and an .application file under the app.publish folder. When use .Net reflector, it doesn't work with setup.exe. Am I able to see the codes or it is not possible? Any other options? Thank you for replying.
The setup.exe is not a .NET application. You need to install the application and then open the installed .exe with reflector.
Another option is dotpeek from jetbrains.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Closed 9 years ago.
Questions asking for code must demonstrate a minimal understanding of the problem being solved. Include attempted solutions, why they didn't work, and the expected results. See also: Stack Overflow question checklist
Questions concerning problems with code you've written must describe the specific problem — and include valid code to reproduce it — in the question itself. See SSCCE.org for guidance.
Improve this question
i am writing a program in C# which generates a text file containing the information of a Graph, i like to find its K-Cores,
i have found a C++ library to do that, but i don't know how to use it.
the name of the library is Kcore.h and i put it in the same folder of my project.
but how to pass my text file to it and call it's KCore function?
KCore.h is one of the libraries of SNAP project which can be accessed at http://snap.stanford.edu/snap/
Thank you for your help
kcore.h is just a header file. You will need to build the library as a dll first then use the C# external dll import feature to use the routines. The link you have given, doesn't provide libraries: you will need to create a solution to build it: look at the makefile for help.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions concerning problems with code you've written must describe the specific problem — and include valid code to reproduce it — in the question itself. See SSCCE.org for guidance.
Closed 9 years ago.
Improve this question
I am trying to set up and run the YouTube Data API (.NET) code samples (my_uploads class, in particular) in the Visual Studio 2010, however, I am constantly facing errors.
Apparently, the code itself already contains such mistakes like misspelled references, e.g., using Google.Apis.Youtube.v3; (should be YouTube not Youtube) and outdated methods like Fetch() (alternative is Execute()).
It is also missing lots of libraries even though I followed the getting started guides very closely:
https://code.google.com/p/google-api-dotnet-client/wiki/GettingStarted
https://developers.google.com/api-client-library/dotnet/apis/youtube/v3
Nevertheless, the main problem I am facing is related to authentication and authorisation (I think) and I do not know how to fix it.
Every time I try to run the console application and enter the right credentials, it throws me an error: Precondition failed.: !string.IsNullOrEmpty(authorization.RefreshToken).
Thanks.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Closed 9 years ago.
Questions asking for code must demonstrate a minimal understanding of the problem being solved. Include attempted solutions, why they didn't work, and the expected results. See also: Stack Overflow question checklist
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Improve this question
I need to send my C# app in an email for a job interview exercise. It says to save the exercise as a zip file and email it. I would have thought they wanted to see the code, but just looking now, it looks like the only way to do this is to zip the .exe file and send it. The code will not be visible to them? Any way to show the code? Add my .cs file to the email?
Why don't you just zip the whole project directory? That will include your code files and your compiled .exe file. It will also include the solution or project from Visual Studio so they can open it on their end.
You may still need to change the extension of you executable file to something like .exe1 before zipping, otherwise the email service might not let it through.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Closed 9 years ago.
Questions concerning problems with code you've written must describe the specific problem — and include valid code to reproduce it — in the question itself. See SSCCE.org for guidance.
Questions asking for code must demonstrate a minimal understanding of the problem being solved. Include attempted solutions, why they didn't work, and the expected results. See also: Stack Overflow question checklist
Improve this question
I am very new to .net, Is there way to keep logic files are separated and reuse in cs files?
Create a C# Class Library Project and add its reference to your project.
Aman Khan, Create new dir App_Code keep your logic file there and use to your project as shown in below image
and you call define
using System
using CMS
You can reuse the files.Place all the logic files in seperate folders like App_Code and just copy the code and use it.
Happy coding :)