|
-
Mar 2nd, 2012, 10:17 AM
#1
Thread Starter
Lively Member
in VS 2008, can I execute a non-project file?
HI -- I have vs 2008. I have a VB project with lots of stuff. I want to do a little program to test out some ideas. I also, separately, want to execute a little .cmd script.
What I would like, is a way to execute my little test program, or the little .cmd script directly from within VS, bypassing the debug information set up for the project.
Is this possible? If so, how? If not, are there good workarounds?
-
Mar 2nd, 2012, 10:31 AM
#2
Re: in VS 2008, can I execute a non-project file?
You can use process.start(.....) for that
-
Mar 2nd, 2012, 10:46 AM
#3
Thread Starter
Lively Member
Re: in VS 2008, can I execute a non-project file?
OK -- please excuse my noobie questions! Could you elaborate a little? e.g. I'm sitting looking at my vs session. The file I'm editing is a cmd file with some typical command line commands. I would like to tell vs, "Run this file in the directory where it lives, please" (or any other directory for that matter.)
I think I need step-by-step instructions.
-
Mar 2nd, 2012, 11:01 AM
#4
Re: in VS 2008, can I execute a non-project file?
No hard feelings, but you don't need step-by-step instructions to Google.
If you'd search for "process.start vb.net" you will find something like:
system.diagnostic.process.start("yourfile.txt")
Its really not that hard, but you need to work for your questions instead of simply asking and waiting for a complete answer. Means that people will ask you what you already have (in code). Only if you're totally stuck some people will help you completely.
-
Mar 2nd, 2012, 11:06 AM
#5
Thread Starter
Lively Member
Re: in VS 2008, can I execute a non-project file?
Yes, I found that. What I don't get is how to get that line to actually execute on its own. e.g. If I just hit F5, VS starts running according to the instructions in the project file and the little dropdown menu with "Release" and "Debug" in it. However, I want VS to ignore those instructions and just run what I'm looking at. That's the piece I seem to be missing.
Sort of an ad-hoc run this stuff now and only this.
-
Mar 2nd, 2012, 05:56 PM
#6
Re: in VS 2008, can I execute a non-project file?
I keep a test project around for times like that. If I wanted to deal with one code page, I'd open the testApp, and use the Project|Add Exisiting Item to add that page into the TestApp, then add a call to whatever method I wanted to test as the click event of a button on one of the TestApp forms.
My usual boring signature: Nothing
 
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|