no compile with v1.0

phuclorddn

New Member
I was using VS.NET beta 2 to create my ASP.NET app, with codebehind, and compile to a library (DLL). I was never able to compile with VBC.EXE, it would fail on things like "'Response' is not declared." I never saw many docs that showed me how to compile. I wished VS.NET would show the command line it used. Anyway, I installed the new SDK (MSDN is overloaded and I can't get VS.NET release), and still tried to compile my ASP.NET app to binappname.dll from command line, but it just won't do it. I was really hoping to learn how to do this, so I wouldn't have to use VS.NET to make my apps. :(What's the command-line compilation string you're trying that's not working?Ugh, I've tried several, but here ya go... I run this in the root folder of the app:<BR><BR>vbc /out:binappname.dll /target:library /recurse:*.vb /optimize+ /debug-<BR><BR>Thanks Scott.And what errors are you getting? I would wager you need to include some assemblies like so:<BR><BR>/r:System.dll,System.Web.dll,System.Xml.dll,System. Data.dll<BR><BR>etc.<BR><BR>hthI found that out RIGHT after I submitted my response (ugh), I'm now including some assemblies, but I'm still getting errors, here is my new command line, followed by some of the errors I'm getting... I don't know what assemblies these things belong in. Most of this is just stuff we take for granted in VB6 and ASP 2 and above.<BR><BR>Command line:<BR><BR>vbc /out:C:inetpubwwwrootextranetinextranet.dll /t:library /r:System.dll,System.Web.dll,System.Security.dll,Sy stem.Data.dll,System.XML.dll,System.Web.RegularExp ressions.dll,Microsoft.Web.UI.WebControls.dll /optimize+ /imports:System,System.Web,System.Security,System.D ata,System.Xml,System.Web.RegularExpressions /recurse:*.vb<BR><BR>Errors:<BR><BR>C:InetpubwwwrootextranetClassesclasses.vb(3) : error BC30451: Name 'IsDBNull' is not declared.<BR><BR> If IsDBNull(oObj) Then<BR><BR>C:InetpubwwwrootextranetClassesclasses.vb(7) : error BC30451: Name 'Trim' is not declared.<BR><BR> blank_null = Trim(oObj)<BR><BR>C:Inetpubwwwrootextranetextranetcmdetail.aspx.vb(7 1) : error BC30451: Name'Format' is not declared.<BR><BR> lblCMDate.Text = blanknull.blank_null(Format(rd.Item("CreditMemoDate"), "MMM dd, yyyy"))<BR><BR>C:Inetpubwwwrootextranetextranetcmdetail.aspx.vb(7 8) : error BC30451: Name'FormatCurrency' is not declared.<BR><BR> lblCustTotal.Text = FormatCurrency(blanknull.blank_null(rd.Item("CustTotalAmt")), 2, TriState.True, TriState.True, TriState.False)<BR><BR>C:Inetpubwwwrootextranetextranetcmdetail.aspx.vb(7 8) : error BC30451: Name'TriState' is not declared.<BR><BR> lblCustTotal.Text = FormatCurrency(blanknull.blank_null(rd.Item("CustTotalAmt")), 2, TriState.True, TriState.True, TriState.False)<BR><BR>C:Inetpubwwwrootextranetindex.aspx.vb(72) : error BC30451: Name 'InStr' is not declared.<BR><BR> If InStr(FormsAuthentication.GetRedirectUrl(iUserID.T oString, False), "default.aspx", CompareMethod.Text) > 0 Then<BR><BR>C:Inetpubwwwrootextranetindex.aspx.vb(72) : error BC30451: Name 'CompareMethod' is not declared.<BR><BR> If InStr(FormsAuthentication.GetRedirectUrl(iUserID.T oString, False), "default.aspx", CompareMethod.Text) > 0 Then<BR><BR>well I had to rewrite some stuff (no more "INSTR()", use ".IndexOf()"; no more "format(sVar)" use sVar.Format() etc), got it to compile, but now I'm off to more problems when I submit my form... I may just rewrite my app.<BR><BR>Stack Trace<BR>==============<BR>[ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection.<BR>Parameter name: count]<BR> System.Globalization.CompareInfo.IndexOf(String source, String value, Int32 startIndex, Int32 count, CompareOptions options) +100<BR> System.String.IndexOf(String value, Int32 startIndex, Int32 count) +88<BR> index.cmdRuskinLogin_Click(Object sender, EventArgs e) +223<BR> System.Web.UI.WebControls.Button.OnClick(EventArgs e) +108<BR> System.Web.UI.WebControls.Button.System.Web.UI.IPo stBackEventHandler.RaisePostBackEvent(String eventArgument) +57<BR> System.Web.UI.Page.RaisePostBackEvent(IPostBackEve ntHandler sourceControl, String eventArgument) +18<BR> System.Web.UI.Page.RaisePostBackEvent(NameValueCol lection postData) +33<BR> System.Web.UI.Page.ProcessRequestMain() +1263<BR>==============You are using a lot of old VB syntax in there. You should consider rewriting it using the .NET Framework. For example, instead of Trim(str) you would use String.Trim(str).<BR><BR>If you want to use those old VB functions you will need to include the Microsoft.VisualBasic namespace and the associated dll<BR><BR>Look into the docs for more info. Personally I've not worked with these old functions much, (plus I use C#), so I don't know how much help I can be.
 
Back
Top