Search

Namespace/type name hiding occurs in BizTalk map code resulting in compilation error CS0234 by Henrik Sandqvist

Active

1
0
Sign in
to vote
Type: Bug
ID: 771745
Opened: 11/20/2012 8:16:31 AM
Access Restriction: Public
0
Workaround(s)
0
User(s) can reproduce this bug
Compiler error CS0234 occurs when compiling a BizTalk project with referenced types (project or assemblies)

Assembly 1 contains the map source schema in namespace 'Common.Applications.Schemas
Assembly 2 contains the map target schema in namespace 'Applications.Common.Canonical'
The map project shares the first part of the namespace with one of the referenced projects, example Common.Processing.MyApp

Result: Project can not be built due to CS0234
Details (expand)

Product Language

English

Version

BizTalk 2009

Category

Messaging/Pipelines

Repro Steps

See above or attached example.
File Attachments
File Name Submitted By Submitted On File Size  
BizTalk_Map_CS0234.zip 11/20/2012 40 KB
Sign in to post a comment.
Posted by Henrik Sandqvist on 11/21/2012 at 11:43 PM
Seems to be solved in BizTalk 2010, the code generation prefixes referenced types with global::
Has this change been propagated into BizTalk 2009 as a SP or CU package?
Posted by Henrik Sandqvist on 11/21/2012 at 3:25 AM
A suggested change to the BizTalk code generation tools would be to start using namespace aliases for referenced types in the generated C# code and use the alias of the full original namespace in the code.

Example for a map:
using input_schema0 = [The input schema type namespace]
using output_schema0 = [The first output schema type namespace]

and in the generated code use input_schema0.[SchemaTypeName] etc.

Sign in to post a workaround.