I built a helpdesk version of a program that would parse out certain information. Now, I am trying to automate it using the same code under a load event and I just can't get it to work. The original code was worked on by .paul. and he did a great job! The original forum is located here.
My Code:
vb.net Code:
Imports System.Text
Imports Microsoft.VisualBasic.FileIO
Imports System.Collections.ObjectModel
Public Class SecurityParser
Private Sub SecurityParser_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
' Fill textbox1 with the original DEBOUT.TXT
'
Dim DeboutTXT As String = My.Settings.DeboutLocation
Error 1 Expression of type 'System.Collections.Generic.List(Of String)' is not queryable. Make sure you are not missing an assembly reference and/or namespace import for the LINQ provider. C:\Documents and Settings\mbutler\My Documents\Visual Studio 2008\Projects\Briad Backup\Briad Backup\SecurityParser.vb 20 37 Briad Backup
I did not need to call any references for the other program and I am just wondering if I am missing something. Any help is much appreciated.
if vs says it needs a reference, it won't work without it.
some references are added as default depending on the target framework + if you compare references in the 2 projects you'll probably see the problem
I have checked all the references. I had to change the default framework from 3.0 to 3.5. I now match the other program, but the issue persists. I have attached an image.
Code:
Old References -> References from the other program
New References -> References on the new program
Last edited by mbutler755; Apr 29th, 2010 at 01:14 PM.
Reason: now; not know
Just to be sure, don't you need to Import System.LINQ in order to perform Queries on your objects ?
I saw you have System.XML.Linq in your references but... I don't know... I always import it to be sure.
Alex
.NET developer "No. Not even in the face of Armageddon. Never compromise." (Walter Kovacs/Rorschach)
Things to consider before posting. Don't forget to rate the posts if they helped and mark thread as resolved when they are.
Just to be sure, don't you need to Import System.LINQ in order to perform Queries on your objects ?
I saw you have System.XML.Linq in your references but... I don't know... I always import it to be sure.
I do not have a System.LINQ reference available. It goes straight from System.IO.Log to System.Management. Why would the other program work without this reference if it were required?
Last edited by mbutler755; Apr 30th, 2010 at 08:22 AM.
Reason: add more text
Edit : Took me too long to write my answer, you already solved your problem !
As techgnome said :
Originally Posted by techgnome
LINQ is part of the 3.5FW... so it won't work against the 3.0FW.
-tg
Are you sure you are using Framework 3.5 ?
1- to check select Project menu
2- at the bottom should be "Your Project Name" Properties..., Select it
3- in the Compile tab click on the button "Advanced Compile Options..."
4- At the bottom of the newly opened window there is a dropdown titled "Target framework"
Make sure .NET framework 2.5 is selected.
Then you should have access to the library System.LINQ
Alex
.NET developer "No. Not even in the face of Armageddon. Never compromise." (Walter Kovacs/Rorschach)
Things to consider before posting. Don't forget to rate the posts if they helped and mark thread as resolved when they are.