By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
446,280 Members | 2,296 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 446,280 IT Pros & Developers. It's quick & easy.

Compiling the VB samples from the command-line

P: n/a
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
Share this Question
Share on Google+
4 Replies


P: n/a
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

P: n/a
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

P: n/a
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

P: n/a

"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 discussion thread is closed

Replies have been disabled for this discussion.