473,659 Members | 2,886 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.res x,frmMain.resou rces
/res:frmAbout.re sx,frmAbout.res ources /r:System.dll /r:System.Drawin g.dll
/r:System.Window s.Forms /imports:System /imports:System. Windows.Forms
/imports:Microso ft.VisualBasic /main:frmMain /out:myapp.exe
When I run myapp.exe it throws an exception and says that:

Unhandled Exception: System.Argument Exception: Stream is not a valid
resource fi
le.
at System.Resource s.ResourceReade r.ReadResources ()
at System.Resource s.ResourceReade r..ctor(Stream stream, Hashtable table)
at System.Resource s.RuntimeResour ceSet..ctor(Str eam stream)
at System.Resource s.ResourceManag er.CreateResour ceSet(Stream store)
at System.Resource s.ResourceManag er.InternalGetR esourceSet(Cult ureInfo
cultur
e, Boolean createIfNotExis ts, Boolean tryParents)
at System.Resource s.ResourceManag er.InternalGetR esourceSet(Cult ureInfo
cultur
e, Boolean createIfNotExis ts, Boolean tryParents)
at System.Resource s.ResourceManag er.InternalGetR esourceSet(Cult ureInfo
cultur
e, Boolean createIfNotExis ts, Boolean tryParents)
at System.Resource s.ResourceManag er.GetObject(St ring name, CultureInfo
cultur
e)
at System.Resource s.ResourceManag er.GetObject(St ring name)
at frmMain.Initial izeComponent()
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 1600
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******** ********@TK2MSF TNGP09.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.res x,frmMain.resou rces
/res:frmAbout.re sx,frmAbout.res ources /r:System.dll /r:System.Drawin g.dll
/r:System.Window s.Forms /imports:System /imports:System. Windows.Forms
/imports:Microso ft.VisualBasic /main:frmMain /out:myapp.exe
When I run myapp.exe it throws an exception and says that:

Unhandled Exception: System.Argument Exception: Stream is not a valid
resource fi
le.
at System.Resource s.ResourceReade r.ReadResources ()
at System.Resource s.ResourceReade r..ctor(Stream stream, Hashtable table)
at System.Resource s.RuntimeResour ceSet..ctor(Str eam stream)
at System.Resource s.ResourceManag er.CreateResour ceSet(Stream store)
at System.Resource s.ResourceManag er.InternalGetR esourceSet(Cult ureInfo
cultur
e, Boolean createIfNotExis ts, Boolean tryParents)
at System.Resource s.ResourceManag er.InternalGetR esourceSet(Cult ureInfo
cultur
e, Boolean createIfNotExis ts, Boolean tryParents)
at System.Resource s.ResourceManag er.InternalGetR esourceSet(Cult ureInfo
cultur
e, Boolean createIfNotExis ts, Boolean tryParents)
at System.Resource s.ResourceManag er.GetObject(St ring name, CultureInfo
cultur
e)
at System.Resource s.ResourceManag er.GetObject(St ring name)
at frmMain.Initial izeComponent()
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***@bellsout h.net> wrote in message
news:OA******** ******@tk2msftn gp13.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******** ********@TK2MSF TNGP09.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.res x,frmMain.resou rces
/res:frmAbout.re sx,frmAbout.res ources /r:System.dll /r:System.Drawin g.dll /r:System.Window s.Forms /imports:System /imports:System. Windows.Forms
/imports:Microso ft.VisualBasic /main:frmMain /out:myapp.exe
When I run myapp.exe it throws an exception and says that:

Unhandled Exception: System.Argument Exception: Stream is not a valid
resource fi
le.
at System.Resource s.ResourceReade r.ReadResources ()
at System.Resource s.ResourceReade r..ctor(Stream stream, Hashtable table) at System.Resource s.RuntimeResour ceSet..ctor(Str eam stream)
at System.Resource s.ResourceManag er.CreateResour ceSet(Stream store)
at System.Resource s.ResourceManag er.InternalGetR esourceSet(Cult ureInfo
cultur
e, Boolean createIfNotExis ts, Boolean tryParents)
at System.Resource s.ResourceManag er.InternalGetR esourceSet(Cult ureInfo
cultur
e, Boolean createIfNotExis ts, Boolean tryParents)
at System.Resource s.ResourceManag er.InternalGetR esourceSet(Cult ureInfo
cultur
e, Boolean createIfNotExis ts, Boolean tryParents)
at System.Resource s.ResourceManag er.GetObject(St ring name, CultureInfo
cultur
e)
at System.Resource s.ResourceManag er.GetObject(St ring name)
at frmMain.Initial izeComponent()
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.publi c.dotnet.langua ges.vb
NNTP-Posting-Host: adsl-187-41.cytanet.com. cy 213.149.187.41
Path: cpmsftngxa10.ph x.gbl!TK2MSFTNG XA01.phx.gbl!TK 2MSFTNGP08.phx. gbl!TK2MSFTNGP0 9
.phx.gblXref: cpmsftngxa10.ph x.gbl microsoft.publi c.dotnet.langua ges.vb:206624
X-Tomcat-NG: microsoft.publi c.dotnet.langua ges.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.res x,frmMain.resou rces
/res:frmAbout.re sx,frmAbout.res ources /r:System.dll /r:System.Drawin g.dll
/r:System.Window s.Forms /imports:System /imports:System. Windows.Forms
/imports:Microso ft.VisualBasic /main:frmMain /out:myapp.exe
When I run myapp.exe it throws an exception and says that:

