473,507 Members | 6,459 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Compiling the VB samples from the command-line

I do not have Visual Basic .NET Standard or higher but I have downloaded the
..NET SDK and the 101 VB.NET samples from the MSDN website. I am sure that
there must be a way to compile and successfully run these 101 samples from
the command-line but even though I tried hard there are problems with the
resources .resx files.
Eg. I tried using the following command to compile one of the 101 samples:
vbc *.vb /res:frmMain.resx,frmMain.resources
/res:frmAbout.resx,frmAbout.resources /r:System.dll /r:System.Drawing.dll
/r:System.Windows.Forms /imports:System /imports:System.Windows.Forms
/imports:Microsoft.VisualBasic /main:frmMain /out:myapp.exe
When I run myapp.exe it throws an exception and says that:

Unhandled Exception: System.ArgumentException: Stream is not a valid
resource fi
le.
at System.Resources.ResourceReader.ReadResources()
at System.Resources.ResourceReader..ctor(Stream stream, Hashtable table)
at System.Resources.RuntimeResourceSet..ctor(Stream stream)
at System.Resources.ResourceManager.CreateResourceSet (Stream store)
at System.Resources.ResourceManager.InternalGetResour ceSet(CultureInfo
cultur
e, Boolean createIfNotExists, Boolean tryParents)
at System.Resources.ResourceManager.InternalGetResour ceSet(CultureInfo
cultur
e, Boolean createIfNotExists, Boolean tryParents)
at System.Resources.ResourceManager.InternalGetResour ceSet(CultureInfo
cultur
e, Boolean createIfNotExists, Boolean tryParents)
at System.Resources.ResourceManager.GetObject(String name, CultureInfo
cultur
e)
at System.Resources.ResourceManager.GetObject(String name)
at frmMain.InitializeComponent()
at frmMain..ctor()
at frmMain.Main()

There must be a problem with the way that resources files .resx are
interpreted by the application. What am I doing wrong?
Thanks,
N. P.
Nov 20 '05 #1
4 1597
Hi,

If you review 5 of the vb at movies episodes you will get a free
copy of vb.net.
http://msdn.microsoft.com/vbasic/atthemovies/

Ken
----------------------
"N. P." <Not available> wrote in message
news:u7****************@TK2MSFTNGP09.phx.gbl...
I do not have Visual Basic .NET Standard or higher but I have downloaded
the
.NET SDK and the 101 VB.NET samples from the MSDN website. I am sure that
there must be a way to compile and successfully run these 101 samples from
the command-line but even though I tried hard there are problems with the
resources .resx files.
Eg. I tried using the following command to compile one of the 101 samples:
vbc *.vb /res:frmMain.resx,frmMain.resources
/res:frmAbout.resx,frmAbout.resources /r:System.dll /r:System.Drawing.dll
/r:System.Windows.Forms /imports:System /imports:System.Windows.Forms
/imports:Microsoft.VisualBasic /main:frmMain /out:myapp.exe
When I run myapp.exe it throws an exception and says that:

Unhandled Exception: System.ArgumentException: Stream is not a valid
resource fi
le.
at System.Resources.ResourceReader.ReadResources()
at System.Resources.ResourceReader..ctor(Stream stream, Hashtable table)
at System.Resources.RuntimeResourceSet..ctor(Stream stream)
at System.Resources.ResourceManager.CreateResourceSet (Stream store)
at System.Resources.ResourceManager.InternalGetResour ceSet(CultureInfo
cultur
e, Boolean createIfNotExists, Boolean tryParents)
at System.Resources.ResourceManager.InternalGetResour ceSet(CultureInfo
cultur
e, Boolean createIfNotExists, Boolean tryParents)
at System.Resources.ResourceManager.InternalGetResour ceSet(CultureInfo
cultur
e, Boolean createIfNotExists, Boolean tryParents)
at System.Resources.ResourceManager.GetObject(String name, CultureInfo
cultur
e)
at System.Resources.ResourceManager.GetObject(String name)
at frmMain.InitializeComponent()
at frmMain..ctor()
at frmMain.Main()

There must be a problem with the way that resources files .resx are
interpreted by the application. What am I doing wrong?
Thanks,
N. P.

Nov 20 '05 #2
No. It's only for USA and Canada, no other countries.
"Ken Tucker [MVP]" <vb***@bellsouth.net> wrote in message
news:OA**************@tk2msftngp13.phx.gbl...
Hi,

If you review 5 of the vb at movies episodes you will get a free
copy of vb.net.
http://msdn.microsoft.com/vbasic/atthemovies/

