Print Page | Close Window

Switch From C# to VB Issues

Printed From: IdeaBlade
Category: DevForce
Forum Name: DevForce 2009
Forum Discription: For .NET 3.5
URL: http://www.ideablade.com/forum/forum_posts.asp?TID=727
Printed Date: 19-Apr-2024 at 12:48pm


Topic: Switch From C# to VB Issues
Posted By: rclarke
Subject: Switch From C# to VB Issues
Date Posted: 14-Mar-2008 at 9:07am
While begining a new project, I forgot to select Visual Basic as my language of choice and generated the Domain Model and the Apphelper projects in C# as expected. I then loaded Object mapper again and selected VB and saved. The AppHelper project remained C# and in the Domain Model the VB classes will interspersed with VB classes, not what I would exect. I'm OK with having to first remove the genated projects before a language switch but I think that Devforce should either warn the user to manually remove the projects or ask if Devforce should completely replace the existing projects.



Replies:
Posted By: rclarke
Date Posted: 14-Mar-2008 at 9:53am
Update-
I removed the Apphelper and DomainModel projects from the VS Solution Explorer and then loaded DevForce EF OM again and did a save. The Apphelper project re-built properly but the DomainModel project was re-built with both C# and VB classes again. Not what I wanted. In order to get things to work I had to remove the projects, manually remove all files except the .ibedmx file, reload Object Mapper and Save.
 
BTW, I know this is Beta1 and I expect issues; that's why I'm testing. Since I don't know what Beta1 really means in terms of the state now v.s. what is planned for the intiial release, please take the issues that I report as bugs or features I consider lacking now. No critisizm intended!


Posted By: rclarke
Date Posted: 14-Mar-2008 at 10:25am
Update 2-
 
I mispoke in the previous update, the Apphelper is not re-created properly and I now have a new file entitled "ServerNorthwindIB1.Designer.vb which causes duplicate definitions since there is also a file "ServerNorthwindIB.Designer.vb in the project. Remove one of them and now clean compile (except for the expected warnings).
 
Continued to add a form and a simple query and received an Invalid Operation Exception:
 
An error occurred creating the form. See Exception.InnerException for details.  The error is: Error in EdmKey Default: Unable to locate an ObjectContext in the probe assemblies.  This is often caused by not copying your EF model 'dll' to the deployment directory.  This will be either the client application directory in a two tier deployment or the server deployment  directory in an n-tier deployment.
 
This may be a result of my manual intervention so, I guess I'll start again from scratch.


Posted By: rclarke
Date Posted: 14-Mar-2008 at 10:37am
I just looked at the App.Config and I noticed that none of the connection information is there. Again this may be my fault--definately starting over...


Posted By: kimj
Date Posted: 17-Mar-2008 at 6:25pm
You've found a couple of problems here, and we'll take a look at fixing them.
 
For now, the best thing to do when you need to regenerate in another language is to physically remove the DomainModel and AppHelper projects altogether - from both the solution and the file system.  Then open up OM and try again.



Print Page | Close Window