Unhandled Exception: System.Argument Exception: Stream is not a valid
resource fi
le.
at System.Resource s.ResourceReade r.ReadResources ()
at System.Resource s.ResourceReade r..ctor(Stream stream, Hashtable table)
at System.Resource s.RuntimeResour ceSet..ctor(Str eam stream)
at System.Resource s.ResourceManag er.CreateResour ceSet(Stream store)
at System.Resource s.ResourceManag er.InternalGetR esourceSet(Cult ureInfo
cultur
e, Boolean createIfNotExis ts, Boolean tryParents)
at System.Resource s.ResourceManag er.InternalGetR esourceSet(Cult ureInfo
cultur
e, Boolean createIfNotExis ts, Boolean tryParents)
at System.Resource s.ResourceManag er.InternalGetR esourceSet(Cult ureInfo
cultur
e, Boolean createIfNotExis ts, Boolean tryParents)
at System.Resource s.ResourceManag er.GetObject(St ring name, CultureInfo
cultur
e)
at System.Resource s.ResourceManag er.GetObject(St ring name)
at frmMain.Initial izeComponent()
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***@bellsout h.net> wrote in message
news:OA******** ******@tk2msftn gp13.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******** ********@TK2MSF TNGP09.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.res x,frmMain.resou rces
/res:frmAbout.re sx,frmAbout.res ources /r:System.dll /r:System.Drawin g.dll /r:System.Window s.Forms /imports:System /imports:System. Windows.Forms
/imports:Microso ft.VisualBasic /main:frmMain /out:myapp.exe
When I run myapp.exe it throws an exception and says that:

Unhandled Exception: System.Argument Exception: Stream is not a valid
resource fi
le.
at System.Resource s.ResourceReade r.ReadResources ()
at System.Resource s.ResourceReade r..ctor(Stream stream, Hashtable table) at System.Resource s.RuntimeResour ceSet..ctor(Str eam stream)
at System.Resource s.ResourceManag er.CreateResour ceSet(Stream store)
at System.Resource s.ResourceManag er.InternalGetR esourceSet(Cult ureInfo
cultur
e, Boolean createIfNotExis ts, Boolean tryParents)
at System.Resource s.ResourceManag er.InternalGetR esourceSet(Cult ureInfo
cultur
e, Boolean createIfNotExis ts, Boolean tryParents)
at System.Resource s.ResourceManag er.InternalGetR esourceSet(Cult ureInfo
cultur
e, Boolean createIfNotExis ts, Boolean tryParents)
at System.Resource s.ResourceManag er.GetObject(St ring name, CultureInfo
cultur
e)
at System.Resource s.ResourceManag er.GetObject(St ring name)
at frmMain.Initial izeComponent()
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
2062
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 Unfortunately the binary for Python-2.4 isn't available yet and I'd hate to step back to a previous version. I'm glad I managed to set up my XP machine to being able to compile extensions using the VC++ toolkit which freely availbale from MS. See
5
3625
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 installed under this directory C:\Program Files\Intel\CPP\Compiler80\Ia32\Bin Any ideas what I do wrong? I try this: run the iclvars.bat batch file.
0
1705
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 with Python 2.4.1 on Solaris 2.8. Can anyone help? Thank you. -> python setup.py build creating /home/kzvbq3/linkchecker-3.2/_linkchecker_configdata.py running build running build_py
0
1193
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 TOTAL_SUM, M1PN FROM FRNDTA021/M1P M1P WHERE M1LOT# = '' GROUP BY M1PN
1
1832
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 to compile the 6.0 version with /clr to IL code....That was succesful ... I made clean build ! But the application didn't run. When I profiled the application execustion i saw that the managed version is 2 times slower that unmanaged version. This...
1
1921
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 _IID_IFileSinkFilter cvision error LNK2001: unresolved external symbol _IID_ICreateDevEnu cvision error LNK2001: unresolved external symbol _IID_IBaseFilte cvision error LNK2001: unresolved external symbol _IID_IAMVideoProcAm
12
3466
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 projects for Lua 5.0.2 and LuaBind beta-6, compiling both with no CLR support and configured to use the Multithreaded DLL runtime. Then I created a new console application which makes use of these two static libraries (of course, also set to MT...
0
2267
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 say this will work for anyone else, but it worked for me... Using: http://ftp.mozilla.org/pub/mozilla.org/js/js-1.5.tar.gz First up:
11
2563
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 install Password: running install
9
1578
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 the main.c file like the following, ..... void myfun(...) {
0
8427
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8746
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8525
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8627
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7356
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6179
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4175
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 last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
2750
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
1737
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 can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.