Compile errors

Aug 22, 2014 at 7:04 PM
Sorry, do not speak English so use google translator.

I modified the web.config file as follows:

<system.codedom>
<compilers>
  <compiler language="c#;cs;csharp" extension=".cs"
    compilerOptions="/docpath:&quot;C:\Aplicaciones\ASPNET2010\Sygnus\Documentation\apmadu&quot;"
    type="EWSoftware.CodeDom.CSharpCodeProviderWithDocs, EWSoftware.CodeDom, Version=1.1.0.0, Culture=neutral, PublicKeyToken=d633d7d5b41cbb65">
    <providerOption name="CompilerVersion" value="v4.0"/>
  </compiler>
  <compiler language="vb;vbs;visualbasic;vbscript" extension=".vb"
    compilerOptions="/docpath:&quot;C:\Aplicaciones\ASPNET2010\Sygnus\Documentation\apmadu&quot; /imports:System /imports:System.Collections /imports:System.Collections.Specialized /imports:System.Configuration /imports:System.Data /imports:System.Text /imports:System.Text.RegularExpressions /imports:System.Web /imports:System.Web.Caching /imports:System.Web.SessionState /imports:System.Web.Security /imports:System.Web.Profile /imports:System.Web.UI /imports:System.Web.UI.WebControls /imports:System.Web.UI.WebControls.WebParts /imports:System.Web.UI.HtmlControls /imports:System.Xml /imports:System.Xml.Linq"
    type="EWSoftware.CodeDom.VBCodeProviderWithDocs, EWSoftware.CodeDom, Version=1.1.0.0, Culture=neutral, PublicKeyToken=d633d7d5b41cbb65">
    <providerOption name="CompilerVersion" value="v4.0"/>
  </compiler>
</compilers>
</system.codedom>

Get this error when compiling:

Error 103 Expression of type 'Object' is not queryable. Make sure you are not missing an assembly reference and/or namespace import for the LINQ provider. C:\Aplicaciones\ASPNET2010\Sygnus\sygapps\apmadu\apmadu\prc\man\man_manifiestocarga.aspx.vb 997

The error line is this:

Dim lo_childList_datosgenerales As IEnumerable(Of System.Xml.Linq.XElement) = From el In linq_datosgenerales(0).Elements Select el

Please do me missing
Coordinator
Aug 22, 2014 at 7:20 PM
You probably need to add a "/imports:System.Collections.Generic" option to the VB.NET code provider options.

Eric
Aug 22, 2014 at 7:26 PM
thanks, I tried, but not working, any other ideas?
Coordinator
Aug 22, 2014 at 9:24 PM
It's probably missing an import of some sort. Check which ones are defined in the project and make sure they appear in the configuration.

Eric
Aug 22, 2014 at 10:07 PM
Eric thanks for your help

Unfortunately it does not work, I added all namespaces that are in the program in the web.config file:

<namespaces>
            <clear/>
            <add namespace="System"/>
            <add namespace="System.Collections"/>
    <add namespace="System.Collections.Generic"/>
            <add namespace="System.Collections.Specialized"/>
            <add namespace="System.Configuration"/>
            <add namespace="System.Data"/>
    <add namespace="System.Drawing"/>
    <add namespace="System.Drawing.Imaging"/>
    <add namespace="System.IO"/>
    <add namespace="System.Linq"/>
    <add namespace="System.Net"/>
    <add namespace="System.Net.NetworkInformation"/>
    <add namespace="System.Reflection"/>
    <add namespace="System.Runtime.InteropServices"/>
    <add namespace="System.Security"/>
    <add namespace="System.Security.Principal"/>
            <add namespace="System.Text"/>
            <add namespace="System.Text.RegularExpressions"/>
            <add namespace="System.Web"/>
            <add namespace="System.Web.Caching"/>
            <add namespace="System.Web.SessionState"/>
            <add namespace="System.Web.Security"/>
            <add namespace="System.Web.Profile"/>
            <add namespace="System.Web.UI"/>
            <add namespace="System.Web.UI.WebControls"/>
            <add namespace="System.Web.UI.WebControls.WebParts"/>
            <add namespace="System.Web.UI.HtmlControls"/>
    <add namespace="System.Xml"/>
    <add namespace="System.Xml.Linq"/>
    <add namespace="Microsoft.CSharp"/>
    <add namespace="Microsoft.VisualBasic.FileIO"/>
        </namespaces>
