Click here to Skip to main content
15,885,365 members
Please Sign up or sign in to vote.
3.75/5 (4 votes)
See more:
Is it possible to compile

C# Solution using command prompt ?

csc.exe <filename.cs> will compile cs file.

I am asking to compile complete solution


Thanks
:)
Posted

You can use MSBUILD[^]?

msbuild MySolution.sln /t:Rebuild /p:Configuration=Release /p:Platform="any cpu"
 
Share this answer
 
Comments
Khaniya 30-Nov-10 6:53am    
hey
Thanks for your answer
How can execute above from .Net application?
Member 10721677 8-Feb-18 2:14am    
this perfectly worked for me to compile the simple visual studio solution and its project.
Thank you for your question. You can use like bellow,

C#
devenv /build ConfigName [/project ProjName] [/projectconfig ConfigName] SolutionName


Ref:http://www.c-sharpcorner.com/UploadFile/tharakram/BuildDotNetSolution11162005052301AM/BuildDotNetSolution.aspx[^]


Thanks,
Mamun
 
Share this answer
 
Here is Google Search Link for you
compile .net spulution from command prompt[^]
 
Share this answer
 
C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\MSBuild.exe "C:\Documents and Settings\anyuser\Desktop\WpfChangeTheme\WpfChangeTheme.sln"

this may helps...

for reference
http://social.msdn.microsoft.com/Forums/en/tfsbuild/thread/723d289f-f9b6-44d5-8892-42db46201128[^]

for putting some switches please refer
http://msdn.microsoft.com/en-us/library/ms164311.aspx[^]
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900