简体   繁体   English

沙堡错误 BE0073 .NET Framework 4.5

[英]Sandcastle Error BE0073 .NET Framework 4.5

I am trying to generate help files using Sandcastle, locally this works find but on my build server I keep receiving the same error message:我正在尝试使用 Sandcastle 生成帮助文件,在本地可以找到,但在我的构建服务器上,我一直收到相同的错误消息:

SHFB: Error BE0073: A project with a different or higher framework version was 
found but that version (.NETFramework 4.5) or a suitable redirected version 
was not found 

I have checked and I have .NET 4.5.1 installed and 4.5, my projects build without an issue on the server.我已经检查并安装了 .NET 4.5.1 和 4.5,我的项目在服务器上构建没有问题。 It is only Sandcastle that is causing a problem.只有 Sandcastle 引起了问题。

Does anyone know the cause of this error or how I can diagnose it further?有谁知道此错误的原因或我如何进一步诊断它?

For some reason the directory:由于某种原因,目录:

C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5

Was missing on my build server.在我的构建服务器上丢失了。 I copied it from my local machine and everything started to work.我从我的本地机器上复制了它,一切都开始工作了。

I was experiencing the same issue trying to configure VSTS.我在尝试配置 VSTS 时遇到了同样的问题。

SHFB: Error BE0071: Unable to locate information for the project framework version '.NET Framework 4.6.1' or a suitable redirected version on this system. SHFB:错误 BE0071:无法在此系统上找到项目框架版本“.NET Framework 4.6.1”或合适的重定向版本的信息。 See error number help topic for details.有关详细信息,请参阅错误编号帮助主题。

The LastBuild.log showed that it was not finding the .NETFramework folder. LastBuild.log 显示它没有找到 .NETFramework 文件夹。

Finding tools...
The Sandcastle tools are located in 'd:\a\1\s\packages\EWSoftware.SHFB.2017.1.28.0\Tools\'
The SHFBROOT system environment variable was not found.  This variable is usually created during installation and may require a reboot.  It has been defined temporarily for this process as: SHFBROOT=d:\a\1\s\packages\EWSoftware.SHFB.2017.1.28.0\Tools\
Locating components in the following folder(s):
    d:\a\1\s\Documentation\Project.Docs
    C:\ProgramData\EWSoftware\Sandcastle Help File Builder\Components and Plug-Ins\
    d:\a\1\s\packages\EWSoftware.SHFB.2017.1.28.0\Tools\
    Last step completed in 00:00:00.0360

I ended up setting the Project-specific components path in the project properties to point to the SHFB .NET Framework package and this solved the problem.我最终在项目属性中设置了特定项目的组件路径以指向 SHFB .NET Framework 包,这解决了问题。

For me this message occurred after I had installed the Sandcastle Help File Builder application on our build server, but the build logs were complaining that the SHFBROOT environment variable wasn't found, but I had configured an override in the Help File Builder project which the build log said it would use instead.对我来说,这条消息是在我的构建服务器上安装 Sandcastle Help File Builder 应用程序之后出现的,但是构建日志抱怨找不到 SHFBROOT 环境变量,但是我在 Help File Builder 项目中配置了一个覆盖构建日志说它会改用。

   <PropertyGroup>
    <!-- NOTE: Update the version number in the path (YYYY.M.D.R) to match the package version -->
    <SHFBROOT Condition=" '$(SHFBROOT)' == '' ">$(MSBuildThisFileDirectory)\..\packages\EWSoftware.SHFB.2017.1.28.0\tools\</SHFBROOT>
   </PropertyGroup>

The above setting didn't help me on the build server however and it was still failing (but not locally).但是,上述设置在构建服务器上对我没有帮助,并且仍然失败(但不是本地)。

What did work for my case was a reboot of our build server.对我的案例有用的是重新启动我们的构建服务器。

A fairly obvious oversight on my part, as I expect this is somewhere in the help documentation that I may have initially missed.对我来说,这是一个相当明显的疏忽,因为我希望这是我最初可能错过的帮助文档中的某个地方。

I had this related issue with running it on the build server: BE0071: Unable to locate information for the project framework version 'XXXX'我在构建服务器上运行它时遇到了这个相关问题: BE0071:无法找到项目框架版本“XXXX”的信息

Cause原因

The build engine was unable to locate framework information for the version specified in the project's FrameworkVersion property.构建引擎无法找到项目的FrameworkVersion属性中指定的版本的框架信息。 An attempt was made to redirect usage to a later version but none were found.尝试将使用重定向到更高版本,但没有找到。

Solution解决方案

This can happen if you select a framework that is not installed on the system.如果您选择未安装在系统上的框架,就会发生这种情况。 For example, choosing an earlier version of the Silverlight framework.例如,选择早期版本的 Silverlight 框架。 If the earlier version is not found, the build engine will attempt to redirect usage to a later version of the framework if one can be found on the system.如果未找到较早版本,则构建引擎将尝试将使用重定向到框架的较新版本(如果可以在系统上找到)。 If the specified version or a later version cannot be found, you will need to install the selected or later version of the framework specified in the project on the system.如果找不到指定版本或更高版本,则需要在系统上安装项目中指定的选定或更高版本的框架。

The framework assemblies are searched for in the Reference Assemblies folder ( %ProgramFiles(x86)%\\Reference Assemblies\\Microsoft\\Framework ).在参考程序集文件夹 ( %ProgramFiles(x86)%\\Reference Assemblies\\Microsoft\\Framework ) 中搜索框架程序集。 If you have not installed a version of Visual Studio related to the indicated framework version or the related targeting pack, the reference assemblies may not exist there.如果您尚未安装与指示的框架版本或相关目标包相关的 Visual Studio 版本,则参考程序集可能不存在。 The simplest solution is to download and install the appropriatetargeting pack or copy the reference assemblies from another system that does have them.最简单的解决方案是下载并安装适当的目标包,或从其他具有参考程序集的系统复制参考程序集。

If using the Sandcastle Help File Builder NuGet package , it may mean that you need to install one or more of the help file builder Reflection Data Set packages which contain the necessary files.如果使用 Sandcastle 帮助文件生成器NuGet 包,则可能意味着您需要安装一个或多个包含必要文件的帮助文件生成器反射数据集包。 If multiple versions of the platform package exist, install the latest release as it will cover all prior releases as well.如果平台包存在多个版本,请安装最新版本,因为它也将涵盖所有以前的版本。 Be sure to set the project's Component Path project property to the packages folder if it is not under the help file build project folder.如果它不在帮助文件构建项目文件夹下,请确保将项目的Component Path项目属性设置为包文件夹。 Once installed and the component path is set, you may need to close and reopen the project in order for it to detect the newly installed files.安装并设置组件路径后,您可能需要关闭并重新打开项目,以便它检测新安装的文件。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM