Error During compilation

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



Hello,

I m using vb.net and framework 1.1 whithout VisualStudio.
I'm trying to compile a personnal tool class in one assembly using VBC.exe .
But i get an error in compilation and i don't know why.
I think i miss a link to one assembly.


thanks for you help
fabrice


My command :
---------------------

vbc /t:library /r:system.web.dll /r:system.dll
/r:System.Data.dll /r:System.Drawing.dll exportxls.vb

The part of my .vb file :
------------------------------

'My Imports NameSpaces
imports System
imports System.Data
imports System.Web
imports System.web.UI
imports System.Web.UI.WebControls
imports System.Web.UI.HtmlControls
Imports Microsoft.VisualBasic 'compilation and code generation for Visual
Basic .NET language.


'Procedure
Public Shared Sub doExcelExport(ByVal myDataGrid As Control)

With myDataGrid
.Columns(1).Visible = False 'Suppression de la Colonne Famille
.Columns(8).Visible = False 'Suppression de la Colonne détail
.PagerStyle.Visible=False
.GridLines=GridLines.Both
.HeaderStyle.Font.Size = FontUnit.Point(12)
.HeaderStyle.BackColor = System.Drawing.Color.FromName("#FFFFFF")
.borderwidth=Unit.Parse("1")
.Borderstyle = BorderStyle.None
.AllowSorting=False
.EnableViewState = false
.AllowSorting = false
End With

.......


The error
-------------------------


exportxls.vb(25) : error BC30456: 'Columns' is not a member of
'System.Web.UI.Control'.

.Columns(1).Visible = False ~~~~~~~~

~~~~~~~~
exportxls.vb(27) : error BC30456: 'PagerStyle' is not a member of
'System.Web.UI.Control'.

.PagerStyle.Visible=False
~~~~~~~~~~~

exportxls.vb(28) : error BC30456: 'GridLines' is not a member of
'System.Web.UI.Control'.

.GridLines=GridLines.Both
~~~~~~~~~~
exportxls.vb(29) : error BC30456: 'HeaderStyle' is not a member of
'System.Web.UI.Control'.

.HeaderStyle.Font.Size = FontUnit.Point(12)
~~~~~~~~~~~~

exportxls.vb(31) : error BC30456: 'borderwidth' is not a member of
'System.Web.UI.Control'.

.borderwidth=Unit.Parse("1")
~~~~~~~~~~~~

F:\myorpub\bin\exportxls.vb(33) : error BC30456: 'AllowSorting' is not a
member of 'System.Web.UI.Control'.

.AllowSorting=False
~~~~~~~~~~~~~




.



Relevant Pages

  • Framework SP2
    ... We applied .Net framework to our dev server and now we get the compilation ... Microsoft Visual Basic .NET Compiler version 7.10.6310.4 ... Line 14: Imports Microsoft.VisualBasic ...
    (microsoft.public.dotnet.framework)
  • RE: Compile Problem: BC31011- Access is denied
    ... An error occurred during the compilation of a resource required ... > dll': Access is denied. ... > Line 14: Imports Microsoft.VisualBasic ... > Line 29: Namespace ASP ...
    (microsoft.public.dotnet.framework.aspnet)
  • Compile Problem: BC31011- Access is denied
    ... An error occurred during the compilation of a resource required ... dll': Access is denied. ... Copyright Microsoft Corporation 1987-2002. ... Line 14: Imports Microsoft.VisualBasic ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: redundant imports
    ... inclusion of modules in c is a purely preprocessing textual matter (compilation is deferred to after the fact), i guess, so that such things are possible. ... That doesn't change the fact that code-1 needs names from code-3, and just because code-3 is imported elsewhere is no reason to think that code-1 magically gets its names too. ...
    (comp.lang.python)