Run-time error when building a help project

Dec 16, 2014 at 3:15 AM
I am new to SandCastle and am trying to generate documentation from code. After selecting the source projects, I ran "Build" from the GUI and it ran into an error (see below - it seems to be missing a DLL file. Not sure which one it is).

My code is based of VS 2013 (.NET 4.5.5). Can someone please point me in the right direction?

Thanks in advance!

SHFB: Error BE0065: BUILD FAILED: Type 'System.ServiceModel.DuplexHelperAttribute' from assembly 'System.ServiceModel.Extensions, Version=2.0.5.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' is attempting to implement an inaccessible interface.
at System.ModuleHandle.ResolveType(RuntimeModule module, Int32 typeToken, IntPtr* typeInstArgs, Int32 typeInstCount, IntPtr* methodInstArgs, Int32 methodInstCount, ObjectHandleOnStack type)
at System.ModuleHandle.ResolveTypeHandleInternal(RuntimeModule module, Int32 typeToken, RuntimeTypeHandle[] typeInstantiationContext, RuntimeTypeHandle[] methodInstantiationContext)
at System.ModuleHandle.ResolveTypeHandle(Int32 typeToken, RuntimeTypeHandle[] typeInstantiationContext, RuntimeTypeHandle[] methodInstantiationContext)
at System.Reflection.RuntimeModule.ResolveType(Int32 metadataToken, Type[] genericTypeArguments, Type[] genericMethodArguments)
at System.Reflection.CustomAttribute.FilterCustomAttributeRecord(CustomAttributeRecord caRecord, MetadataImport scope, Assembly& lastAptcaOkAssembly, RuntimeModule decoratedModule, MetadataToken decoratedToken, RuntimeType attributeFilterType, Boolean mustBeInheritable, Object[] attributes, IList derivedAttributes, RuntimeType& attributeType, IRuntimeMethodInfo& ctor, Boolean& ctorHasParameters, Boolean& isVarArg)
at System.Reflection.CustomAttribute.GetCustomAttributes(RuntimeModule decoratedModule, Int32 decoratedMetadataToken, Int32 pcaCount, RuntimeType attributeFilterType, Boolean mustBeInheritable, IList derivedAttributes, Boolean isDecoratedTargetSecurityTransparent)
at System.Reflection.CustomAttribute.GetCustomAttributes(RuntimeAssembly assembly, RuntimeType caType)
at Microsoft.Internal.AttributeServices.GetAttributes[T](ICustomAttributeProvider attributeProvider)
at System.ComponentModel.Composition.Hosting.AssemblyCatalog.get_InnerCatalog()
at System.ComponentModel.Composition.Hosting.AssemblyCatalog.GetEnumerator()
at System.Linq.Enumerable.Count[TSource](IEnumerable1 source)
at System.Linq.Queryable.Count[TSource](IQueryable
1 source)
at Sandcastle.Core.ComponentUtilities.AddAssemblyCatalogs(AggregateCatalog catalog, String folder, HashSet1 searchedFolders, Boolean includeSubfolders)
at Sandcastle.Core.ComponentUtilities.AddAssemblyCatalogs(AggregateCatalog catalog, String folder, HashSet
1 searchedFolders, Boolean includeSubfolders)
at Sandcastle.Core.ComponentUtilities.CreateComponentContainer(IEnumerable`1 folders)
at SandcastleBuilder.Utils.BuildEngine.BuildProcess.Build()
Editor
Dec 16, 2014 at 3:26 AM
You've most likely got the assemblies you are trying to document in the same folder as the SHFB project or a sub-folder below it. SHFB is scanning assemblies in the project folder and below for components it may need during the build (plug-ins, build components, presentation styles, etc.). Since your documented assemblies appear to be for the .NETCore or .NETPortable framework, they are failing to load since they aren't compatible with the normal .NET framework. Move your SHFB project to a subfolder below the one containing the documented assemblies or to a different location so that it can't find the documented assemblies when searching for components. This has been fixed in the next release.

Please note that this project site has been discontinued and may not be monitored as frequently. For future questions or issues concerning Sandcastle or SHFB, post them over on the Sandcastle Help File Builder project's discussion page. Thanks.

Eric
Dec 16, 2014 at 9:41 PM
Thanks so much for the quick and helpful response! I moved it to another directory and was able to make it work eventually. I'll post further questions on the page you refer to.

Vasu