0

DynamicQuery is a sample project that allows 'Dynamic' LINQ strings to be executed at run-time. I want to use this in a project of mine.

I've created a new Window Forms Application in VB.Net; and add the existing item - 'Dynamic.vb' (taken from the DynamicQuery example).

Once I do that, code that was previous fine, is now marked as incorrect by the compiler.

'Globalization' is not a member of 'System'. Type 'System.Windows.Forms.Form' is not defined.

I'm kind of at a loss for what is going on. If I remove Dynamic.vb from my project, the errors disappear.

Dynamic.vb begins with a Namespace declaration, I'm guessing that is related, but I don't understand what is going on. Can someone help?

EDIT The Dynamic.vb starts with 'Namespace System.Linq.Dynamic' but once I add it to my project when I do 'System.' my intellisense only shows 'System.Linq' - everything else is gone.

Also - all of the references in the example project are included in my project.

Also - if I change the Namespace line in the Dynamic.vb file to be 'MySystem.Linq.Dynamic' - everything works.

Is this just a bug in Visual Studio? Or am I missing something?

2
  • Sounds like missing references. Did you compare your DynamicQuery project references with your new project? Commented Jun 4, 2010 at 17:07
  • Can you add the line of code where the error is occuring? Commented Jun 4, 2010 at 17:40

1 Answer 1

1

In VB.NET some projects, if you check your project properties, you may have default namespace this could be hiding it. I think this is for ASP.NET VB.NET but not sure if it applies in your case. You can see if this is being used under solution/project properties.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.