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.
..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.
Comment