Just trying the new version Q1 2011 in VB.NET (VS2010)
problem with namespace...
In the Wizard new model, on the first page, the Model Namespace is asked. When using the default setting (project namespace) it places a namespace from the project obove everything with the project root namespace, resulting in:
Imports
Xxx.Data.EntitiesOpenAccessORM.v1.Xxx.Data.EntitiesOpenAccessORM.v1
Namespace
Xxx.Data.EntitiesOpenAccessORM.v1
Public
Partial
Class
EntitiesModel
Inherits
OpenAccessContext
....
Oops...
23 Answers, 1 is accepted
Actually this behavior is by design and it does not create compilation errors with the generated code. With previous versions of the product we had problems that in some situations the context did not have all of the necessary Import statements depending on whether the project has Root Namespace or not. We have made the ultimate solution for the problem by adding an Import statement inside the context class for each endpoint it has. The Import statement includes the Full Namespace of the referenced class which has the format of 'RootNamespace.ActualNamespace'. I am aware that it can sometimes give you warning for the generated context class, but in the long run it is a solution to many of our problems from previous versions.
Do you, for any reason have problems working with this code, or is it non-compilable on your side? I really hope that this is just a point you are making and not an actual problem that stops your work with the product. Looking forward to read back from you.
Zoran
the Telerik team

The new release is adding 3 lines to the .generated.vb and diagram.vb files.
Imports ProjectNamespace.ProjectNamespace
Namespace ProjectNameSpace
End Namespace
If I remove those 3 lines from all the files it will build, but it will still give 1 error: "Unable to find the runtime mapping information".
I see a new .rlinq.diagram file is created and is not included in the project. If I manually include in the project it still gives the error.


Same error here, namespaces are implemented differently in VB to C#, not sure if this has been taken into account.
Worse still, when I import a single table into the model and go to the CUD mappings the VS IDE crashes (see attached pic).
I was having issues with CUD mappings in Q3 2010 release but at least it didn't crash Visual Studio.

Attached another screenshot.
Microsoft Visual Studio 2010
Version 10.0.30319.1 RTMRel
Microsoft .NET Framework
Version 4.0.30319 RTMRel
Installed Version: Professional
Microsoft Office Developer Tools 01018-532-2002181-70216
Microsoft Office Developer Tools
Microsoft Visual Basic 2010 01018-532-2002181-70216
Microsoft Visual Basic 2010
Microsoft Visual C# 2010 01018-532-2002181-70216
Microsoft Visual C# 2010
Microsoft Visual C++ 2010 01018-532-2002181-70216
Microsoft Visual C++ 2010
Microsoft Visual F# 2010 01018-532-2002181-70216
Microsoft Visual F# 2010
Microsoft Visual Studio 2010 Team Explorer 01018-532-2002181-70216
Microsoft Visual Studio 2010 Team Explorer
Microsoft Visual Web Developer 2010 01018-532-2002181-70216
Microsoft Visual Web Developer 2010
.NET Memory Profiler 3.5
.NET Memory Profiler Visual Studio.NET Integration Package
Crystal Reports Templates for Microsoft Visual Studio 2010
Crystal Reports Templates for Microsoft Visual Studio 2010
Microsoft Visual Studio 2010 SharePoint Developer Tools 10.0.30319
Microsoft Visual Studio 2010 SharePoint Developer Tools
tangible T4 Editor 1.0
tangible T4 Text Template Editor - T4 Editor
Telerik OpenAccess ORM 2011.1.316.3
Telerik OpenAccess ORM Copyright (C) 1996-2011 Telerik; OpenAccess is the Object-Relational Mapping Tool for the Microsoft .NET Platform. www.telerik.com
Telerik WinForms VSExtensions 2010.03.1214.0
Telerik RadControls for WinForms VSExtensions Package
Telerik WPF VSExtensions 2010.03.1214.0
Telerik RadControls for WPF VSExtensions Package
VisualStudioIntegration2010 1.0
Information about my package
.NET Reflector

Yes, wrote a post on that last week, also namespace issues, in the previous version, but that was only if you set a namespace.
I just created a sample console application, and kept everything standard, but then my context model is only accessible via
ConsoleApplication2.ConsoleApplication2.EntitiesModel
That seems strange to me, especially because the first page of the wizard says: "Use project namespace"... The project namespace is
ConsoleApplication2, and not ConsoleApplication2.ConsoleApplication2...
The model looks like this:
Imports
ConsoleApplication2.ConsoleApplication2
' << ?
Namespace
ConsoleApplication2
' << ?
Public
Partial
Class
EntitiesModel
Inherits
OpenAccessContext
...
Using the model looks like this:
Using DC
As
New
Global.ConsoleApplication2.ConsoleApplication2.EntitiesModel
Dim
Usrs
As
List(Of Global.ConsoleApplication2.ConsoleApplication2.UserEntity) = DC.UserEntities.ToList
End
Using
Also:
1) Sometimes I get "Operation could not be completed" messagebox when i try to run.
2) When i delete the model and add a new model, I can't run the application anymore (exe and console). I have to close VS and reopen it, and than everything runs fine... ;-|