Ken
----------------------
"N. P." <Not available> wrote in message
news:u7****************@TK2MSFTNGP09.phx.gbl...
I do not have Visual Basic .NET Standard or higher but I have downloaded
the
.NET SDK and the 101 VB.NET samples from the MSDN website. I am sure that there must be a way to compile and successfully run these 101 samples from the command-line but even though I tried hard there are problems with the resources .resx files.
Eg. I tried using the following command to compile one of the 101 samples: vbc *.vb /res:frmMain.resx,frmMain.resources
/res:frmAbout.resx,frmAbout.resources /r:System.dll /r:System.Drawing.dll /r:System.Windows.Forms /imports:System /imports:System.Windows.Forms
/imports:Microsoft.VisualBasic /main:frmMain /out:myapp.exe
When I run myapp.exe it throws an exception and says that:

Unhandled Exception: System.ArgumentException: Stream is not a valid
resource fi
le.
at System.Resources.ResourceReader.ReadResources()
at System.Resources.ResourceReader..ctor(Stream stream, Hashtable table) at System.Resources.RuntimeResourceSet..ctor(Stream stream)
at System.Resources.ResourceManager.CreateResourceSet (Stream store)
at System.Resources.ResourceManager.InternalGetResour ceSet(CultureInfo
cultur
e, Boolean createIfNotExists, Boolean tryParents)
at System.Resources.ResourceManager.InternalGetResour ceSet(CultureInfo
cultur
e, Boolean createIfNotExists, Boolean tryParents)
at System.Resources.ResourceManager.InternalGetResour ceSet(CultureInfo
cultur
e, Boolean createIfNotExists, Boolean tryParents)
at System.Resources.ResourceManager.GetObject(String name, CultureInfo
cultur
e)
at System.Resources.ResourceManager.GetObject(String name)
at frmMain.InitializeComponent()
at frmMain..ctor()
at frmMain.Main()

There must be a problem with the way that resources files .resx are
interpreted by the application. What am I doing wrong?
Thanks,
N. P.


Nov 20 '05 #3
I'm really not an expert on this, but it seems to me that you're using the
/res switch with both the .resx and the compiled version of the resource
file - you may want to try to specify just one or the other, not both.

Also, and again I'm not sure if this would affect your issue, but shouldn't
you compile your code with /t:winexe?

Hope that helps,
Alex

--------------------
From: "N. P." <Not available>
Subject: Compiling the VB samples from the command-line
Date: Tue, 1 Jun 2004 13:02:31 +0300
Lines: 42
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1409
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1409
Message-ID: <u7**************@TK2MSFTNGP09.phx.gbl>
Newsgroups: microsoft.public.dotnet.languages.vb
NNTP-Posting-Host: adsl-187-41.cytanet.com.cy 213.149.187.41
Path: cpmsftngxa10.phx.gbl!TK2MSFTNGXA01.phx.gbl!TK2MSFT NGP08.phx.gbl!TK2MSFTNGP09
.phx.gblXref: cpmsftngxa10.phx.gbl microsoft.public.dotnet.languages.vb:206624
X-Tomcat-NG: microsoft.public.dotnet.languages.vb

I do not have Visual Basic .NET Standard or higher but I have downloaded the.NET SDK and the 101 VB.NET samples from the MSDN website. I am sure that
there must be a way to compile and successfully run these 101 samples from
the command-line but even though I tried hard there are problems with the
resources .resx files.
Eg. I tried using the following command to compile one of the 101 samples:
vbc *.vb /res:frmMain.resx,frmMain.resources
/res:frmAbout.resx,frmAbout.resources /r:System.dll /r:System.Drawing.dll
/r:System.Windows.Forms /imports:System /imports:System.Windows.Forms
/imports:Microsoft.VisualBasic /main:frmMain /out:myapp.exe
When I run myapp.exe it throws an exception and says that:

Unhandled Exception: System.ArgumentException: Stream is not a valid
resource fi
le.
at System.Resources.ResourceReader.ReadResources()
at System.Resources.ResourceReader..ctor(Stream stream, Hashtable table)
at System.Resources.RuntimeResourceSet..ctor(Stream stream)
at System.Resources.ResourceManager.CreateResourceSet (Stream store)
at System.Resources.ResourceManager.InternalGetResour ceSet(CultureInfo
cultur
e, Boolean createIfNotExists, Boolean tryParents)
at System.Resources.ResourceManager.InternalGetResour ceSet(CultureInfo
cultur
e, Boolean createIfNotExists, Boolean tryParents)
at System.Resources.ResourceManager.InternalGetResour ceSet(CultureInfo
cultur
e, Boolean createIfNotExists, Boolean tryParents)
at System.Resources.ResourceManager.GetObject(String name, CultureInfo
cultur
e)
at System.Resources.ResourceManager.GetObject(String name)
at frmMain.InitializeComponent()
at frmMain..ctor()
at frmMain.Main()

There must be a problem with the way that resources files .resx are
interpreted by the application. What am I doing wrong?
Thanks,
N. P.


Nov 20 '05 #4

"Ken Tucker [MVP]" <vb***@bellsouth.net> wrote in message
news:OA**************@tk2msftngp13.phx.gbl...
Hi,

