This project is read-only.


CodeGen References Problem


After using the pipeline builder I have to go and fix up references in the generated adapters. Here's an example. Here is one of my contracts:
public interface IHostContract : IContract
void Register(IServiceContract service, Type serviceType);
IServiceContract Resolve(Type serviceType);
This is generated for my IHost contract->view adapter:
public void Register(IService service, System.Type serviceType)
public IService Resolve(System.Type serviceType)
However, the IService references doesn't resolve until I qualify them as Contract.AddInViews.IService.


JesseKaplan wrote Apr 2, 2008 at 1:01 AM

Thanks for reporting this, I just checked in the fix and will include it in the next binary release.

In the mean time the workaround for this is to make sure the namespace you use for your contract types ends with ".Contracts" or ".Contract".

wrote Apr 2, 2008 at 1:01 AM

GaryGen wrote Sep 11, 2008 at 3:04 PM

Is the "next binary release" available yet?

I saw Jesse's workaround, but I'm having trouble getting my code to compile after changing my contracts namespace / recompiling / rerunning PipelineBuilder / etc.

GaryGen wrote Sep 12, 2008 at 7:59 PM

Just to clarify my last comment, I finally got Jesse's workaround working.

You can either have the Root namespace setting to "Something.Contracts" and no namespace tag in the file or, if you use a namespace tag, it needs to be "Something.Contracts".

Things clouding this issue:
  • If you change the contracts file, you need to Build the project, then run the PipelineBuilder, then Build the project again. If you do not build the project before running PipelineBuilder, it will run off an old copy of your contracts regardless of whether you save the file.
  • If you pass lists of structures, these need to be in IListContracts. If you place them in IList's, the PipelineBuilder will generate an incorrect reference, similar to the problem described here.
  • If you pass lists of structures using IListContracts, the VB.NET 2008 debugger will not be able to display the contents of the resultant list. This is a known issue with the debugger. The code itself works fine.

wrote Apr 14, 2010 at 1:23 AM

wrote Feb 14, 2013 at 9:01 PM

wrote May 16, 2013 at 10:33 AM

wrote May 16, 2013 at 10:33 AM

wrote Jun 14, 2013 at 8:14 AM