New Posts New Posts RSS Feed: DomainModelTemplate Class Generates C# code in a VB project
  FAQ FAQ  Forum Search   Calendar   Register Register  Login Login

DomainModelTemplate Class Generates C# code in a VB project

 Post Reply Post Reply
Author
WRawson View Drop Down
Newbie
Newbie
Avatar

Joined: 24-Oct-2011
Location: Wellsboro PA US
Posts: 2
Post Options Post Options   Quote WRawson Quote  Post ReplyReply Direct Link To This Post Topic: DomainModelTemplate Class Generates C# code in a VB project
    Posted: 24-Oct-2011 at 2:03pm
Hello everyone and thanks in advance for your time and efforts.
I have been struggling with a code generation issue. After updating to DevForce 2010 v6.1.3.1 when I regenerated the Models the code files and code generated are in C# when the project is a VB project. After lots of time and troubleshooting it seems to also affect the previous version of DevForce as well. This appears to only happen when the Code is under source control with TFS 2010. I am able to create VB Projects that are not under source control and they generate in the proper code language. As soon as the projects are added to source control any regeneration will cause the code to be C#.
The environment:
Windows 7 Ultimate x64 with current updates.
Entity Framework 4.1
SQLCe 4
DevForce 2010 v6.1.3.1
TFS 2010 updated
Visual Studio 2010 Ultimate Sp1
Code Contracts
ReSharper 6
Visual Studio Default Environment: VB General Development
Empty .Net 4 VB Asp.Net Web projects for the Data Models and Code Generation files (edmx and tt files) (VB Class projects)
.Net 4 VB Class projects link to the Generated models (Entities) code files.
Any help or ideals are greatly appreciated. I am working on a work around of just not adding the Dummy Web Projects to Source Control but keeping the links from Source Controlled Projects to the generated code files.
Thanks again for your time and attention.
William OttO Яawson
p.s. The reason for using Dummy Web Projects is that SQLCe 4 is not supported in the designers and wizards for non Web projects at this time in Visual Studio 2010. So by using Web projects that actually hold the files and do the Code Generation and maintenance I can just link to the generated code files that I need in the real projects where they are compiled as part of that namespace and assembly etc..
Back to Top
sbelini View Drop Down
IdeaBlade
IdeaBlade
Avatar

Joined: 13-Aug-2010
Location: Oakland
Posts: 786
Post Options Post Options   Quote sbelini Quote  Post ReplyReply Direct Link To This Post Posted: 27-Oct-2011 at 5:04pm
Hi William,

Do you by any chance have, in your source control, a second project file (i.e. a csproj file) in the same folder where the .vbproj file of the project containing the model is?

Regards,
   Silvio.
Back to Top
WRawson View Drop Down
Newbie
Newbie
Avatar

Joined: 24-Oct-2011
Location: Wellsboro PA US
Posts: 2
Post Options Post Options   Quote WRawson Quote  Post ReplyReply Direct Link To This Post Posted: 27-Oct-2011 at 6:46pm
Hello Silvio,
There isn't any .csproj in the solution. But I do have more information. Today I installed Visual Studio 2010 and DevForce 2010 on a different workstation. I tried to duplicate the setup and the extensions etc.. On the newly installed workstation I cannot reproduce the unwanted code generation. It appears that it is not related to The DevForce update or to DevForce in anyway. I also performed other Template code generation (without DevForce and not related to EF) on the workstation that I am experiencing the issue on. And it also generated CSharp code. This tells me that the issue is with my Visual Studio Installation. (I am trying to find out if an add in or extension made changes to some of the Visual Studio assemblies or if they intercept some of the methods maybe with DTE . I thought that it was possible that having csproj files and cs code files in the same Source Control Work Space might be causing the issue, so I had already created a new collection and only added a single VB project and this also had CSharp code generated.
So after todays tests:
I am completely convinced that it has nothing to do with DevForce 2010.
But if anyone else has any ideals or has experienced this issue. I would like to hear about it. I am now going to do the dreaded reinstall of Visual Studio 2010 and if needed I will do a clean install of Visual Studio.
Thank You very much,
William
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down