Reading Command line arguments in VB.NET

Nice clear entry at:

In Project > My Project > Publish > Options > Deployment
Uncheck “Use “.deploy” file extension

Now after publishing you will get the .exe file. If you create a shortcut to this .exe file you can add command line arguments to it as shown in the image below:

 Dim CommandLineArgs As System.Collections.ObjectModel.ReadOnlyCollection(Of String) = My.Application.CommandLineArgs


For i As Integer = 0 To CommandLineArgs.Count - 1

There maybe reasons why you may not want to uncheck this. Namely:;k(TargetFrameworkMoniker-%22.NETFRAMEWORK%2cVERSION%3dV4.0%22)&rd=true


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: