New Posts New Posts RSS Feed: Switch From C# to VB Issues
  FAQ FAQ  Forum Search   Calendar   Register Register  Login Login

Switch From C# to VB Issues

 Post Reply Post Reply
Author
rclarke View Drop Down
Groupie
Groupie


Joined: 14-Jun-2007
Location: United States
Posts: 69
Post Options Post Options   Quote rclarke Quote  Post ReplyReply Direct Link To This Post Topic: Switch From C# to VB Issues
    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.
Back to Top
rclarke View Drop Down
Groupie
Groupie


Joined: 14-Jun-2007
Location: United States
Posts: 69
Post Options Post Options   Quote rclarke Quote  Post ReplyReply Direct Link To This Post 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!
Back to Top
rclarke View Drop Down
Groupie
Groupie


Joined: 14-Jun-2007
Location: United States
Posts: 69
Post Options Post Options   Quote rclarke Quote  Post ReplyReply Direct Link To This Post 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.
Back to Top
rclarke View Drop Down
Groupie
Groupie


Joined: 14-Jun-2007
Location: United States
Posts: 69
Post Options Post Options   Quote rclarke Quote  Post ReplyReply Direct Link To This Post 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...
Back to Top
kimj View Drop Down
IdeaBlade
IdeaBlade
Avatar

Joined: 09-May-2007
Posts: 1391
Post Options Post Options   Quote kimj Quote  Post ReplyReply Direct Link To This Post 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.
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down