If you review 5 of the vb at movies episodes you will get a free
copy of vb.net.
http://msdn.microsoft.com/vbasic/atthemovies/
Ken
I did it. Not only did I get VB .NET, I got the Visual Studio and the MSDN.
Boy was I surprised and happy, until I tried to run it. I've been trying to
run a simple one-line program with no luck. See my post in this group
titled, "Re: very new to .NET". I'm not sure, but I think the offer is
over.

HankG
----------------------
"N. P." <Not available> wrote in message
news:u7****************@TK2MSFTNGP09.phx.gbl...
I do not have Visual Basic .NET Standard or higher but I have downloaded
the
.NET SDK and the 101 VB.NET samples from the MSDN website. I am sure that there must be a way to compile and successfully run these 101 samples from the command-line but even though I tried hard there are problems with the resources .resx files.
Eg. I tried using the following command to compile one of the 101 samples: vbc *.vb /res:frmMain.resx,frmMain.resources
/res:frmAbout.resx,frmAbout.resources /r:System.dll /r:System.Drawing.dll /r:System.Windows.Forms /imports:System /imports:System.Windows.Forms
/imports:Microsoft.VisualBasic /main:frmMain /out:myapp.exe
When I run myapp.exe it throws an exception and says that:

Unhandled Exception: System.ArgumentException: Stream is not a valid
resource fi
le.
at System.Resources.ResourceReader.ReadResources()
at System.Resources.ResourceReader..ctor(Stream stream, Hashtable table) at System.Resources.RuntimeResourceSet..ctor(Stream stream)
at System.Resources.ResourceManager.CreateResourceSet (Stream store)
at System.Resources.ResourceManager.InternalGetResour ceSet(CultureInfo
cultur
e, Boolean createIfNotExists, Boolean tryParents)
at System.Resources.ResourceManager.InternalGetResour ceSet(CultureInfo
cultur
e, Boolean createIfNotExists, Boolean tryParents)
at System.Resources.ResourceManager.InternalGetResour ceSet(CultureInfo
cultur
e, Boolean createIfNotExists, Boolean tryParents)
at System.Resources.ResourceManager.GetObject(String name, CultureInfo
cultur
e)
at System.Resources.ResourceManager.GetObject(String name)
at frmMain.InitializeComponent()
at frmMain..ctor()
at frmMain.Main()

There must be a problem with the way that resources files .resx are
interpreted by the application. What am I doing wrong?
Thanks,
N. P.


---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.693 / Virus Database: 454 - Release Date: 5/31/2004
Nov 20 '05 #5

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

Similar topics

0
2049
by: Martin Bless | last post by:
I need to access a MSSQL database (MS-Sql, not MySQL!)and would very much like to use mssql-0.09.tar.gz which is available from http://www.object-craft.com.au/projects/mssql/download.html ...
5
3612
by: Lars Schouw | last post by:
I have downloaded the newest boos release. I am havng problems building boost using the intel C++ 8.0 compiler. It looks as if bjam can't fine the icl.exe compiler executable itself. This file is...
0
1699
by: mmarkzon | last post by:
I have been struggling compiling linkchecker from http://linkchecker.sourceforge.net/. The last thing I get is "error: command 'gcc' failed with exit status 1" which is not very helpful. This is...
0
1187
by: lread | last post by:
This is a simplistic test table I am trying to create. The syntax is directly based up on the sample code from the BI Redbook: CREATE TABLE CUSDTA021/MQT_DB AS ( SELECT SUM(ML1OQ) AS...
1
1819
by: Omid Hodjati | last post by:
Hi All, I have an old unmanaged code written in C++ 6.0. This is a time critcal, CPU bound application. I have deciede migrate this application to managed world and VC++ 7.0. The first step was...
1
1906
by: endo55 | last post by:
Hi I've got the following errors when trying to compile a program cvision error LNK2001: unresolved external symbol _IID_IGraphBuilde cvision error LNK2001: unresolved external symbo...
12
3447
by: Markus Ewald | last post by:
I'm just experimenting around with the VisualC++ 2005 Express Edition Beta and found some strange behavior for which I can't seem to find a workaround. What I've done is set up two static library...
0
2261
by: follower | last post by:
This post is mostly Google-bait for anyone else that might want to compile SpiderMonkey ( libjs / libjs.so / libjs.dylib ) for OS X (10.4.5 in my case) and then use it with Python's ctypes. I can't...
11
2542
by: ZMY | last post by:
Dear all, I am a real newbie for both python and QNX, but I am still trying to compile Numeric-24.2 under QNX4.25 with python 2.2. I got following error message: $ sudo python setup.py...
9
1574
by: bowlderyu | last post by:
Hello, all. I meet a question about compiling files. Eg., I have three files named myfile.h, myfile.c and the main.c file, and there is a function, ex, void myfun(...). If I put myfun(...) in...
0
7223
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7110
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
7372
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
5623
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
5041
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4702
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3191
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
1
758
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
411
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.