Partager via


Configure WCF RIA services code generator to use full type names

There are customers who have plugged in data model that share the same type names with .NET types and RIA Services reserved types, such as "entitiy", "decimal", etc. They'll find that the solution will not compile due to the name conflict.

For our PDC releases, we have introduced a small feature called "Codegen uses full type names". What it does is that the code generator will split out types with full type names, e.g. System.string vs. SilvelightApplication1.Web.string, so visual studio will be able to distinguish these two types.

To enable full type name codegen, you could do the following:

1. Add an environmental variable to your machine: riaclientusefulltypenames, and assign a value to it as "true" to enable the full type codegen. This is a system level variable, so every RIA Service project that you have on your machine will be using full type name codegen.

2. If you only want full type codegen to happen to certain projects, unload the projects and add the following property tag to the .csproj or .vbproj files:

<riaclientusefulltypenames>true</riaclientusefulltypenames>

Comments

  • Anonymous
    May 24, 2010
    first model i built had this problem!! surface this option into the gui, or better yet.... detect the clash and don't bother me!