Also I added in compilerOptions section:

<system.codedom>
<compilers>
  <compiler language="c#;cs;csharp" extension=".cs"
    compilerOptions="/docpath:&quot;C:\Aplicaciones\ASPNET2010\Sygnus\Documentation\apmadu&quot;"
    type="EWSoftware.CodeDom.CSharpCodeProviderWithDocs, EWSoftware.CodeDom, Version=1.1.0.0, Culture=neutral, PublicKeyToken=d633d7d5b41cbb65">
    <providerOption name="CompilerVersion" value="v4.0"/>
  </compiler>
  <compiler language="vb;vbs;visualbasic;vbscript" extension=".vb"
    compilerOptions="/docpath:&quot;C:\Aplicaciones\ASPNET2010\Sygnus\Documentation\apmadu&quot; /imports:System /imports:System.Collections /imports:System.Collections.Generic /imports:System.Collections.Specialized /imports:System.Configuration /imports:System.Data /imports:System.Drawing /imports:System.Drawing.Imaging /imports:System.IO /imports:System.Linq /imports:System.Net /imports:System.Net.NetworkInformation /imports:System.Reflection /imports:System.Runtime.InteropServices /imports:System.Security /imports:System.Security.Principal /imports:System.Text /imports:System.Text.RegularExpressions /imports:System.Web /imports:System.Web.Caching /imports:System.Web.SessionState /imports:System.Web.Security /imports:System.Web.Profile /imports:System.Web.UI /imports:System.Web.UI.WebControls /imports:System.Web.UI.WebControls.WebParts /imports:System.Web.UI.HtmlControls /imports:System.Xml /imports:System.Xml.Linq /imports:Microsoft.CSharp /imports:Microsoft.VisualBasic.FileIO"
    type="EWSoftware.CodeDom.VBCodeProviderWithDocs, EWSoftware.CodeDom, Version=1.1.0.0, Culture=neutral, PublicKeyToken=d633d7d5b41cbb65">
    <providerOption name="CompilerVersion" value="v4.0"/>
  </compiler>
</compilers>
</system.codedom>

But showing the same error:

Error 103 Expression of type 'Object' is not queryable. Make sure you are not missing an assembly reference and/or namespace import for the LINQ provider. C:\Aplicaciones\ASPNET2010\Sygnus\sygapps\apmadu\apmadu\prc\man\man_manifiestocarga.aspx.vb 997
Coordinator
Aug 22, 2014 at 10:29 PM
Perhaps it doesn't like them listed individually. Most of the example I see use a comma separated list "/imports:System,System.Collections,System.Collections.Generic,etc". You can give that a try. Also, try adding the Imports statement to the source code file to import the appropriate namespaces explicitly. Other than that, I don't know why else it might not be working.

Eric
Marked as answer by unidadm on 8/26/2014 at 1:03 PM
Aug 22, 2014 at 11:21 PM
Eric

I commented the code fails, and another of an external assembly and it compiled properly.

Thanks for your help
Aug 26, 2014 at 8:05 PM
EWoodruff wrote:
Perhaps it doesn't like them listed individually. Most of the example I see use a comma separated list "/imports:System,System.Collections,System.Collections.Generic,etc". You can give that a try. Also, try adding the Imports statement to the source code file to import the appropriate namespaces explicitly. Other than that, I don't know why else it might not be working.

Eric
Eric

I discovered that my problem was in the declaration of a variable, and it was not necessary to comment the code. Thank you very much again.

Daniel