EWSoftware / SHFB

Sandcastle Help File Builder (SHFB). A standalone GUI, Visual Studio integration package, and MSBuild tasks providing full configuration and extensibility for building help files with the Sandcastle tools.
Other
2.19k stars 367 forks source link

Referencing IWshRuntimeLibrary causes build to fail #613

Closed MuminKhan closed 6 years ago

MuminKhan commented 6 years ago

If you have a reference to IWshRuntimeLibrary in your project, MSBuild bombs out. This is similar to #397

References to include (excluding framework assemblies):
    IWshRuntimeLibrary
    MySql.Data
SHFB: Warning BE0062: No documentation source XML comments files found.  The help file will not contain any member comments.
-------------------------------
Generating shared content files (en-US, English (United States))...
    Last step completed in 00:00:00.0111
-------------------------------
Generating API filter for MRefBuilder...
    Last step completed in 00:00:00.0000
-------------------------------
Generating reflection information...
[C:\Program Files (x86)\MSBuild\14.0\bin\amd64\MSBuild.exe - GenerateRefInfo.proj]
Build started 6/6/2018 3:10:57 PM.
Project "C:\Users\USER\Documents\GitHub\PROJECT-Docs\Help\Working\GenerateRefInfo.proj" on node 1 (default targets).
PrepareForBuild:
  Creating directory "obj\Debug\".
C:\Program Files (x86)\MSBuild\14.0\bin\amd64\Microsoft.Common.CurrentVersion.targets(2398,5): error MSB3091: Task failed because "AxImp.exe" was not found, or the correct Microsoft Windows SDK is not installed. The task is looking for "AxImp.exe" in the "bin" subdirectory beneath the location specified in the InstallationFolder value of the registry key HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SDKs\NETFXSDK\4.6\WinSDK-NetFx40Tools-x86. You may be able to solve the problem by doing one of the following:  1) Install the Microsoft Windows SDK.  2) Install Visual Studio 2010.  3) Manually set the above registry key to the correct location.  4) Pass the correct location into the "ToolPath" parameter of the task. [C:\Users\USER\Documents\GitHub\PROJECT-Docs\Help\Working\GenerateRefInfo.proj]
Done Building Project "C:\Users\USER\Documents\GitHub\PROJECT-Docs\Help\Working\GenerateRefInfo.proj" (default targets) -- FAILED.

Build FAILED.

Time Elapsed 00:00:00.23
    Last step completed in 00:00:00.4218
-------------------------------

SHFB: Error BE0043: Unexpected error detected in last build step.  See build log for details.
   at SandcastleBuilder.Utils.BuildEngine.TaskRunner.Run(String processFilename, String targetFile, String arguments)
   at SandcastleBuilder.Utils.BuildEngine.BuildProcess.Build()

xmlns="http://schemas.microsoft.com/developer/msbuild/2003">

EWSoftware commented 6 years ago

As with the reference issue, I am unable to duplicate this. Can you supply an example that does?

MuminKhan commented 6 years ago

Sorry it took so long. Removing the Windows Script Host Object Model (IWshRuntimeLibrary) reference resolves the issue. Re-adding it causes it to break again.

Project.zip

EWSoftware commented 6 years ago

Sorry, but as with the last time, the sample project works for me. There is more likely than not a difference in the set of SDKs or perhaps tool paths that is causing it to not be able to find AxImp.exe. The error message gives some detailed information about causes and potential solutions so that's the place to start.

You say that removing the reference gets it work work. If that's the case, you an probably just reference the assembly and XML comments file as the documenation sources rather than the solution. In that case it wouldn't look for the reference either and thus should build. If it does fail due to a missing reference exception, you can use the Assembly Binding Redirection plug-in to ignore it.