1

I don't have MS Visual Studio installed and can't install it due to financial/legal reasons. I've inherited an executable file built with Visual Studio using C#. It isn't working as planned. I can fix the problem by changing 1 line of code. I have done so, but now I don't know how to re-build the project into an executable without Visual Studio.

I've tried running the following code from the command prompt:

>C:\Windows\Microsoft.NET\Framework\v4.0.30319\csc.exe /t:exe 
/out:exchange.exe exchange.csproj

Am I on the right track?

Edit: This question is different from this question because here I ask about building and compiling a whole project... not just a .cs file.

3
  • 1
    You should look to see if you qualify to use the Visual Studio Community edition (Free under certain conditions, and if you don't qualify then someone should be able to pay for it or deal with whatever legal problems...) Commented Nov 23, 2015 at 15:06
  • 1
    Possible duplicate of Compiling/Executing a C# Source File in Command Prompt Commented Nov 23, 2015 at 15:07
  • Crash - I work for a large corporation and our legal department believes that use of the free version could violate Microsoft's usage agreement, so I've been instructed not to install any Visual Studio software since I will not be a regular user. Sinatr - I tried the solution from that post, but it did not work for me. The solution from Iris below worked great. Commented Nov 23, 2015 at 16:09

2 Answers 2

2

I would suggest installing Visual Studio Community edition (free)

But, if you just want to build using msbuild through the commandline the simplest way would be (assuming you navigated to where msbuild is or have the env path set):

msbuild "C:\Users\Something\Documents\Visual Studio 2015\Blah path\Hello.csproj"

Building (then running) a simple console app that prints hello with the above:

enter image description here

Sign up to request clarification or add additional context in comments.

2 Comments

This worked perfect! Thank you for answering my question!
No problem, glad it helped :)
1

You can use MonoDevelop for compiling your C# project.

1 Comment

Thanks for responding, but due to my user privileges I cannot install software like this. This may work for others though.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.