我在shfbproj文件中为Microsoft.OData.ProxyExtensions配置了Microsoft.OData.Client v 6.13.0。 Microsoft.OData.ProxyExtensions根据MS网站上的信息接受任何OData.Client> = 6.11.0,所以这应该是好的。 (它们都是由Office365.OutlookServices-V2.0实际导入的)但是,当我使用Sandcastle编译项目API文档时,我遇到了以下错误。
<buildStep step="GenerateReflectionInfo">
Generating reflection information...
[C:\Windows\Microsoft.NET\Framework\v4.0.30319\MSBuild.exe]
Build started 1/3/2017 11:08:08 AM.
Project "C:\inetpub\wwwroot\AppServerDevHelp\Working\GenerateRefInfo.proj" on node 1 (default targets).
PrepareForBuild:
Creating directory "obj\Debug\".
GenerateRefInfo:
MRefBuilder (v2015.1.12.0)
Copyright c 2006-2015, Microsoft Corporation, All Rights Reserved.
Portions Copyright c 2006-2014, Eric Woodruff, All Rights Reserved.
Loaded 2 assemblies for reflection and 44 dependency assemblies.
MRefBuilder : error : Unresolved assembly reference: Microsoft.OData.Client (Microsoft.OData.Client, Version=6.11.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35) required by Microsoft.OData.ProxyExtensions [C:\inetpub\wwwroot\AppServerDevHelp\Working\GenerateRefInfo.proj]
Last step completed in 00:00:02.3886
</buildStep>
<buildStep step="Failed">
SHFB: Error BE0043: Unexpected error detected in last build step. See output above for details.
at SandcastleBuilder.Utils.BuildEngine.BuildProcess.RunProcess(String fileToRun, String args)
at SandcastleBuilder.Utils.BuildEngine.BuildProcess.Build()
</buildStep>
下面是我的shfbproj文件,OData.Client配置位于底部
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="4.0">
<PropertyGroup>
<!-- The configuration and platform will be used to determine which
assemblies to include from solution and project documentation
sources -->
<Configuration Condition=" '$(Configuration)' == '' ">Release</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{0b7a8c51-1f48-436d-b9b6-9eb76b3ebd1e}</ProjectGuid>
<SHFBSchemaVersion>1.9.5.0</SHFBSchemaVersion>
<!-- AssemblyName, Name, and RootNamespace are not used by SHFB but Visual
Studio adds them anyway -->
<AssemblyName>Documentation</AssemblyName>
<RootNamespace>Documentation</RootNamespace>
<Name>Documentation</Name>
<!-- SHFB properties -->
<OutputPath>C:\inetpub\wwwroot\AppServerDevHelp\</OutputPath>
<HtmlHelpName>x y Reference</HtmlHelpName>
<FrameworkVersion>.NET Framework 4.0</FrameworkVersion>
<HelpFileFormat>Website</HelpFileFormat>
<DocumentationSources>
<DocumentationSource sourceFile="zShared\zShared.csproj" />
<DocumentationSource sourceFile="zWebService\zWebService.csproj" />
</DocumentationSources>
<WorkingPath>
</WorkingPath>
<SandcastlePath>
</SandcastlePath>
<ProjectLinkType>Local</ProjectLinkType>
<HelpTitle>x y Reference</HelpTitle>
<CopyrightText>x International Inc. 2017</CopyrightText>
<CopyrightHref>http://www.x.com</CopyrightHref>
<FeedbackEMailAddress>webapps.support%40x.com</FeedbackEMailAddress>
<VisibleItems>Attributes, ExplicitInterfaceImplementations, InheritedMembers</VisibleItems>
<SyntaxFilters>CSharp, VisualBasic, CPlusPlus, JScript, JavaScript</SyntaxFilters>
<NamespaceSummaries>
<NamespaceSummaryItem name="(global)" isDocumented="False" />
<NamespaceSummaryItem name="zServer" isDocumented="False" />
<NamespaceSummaryItem name="zServer.FilterBuilders" isDocumented="False" />
<NamespaceSummaryItem name="zWebService" isDocumented="False" />
</NamespaceSummaries>
<PlugInConfigurations>
</PlugInConfigurations>
<RootNamespaceContainer>False</RootNamespaceContainer>
<ComponentConfigurations>
<ComponentConfig id="Code Block Component" enabled="True">
<component id="Code Block Component" type="SandcastleBuilder.Components.CodeBlockComponent" assembly="{@SHFBFolder}SandcastleBuilder.Components.dll">
<basePath value="{@HtmlEncProjectFolder}" />
<outputPaths>{@HelpFormatOutputPaths}</outputPaths>
<allowMissingSource value="false" />
<removeRegionMarkers value="false" />
<colorizer syntaxFile="{@SHFBFolder}Colorizer\highlight.xml" styleFile="{@SHFBFolder}Colorizer\highlight.xsl" stylesheet="{@SHFBFolder}Colorizer\highlight.css" scriptFile="{@SHFBFolder}Colorizer\highlight.js" language="cs" tabSize="0" numberLines="false" outlining="false" keepSeeTags="false" defaultTitle="true" />
</component>
</ComponentConfig>
</ComponentConfigurations>
<NamingMethod>MemberName</NamingMethod>
<BuildLogFile>
</BuildLogFile>
<HtmlHelp1xCompilerPath>
</HtmlHelp1xCompilerPath>
<HtmlHelp2xCompilerPath>
</HtmlHelp2xCompilerPath>
<MissingTags>Summary, Parameter, Returns, AutoDocumentCtors, Namespace, TypeParameter, AutoDocumentDispose</MissingTags>
<CollectionTocStyle>Flat</CollectionTocStyle>
<SdkLinkTarget>Blank</SdkLinkTarget>
<PresentationStyle>VS2010</PresentationStyle>
<Preliminary>False</Preliminary>
<Language>en-US</Language>
<ContentPlacement>AboveNamespaces</ContentPlacement>
</PropertyGroup>
<!-- There are no properties for these groups. AnyCPU needs to appear in
order for Visual Studio to perform the build. The others are optional
common platform types that may appear. -->
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x64' ">
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x64' ">
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|Win32' ">
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|Win32' ">
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="zShared\zShared.csproj">
<Name>zShared</Name>
<Project>{3C5798A6-AE6B-45DE-8CC8-06708385E025}</Project>
</ProjectReference>
</ItemGroup>
<ItemGroup>
<Reference Include="ComWrapperLibrary">
<HintPath>zWebService\bin\ComWrapperLibrary.dll</HintPath>
</Reference>
<Reference Include="zWebService">
<HintPath>zWebService\bin\zWebService.dll</HintPath>
</Reference>
<Reference Include="Microsoft.OData.Client">
<HintPath>packages\Microsoft.OData.Client.6.13.0\lib\net40\Microsoft.OData.Client.dll</HintPath>
</Reference>
</ItemGroup>
<!-- Import the SHFB build targets -->
<Import Project="$(SHFBROOT)\SandcastleHelpFileBuilder.targets" />
</Project>
虽然配置在shfbproj文件中,但Sandcastle似乎未能找到程序集。我想知道如何用v 6.13解决这个问题。
****请注意,我通过下载6.11 OData.client来修复此问题并更新了文件中的配置。但我不想这样,因为我必须保持两个几乎相同的组件。只想要6.13,谢谢
答案 0 :(得分:2)
您可以使用程序集绑定重定向插件将 Microsoft.OData.Client@6.11.0.0 重定向到 Microsoft.OData.Client@6.13 .0.0 或者您可以将 Microsoft.OData.Client 添加到程序列表中,以便在未解析时忽略。
请参阅Assembly Binding Redirection plug-in上的文档。
提示:我使用 ConfigurationFile 选项,这样您就不必在每次更新依赖项时都更新绑定重定向版本。