Passing command-line options using Visual Studio C #

How to set command line arguments for an application that I am developing using Visual Studio is a console application. I did this on eclipse, is there a similar option in Visual Studio?

+21
c # visual-studio command-line-arguments visual-studio-2010
Jun 25 '11 at 4:45
source share
2 answers

Something must be wrong with your Visual Studio if you do not see Command Line Arguments .

enter image description here

If you cannot fix your Visual Studio, it is possible to add the StartArguments element to your .csproj.user file:

 <?xml version="1.0" encoding="utf-8"?> <Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <PropertyGroup> <PublishUrlHistory /> <InstallUrlHistory /> <SupportUrlHistory /> <UpdateUrlHistory /> <BootstrapperUrlHistory /> <ErrorReportUrlHistory /> <FallbackCulture>en-US</FallbackCulture> <VerifyUploadedFiles>false</VerifyUploadedFiles> </PropertyGroup> <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x86'"> <StartArguments>Argument1 Argument2</StartArguments> <<== THIS LINE </PropertyGroup> </Project> 
+36
Jun 25 2018-11-11T00:
source share

I would just add that the menu shown in the picture can be accessed through the Visual Studio 2010 Project menu, and then right down to your project name properties.

+2
Feb 18 '13 at 23:31
source share



All Articles