Removing the project namespace when you create a new project sorts out the Visual Studio IDE crash when using VB and ORM.
Hopefully will be sorted in the Q1 2011 service pack release.
Thanks for the report. The issue you are seeing is already fixed. Until then you can go with a simple workaround and that is having your projects that contain entity diagrams without a root namespace. This is also a solution for all guys that do not want a prefix prepended to their classes namespaces. That is after all by design with Visual Basic projects as Type discovery during runtime is not possible without prepending the root namespace as part of the full name of the types defined in that project. If for example you load a persistent Type that is defined in Namespace1 using reflection, and then ask for the Namespace of that type - you will get RootNamespace.Namespace1.
All the best,Zoran
the Telerik team

Any idea when the update will be available?
We will probably replace the build on our web page next week with few bug-fixes of this kind, but we have not yet made the final decision on this one. The official Service Pack should be available in about three weeks. I will give you an update in this forum as soon as we have a new build online.
Greetings,Zoran
the Telerik team

I'm getting the same "mapping not found" behavior. I deleted my old OpenAccess rlinq node in a the project, added a new one, the entities I want etc... but I when I try to build the project I get:
Error 4 Unable to find the runtime mapping information. Construct.Sources.Model
Will post as ticket, too, but this is urgent. Was counting on the new release :)
Thanks,
Dave Gerding

I found that deleting and re-add a model had a lot of problems. For one, the test project (an exe and later a console app) didn't run. I had to close VS2010 in order to get it to run. bit curious..
Also the "re-adding" gave me some problems in the model, pretty much as you describe right now. Starting a new project did do the trick always.
Hope it helps you...

Thanks, I'm going to go try that now.
Dave G

I forgot to mention that I tried a clean, new Telerik WPF project, added an OpenAccess project, mapped Northwind and get the same "no mapping" result.
I'm now going to try with a new solution... since that's the only thing in common.
Anyone from Telerik following this thread?
Dave

I know it's soon - but please post any internal builds that you have. I can reproduce the "no mapping error" using a new, clean solution. I've posted that solution (7mb - too big for here) as a trouble ticket under my account. I can't use the q1 release at all - which means I now have to regress back to q3.
Help :)
Thanks,
Dave Gerding

Here's the text of what I sent in my related trouble ticket - hope it helps others and would love to know what the point of this error message is. Is it real? I haven't yet bound to successfully to any 2011Q1 OpenAccess entities collection.
It took me a long time to realize that the "mapping not found" compile time error wasn't really a compile time error .... in that the runtime does run in debug mode. But, sadly, that doesn't mean that I've gotten the thing to work :)
Okay,
I am able to RUN the application even though all 5 projects produce the complie time error. If it turns out that this "error" is "really" a warning please mark it as such. I'm used to compile time errors indicating the code will not run. I spent a lot of time trying to solve the compiler error before running the executable.
....
If this error behavior is expected appropriate, please clarify with the community and, perhaps, a more explanatory error message.
Thanks,
Dave G
Thanks to all,
Dave G

Brent
The new build should be available by the end of today, I will update you as soon as it is online. However, regarding the enhancer error regarding the runtime mapping - we really apologize for the confuse this has created. It is indeed a warning and the product works as expected even with this error popping out in the ErrorList of Visual Studio. Some additional minor fixes have been done as well.
Regarding the namespaces in VB .NET projects, this can provide to be a breaking change for some existing projects, but this is ultimately fixing all of the issues we had with VB in previous versions. There we had issues with the RootNamespace not being accounted in our designer. When a user tried to set Namespace explicitly for a class, Import to the RootNamespace was missing as the FullName of the class in that case is RootNamespace.Namespace.ClassName. In order to have consistent behavior, we are always having account for the RootNamespace, no mater if it is the same as the class namespace. That is why we sometimes generate imports like RootNamespace.RootNamespace.
Zoran
the Telerik team

What exactly is changed/fixed in the new build with regard to the namespace issue? I played with the new release and it really wreaked havoc on existing projects (from a lot of perspectives). I have a 50 table model and after upgrading/opening it really messed up the designer surface (stacking all the objects/tables on top of each other)...it's really a mess.
It of course changed the namespace/imports stuff like what has been said in this thread.
Now I have 60+ warnings that "The persistent type 'xxx' has an incorrect full name ('rootnamespace.rootnamespace.class')."
What is going on?
Can't we get an OPTION to make these changes instead of it just completely taking over our projects? These issues also don't take into account the 100s of errors that will now reside in the consumer projects using this model (now with the screwed up namespace thing). I really can't spend hours going through all my projects getting this stuff back inline...which is why something like this change needs to be an OPTION.

Removing the root namespace from VB isn't an option unfortunately in our case.
I did it in our test ORM harness app (to stop the Visual Studio crash) as that was a small test app but in our main WPF framework application I can't remove the root namespace as it'll cause all sorts of issues with usercontrols etc.
I reported the namespace bug last week and was assured it would be resolved as it crashed the VS IDE.
I think Shawn's question is important, we need to know what this release will resolve.
I'm supposed to start a new product using WPF, WCF & ORM, we're just seing how it performs at the moment, the namespace thing in VB is a big question mark.
Regards,
Norman.

Jeff
The internal build is available on our web site and I suggest that all of the participants in this thread to download it and install it. The reason is that we have fixed all of the issues that you reported here, including the change of behavior in the Namespace generation in Visual Basic. All issues that were reported here as well as in other support threads from the Q1 official release, have been fixed for this internal build.
I hope all of you can continue their work with OpenAccess in a more smoother manner without having all the small glitches that have been mentioned.
Zoran
the Telerik team

Just want to update this tread for now:
I did a simple test and both "project namespace" and your own namespace is working well. Got the thing to work!
Grz
Erik