CommandLine problems

Topics: Bugs, Sandcastle
Jul 16, 2009 at 5:49 AM
Edited Jul 16, 2009 at 5:51 AM

I've been using DocProject from Visual Studio for a while now and has been working a treat. However, when I try to build the solution using either MSBuild or DevEnv I get build errors.

When using the command line:

 

devenv "somefolder/somesolution.sln" /build "Release|Any CPU"

 

I get the following errors in the Application Log:

 

An error occurred while initializing the DocProject Add-In.

System.Runtime.InteropServices.COMException (0x800A0001): Exception from HRESULT: 0x800A0001
   at EnvDTE80.Windows2.CreateToolWindow2(AddIn Addin, String Assembly, String Class, String Caption, String GuidPosition, Object& ControlObject)
   at DaveSexton.DocProject.DocProjectEnvironment.RegisterToolWindow(ToolWindow item)
   at DaveSexton.DocProject.ToolWindowCollection.InsertItem(Int32 index, ToolWindow item)
   at System.Collections.ObjectModel.Collection`1.Add(T item)
   at DaveSexton.DocProject.DocProjectEnvironment.InitializeVSExtensions()
   at DaveSexton.DocProject.DocProjectEnvironment.Initialize()
   at DaveSexton.DocProject.DocProjectEnvironment.Initialize(IEnvironmentHost hostUI)
   at DaveSexton.DocProject.DocProjectAddIn.Extensibility.IDTExtensibility2.OnStartupComplete

 

shortly followed by another error in the Application Log:

 

A fatal error occurred while building the project: c:\somefolder\somesolution.csproj.

System.ArgumentException: Value does not fall within the expected range.
   at EnvDTE.Windows.Item(Object index)
   at DaveSexton.DocProject.VSEnvironmentHost.get_BuildOutput()
   at DaveSexton.DocProject.VSEnvironmentHost.ShowTrace()
   at DaveSexton.DocProject.DocProjectEnvironment.ShowTrace()
   at DaveSexton.DocProject.Engine.BuildEngine`2.Build()
   at DaveSexton.DocProject.BuildController.Build(IDocProject project, BuildType buildType)
   at DaveSexton.DocProject.BuildController.Build(IDocProject project)
   at DaveSexton.DocProject.MSBuild.BuildDocProject.Execute()

 

 

Any ideas anyone?

Note:

- This is the same machine that can build the solution properly from the IDE.
- The DocProject Addin is enabled for Command Line
- This is a doc project for a CLR project.
- This is a windows 7 (x86) box, but also occurs on our build machine: a Win2003 Server (also 32bit)

 

Coordinator
Jul 16, 2009 at 5:12 PM

Hi,

Using devenv on the command-line is not a usage scenario that I've tested.  Have you tried using MSBuild instead?

How To Build Compiled Help With MSBuild
http://docproject.codeplex.com/Wiki/View.aspx?title=How%20To%20Build%20Compiled%20Help%20With%20MSBuild 

- Dave

Jul 16, 2009 at 10:42 PM
Edited Jul 16, 2009 at 10:45 PM

Hi Dave,

Yeah, I also tried that as phase II. Running "msbuild somefolder\somesolution.sln" ends up with this:

 

C:\Program Files\Dave Sexton\DocProject\bin\DaveSexton.DocProject.targets(40,5): error MSB4018: The "BuildDocProject" task failed unexpectedly.
C:\Program Files\Dave Sexton\DocProject\bin\DaveSexton.DocProject.targets(40,5): error MSB4018: System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.VisualStudio.VCProjectEngine, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified.
C:\Program Files\Dave Sexton\DocProject\bin\DaveSexton.DocProject.targets(40,5): error MSB4018: File name: 'Microsoft.VisualStudio.VCProjectEngine, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'
C:\Program Files\Dave Sexton\DocProject\bin\DaveSexton.DocProject.targets(40,5): error MSB4018:    at DaveSexton.DocProject.MSBuild.MSBuildVCProjectOutput..ctor(MSBuildVCSourceProject project)
C:\Program Files\Dave Sexton\DocProject\bin\DaveSexton.DocProject.targets(40,5): error MSB4018:    at DaveSexton.DocProject.MSBuild.MSBuildVCSourceProject.CreateOutput()
C:\Program Files\Dave Sexton\DocProject\bin\DaveSexton.DocProject.targets(40,5): error MSB4018:    at DaveSexton.DocProject.MSBuild.MSBuildAnyProject.get_Output()
C:\Program Files\Dave Sexton\DocProject\bin\DaveSexton.DocProject.targets(40,5): error MSB4018:    at DaveSexton.DocProject.MSBuild.MSBuildDocProject.get_AllSources()
C:\Program Files\Dave Sexton\DocProject\bin\DaveSexton.DocProject.targets(40,5): error MSB4018:    at DaveSexton.DocProject.Engine.BuildEngine`2.Build(BuildContext context)
C:\Program Files\Dave Sexton\DocProject\bin\DaveSexton.DocProject.targets(40,5): error MSB4018:    at DaveSexton.DocProject.MSBuild.BuildDocProject.Execute()
C:\Program Files\Dave Sexton\DocProject\bin\DaveSexton.DocProject.targets(40,5): error MSB4018:    at Microsoft.Build.BuildEngine.TaskEngine.ExecuteInstantiatedTask(EngineProxy engineProxy, ItemBucket bucket, TaskExecutionMode howToExecuteTask, ITask task, Boolean& taskResult)
C:\Program Files\Dave Sexton\DocProject\bin\DaveSexton.DocProject.targets(40,5): error MSB4018: 
C:\Program Files\Dave Sexton\DocProject\bin\DaveSexton.DocProject.targets(40,5): error MSB4018: WRN: Assembly binding logging is turned OFF.
C:\Program Files\Dave Sexton\DocProject\bin\DaveSexton.DocProject.targets(40,5): error MSB4018: To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1.
C:\Program Files\Dave Sexton\DocProject\bin\DaveSexton.DocProject.targets(40,5): error MSB4018: Note: There is some performance penalty associated with assembly bind failure logging.
C:\Program Files\Dave Sexton\DocProject\bin\DaveSexton.DocProject.targets(40,5): error MSB4018: To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog].
C:\Program Files\Dave Sexton\DocProject\bin\DaveSexton.DocProject.targets(40,5): error MSB4018: 

 

I presume this is merely a config issue...and ideas welcome :)

Thanks,

Craig.

 

[Edit] my path is currently:

D:\msdev9\Common7\IDE;D:\msdev9\VC\BIN;D:\msdev9\Common7\Tools;C:\Windows\Microsoft.NET\Framework\v3.5;C:\Windows\Microsoft.NET\Framework\v2.0.50727;D:\msdev9\VC\VCPackages;C:\Program Files\Microsoft SDKs\Windows\v6.0A\bin;d:\tools;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;[...snip]

 

Coordinator
Jul 18, 2009 at 8:18 PM

Hi Craig,

I'm not sure what the problem could be.  I can't even get past some other VC error "'9.00' violates enumeration constraint of '7.00, ...'" in my attempt to repro using MSBuild 3.5 and VS 2008.

You may want to try reinstalling DocProject.  If that doesn't work, consider reinstalling Visual Studio.

- Dave