Unknown reference link target 'T:'.

May 27, 2010 at 2:38 PM
Edited May 27, 2010 at 3:31 PM

Hi,

I get "Unknown reference link target 'T:'." warnings when I do something like this:

  1. Create generic abstract class "Foo<T>" (in external assembly, don't know if that matters)
  2. Create abstract subclass "Bar : Foo<Foobar>"
  3. Create subclass "Foobar : Bar"

Result:

  • 4737  Warn: CachedResolveReferenceLinksComponent: Unknown reference link target 'T:'.
  • Help file (HtmlHelp1) shows "Bar : Foo<T:>" instead of "Bar : Foo<Foobar>"

Any idea how to work around this problem?

Thanks for your help.

 

Edit: just posted it in the Sandcastle Help Builder forum, too (http://shfb.codeplex.com/Thread/View.aspx?ThreadId=214079), not sure where it's supposed to be

Editor
May 27, 2010 at 8:02 PM

I created a test based on the above description and everything looked okay.  Are you using the May 2008 release of Sandcastle?  Have you applied the Sandcastle Styles patch?

Eric

 

May 28, 2010 at 2:46 AM
Edited May 28, 2010 at 2:46 AM

Thanks Eric,

I had the patch..

it's very strange: I just tried to reproduce it in a separate project .. and had to give up after 2 hours with no success.

I still get these errors with the documentation of the whole project though.

Help Output Example:

Assembly 1:

namespace Core

public class Context<TContext, TDataSource> : IDateTimeProvider, 
	IDisposable
where TContext : Context<TContext, TDataSource>
where TDataSource : IDataSource

Assembly 2 (referencing Assembly 1):

namespace Sample1

public abstract class ContextBase : Context<[T:], IDataSource>

 public class Context : ContextBase

--> [T:] should be "Context"

 

Another example:

Assembly 1:

namespace Core.Work

public abstract class EntityWorkItemProvider<TEntityKey, TEntity, TWorkItem, TWorkItemProvider, TDataMapper, TContext, TDataSource, TUnitOfWork>
where TEntityKey : IEntityKey, ICacheValue<TValueType>
where TEntity : Entity<TEntityKey, TEntity>
where TWorkItem : EntityWorkItem<TEntityKey, TEntity, TWorkItem, TWorkItemProvider, TDataMapper, TContext, TDataSource, TUnitOfWork>
where TWorkItemProvider : EntityWorkItemProvider<TEntityKey, TEntity, TWorkItem, TWorkItemProvider, TDataMapper, TContext, TDataSource, TUnitOfWork>
where TDataMapper : Object, IDataMapper<TEntityKey, TEntity>
where TContext : Context<TContext, TDataSource>
where TDataSource : IDataSource
where TUnitOfWork : UnitOfWork<TContext, TDataSource>

 

Assembly 2 (referencing Assembly 1):

namespace Sample1.WorkItemProviders.Base
public abstract class CarWorkItemProviderBase : EntityWorkItemProvider<CarKey, Car, CarWorkItem, [T:], ICarMapper, Context, IDataSource, UnitOfWork>

namespace Sample1.WorkItemProviders
public class CarWorkItemProvider : CarWorkItemProviderBase

--> [T:] should be "CarWorkItemProvider"

 

but then again this works:

Assembly 1:

namespace Core.Work

public abstract class EntityWorkItem<TEntityKey, TEntity, TWorkItem, TWorkItemProvider, TDataMapper, TContext, TDataSource, TUnitOfWork> : IWorkItem, 
	IEntity<TEntityKey>
where TEntityKey : IEntityKey, ICacheValue<TValueType>
where TEntity : Entity<TEntityKey, TEntity>
where TWorkItem : EntityWorkItem<TEntityKey, TEntity, TWorkItem, TWorkItemProvider, TDataMapper, TContext, TDataSource, TUnitOfWork>
where TWorkItemProvider : EntityWorkItemProvider<TEntityKey, TEntity, TWorkItem, TWorkItemProvider, TDataMapper, TContext, TDataSource, TUnitOfWork>
where TDataMapper : Object, IDataMapper<TEntityKey, TEntity>
where TContext : Context<TContext, TDataSource>
where TDataSource : IDataSource
where TUnitOfWork : UnitOfWork<TContext, TDataSource>

 

Assembly 2 (referencing Assembly 1):

namespace Sample1.WorkItems

public abstract class CarWorkItemBase : EntityWorkItem<CarKey, Car, CarWorkItem, CarWorkItemProvider, ICarMapper, Context, IDataSource, UnitOfWork>, 
	ICar, IEntity<CarKey>

public class CarWorkItem : CarWorkItemBase

 

--> "CarWorkItem" is not [T:]

 

Boris

 

 


Editor
May 28, 2010 at 7:52 PM

Is it a .NET 4.0 assembly?  There are currently some issues with .NET 4.0 assemblies containing generic types and the May 2008 release although they usually manifest themselves as missing members rather than incorrect generic parameters.  I didn't try it with one type in one assembly referencing the other.  Does it work if you add both assemblies as documentation sources so that all types from both assemblies are included in the help file?

Eric

 

May 28, 2010 at 9:26 PM
Edited May 28, 2010 at 9:27 PM

It's .NET 3.5. The documentation source is  a VS2008 project.

By the way, I use the plug-in "Additional Reference Links" referencing the "assembly1.shfbproj". If assembly1.shfbproj uses a project as documentation source I get the following error:

SHFB: Error BE0029: Unexpected error while executing plug-in 'Additional Reference Links': SandcastleBuilder.Utils.BuilderException: Unable to build additional target project: C:\Dev\project\assembly1.shfbproj   at SandcastleBuilder.PlugIns.AdditionalReferenceLinksPlugIn.Execute(ExecutionContext context)   at SandcastleBuilder.Utils.BuildEngine.BuildProcess.ExecutePlugIns(ExecutionBehaviors behavior)Unable to build additional target project: C:\Dev\project\assembly1.shfbproj

It works fine with the dll + xml file as documentation source, just having the [T:] problem.