473,395 Members | 1,869 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

Compiling from vbc.exe using process class

Hi ya all,

I'v made a simple app that reads the *.vbproj file and generates a command
line that I can execute on the console to compile my app. Now I modified my
app so that by using the process class I can compile it right from the app
that makes the command line. But its not working.

I use the following code :

private void buildfromcommandline()
{
Process prc= new Process ();

if (System.IO.File.Exists(txtvbcpath.Text ))
{
prc.StartInfo.FileName=txtvbcpath.Text ;
prc.StartInfo.Arguments=txtcommandline.Text ;
prc.StartInfo.UseShellExecute= false;
prc.StartInfo.RedirectStandardOutput =true;
prc.StartInfo.RedirectStandardError=true;
/*Directory.SetCurrentDirectory(txtprojectfile.Text .Substring (0,
txtprojectfile.Text.LastIndexOf(@"\")));*/
prc.Start();

txtcommandline.Text =prc.StandardOutput.ReadToEnd();

}
else
MessageBox.Show ("Please locate and set the correct path to your
VBC.exe!","VBC.exe not found!");

}
is the code correct ?

Following is a sample command line:

C:\WINNT\Microsoft.NET\Framework\v1.1.4322\vbc.exe
"/libpath:C:\WINNT\Microsoft.NET\Framework\v1.1.4322 " /rootnamespace:winapp1
/r:System.dll,System.Data.dll,System.Drawing.dll,Sy stem.Windows.Forms.dll,Sy
stem.Xml.dll,..\mydlls\bin\mydlls.dll /target:exe
/imports:Microsoft.VisualBasic,System,System.Collec tions,System.Data,System.
Drawing,System.Diagnostics,System.Windows.Forms /out:c:\winapp1.exe
C:\tempvswork\winapp1\AssemblyInfo.vb C:\tempvswork\winapp1\CTasks.vb
C:\tempvswork\winapp1\Form1.vb C:\tempvswork\winapp1\myform.vb
Now I also want to set the directory such that the relative paths as
mentioned in the *.vbproj file works instead giving it the absolute file
paths as I'v done above.

Thanx.
Abubakar.

Nov 20 '05 #1
0 1985

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
by: Steven T. Hatton | last post by:
Is there anything that gives a good description of how source code is converted into a translation unit, then object code, and then linked. I'm particularly interested in understanding why putting...
3
by: Dmitri Shvetsov | last post by:
Hi All, Did somebody have a problem compiling some solution in VS2003? I get the error every time that some files are locked and are using by another process. I repeat compiling again and again...
4
by: Aaron Queenan | last post by:
When I build a C++ library to .NET using the managed C++ compiler, I get the following error message: Linking... LINK : error LNK2020: unresolved token (0A000005) _CrtDbgReport LINK : error...
5
by: Nick Gilbert | last post by:
Hi, I'm having problems using Flash Remoting with Web Services for ASP.NET and I've narrowed the problem down to csc.exe when it tries to compile the stub class. Flash Remoting...
0
by: Kirt Loki Dankmyer | last post by:
So, I download the latest "stable" tar for perl (5.8.7) and try to compile it on the Solaris 8 (SPARC) box that I administrate. I try all sorts of different switches, but I can't get it to compile....
6
by: Josefo | last post by:
Hello all. I am a newbie following the C++ tutorial in : http://www.cplusplus.com/doc/tutorial/templates.html I am unable to succesfully compile any of the examples with templates of this...
8
by: rays | last post by:
Hi, I am trying to port a C++ program which is supposed to be standards compliant. It works fine on Linux with GCC (4.x). But as I try to compile it on Windows, all hell breaks loose. I have been...
2
by: KyleUbenk | last post by:
Hello, I am attempting to compile java code from within my program. Basically I have a file in the directory with Java source code, and I want to be able to compile it from within my program. The...
6
by: JR | last post by:
The code below compiles and runs perfectly in Windows XP Pro, Using MS VS 2005. If I compile with g++ (cygwin) using the following command line: g++ -pedantic -Weffc++ -Wall -Wctor-dtor-privacy ...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.