DocProject Exception when building in Release Mode

Topics: Bugs, General Discussion, General Questions
Mar 31, 2008 at 5:30 PM
I have a Visual studio 2005 solution and one of the porject in that solution is my DocProject Documentation Project. The Documentation Project was created and added to the solution when the Configuration was set to Debug. The Solution compiles with no errors in debug mode and I get the resulted documentation. But, when I switch to Release configuration the DocProject Project fails to build the documentation and I get the following error:

System.InvalidOperationExcepttion was thrown while the build process was starting:

The registered build process component canot be instantiated because the DocProject did not produce assembly output:

D:\TestDoc\Documentation\Documentation.Project\bin\debug\Documentation.Project.dll

No Steps executed.

Documentation.Project help build failed.


Like I said this only occurs when I switch to Release mode. Notice it is looking in the debug folder. It still wants to look in the Debug folder for soem reason. I have checked everything and all the proejcet are configured for release/debug accordinly.

This also occurs if I use the standalone application outside visual studio to compile the documentation.

Any thoughts on what may be going on?

Thanks

Joe

Mar 31, 2008 at 6:19 PM
Hi Joe,

Are you using DocProject 1.10.1 RC? (That's the latest version.)

I only ask because that used to be a problem but it was eventually fixed.

- Dave
Mar 31, 2008 at 6:29 PM
Hi Joe,

I was able to reproduce this in 1.10.1 RC. I had to delete the assembly in the Debug folder manually to get the error.

A quick work-around is to build in Debug mode and cancel the help build immediately. Then you should be able to build in release mode since the BPC will be loaded from the previous debug build.

I'll do some more investigating as to the cause and get back to you.

Thanks,
Dave
Mar 31, 2008 at 7:07 PM
Hi Joe,

The problem is that DocProject is caching a reference to the active solution configuration when the DocProject is first loaded by the DocProject environment. If you close VS while it is in Release mode and then restart and open your solution, it should work as expected even without a Debug version of the assembly.

Note that this isn't a showstopper though unless you are using conditional compilation in the Build Process Component, which I'm assuming that you're not. The release and debug versions of the assembly produced by your DocProject project will most likely be identical, so my original work-around should be acceptable.

This bug does not have any effect on project references being used as sources to your DocProject. The correct assembly, debug or release, will be used automatically when you build your DocProject. You can verify this by looking at the input to the MRefBuilder utility, which is normally the second step of the build process.

Thanks for reporting the issue. I'll add a work item and have it fixed for the next release, which I had hoped to deploy today but I'm running way behind, like usual.

- Dave
Mar 31, 2008 at 7:09 PM
This discussion has been copied to a work item. Click here to go to the work item and continue the discussion.
Apr 2, 2008 at 11:12 PM
Hi,

You mentioned that this behavior was also occurring in the DocProject External UI, correct? But I can't reproduce this. When I deleted the debug and release assemblies for a DocProject and then loaded it into the external UI, changing it immediately to Release mode and building worked fine. The release version of the assembly was built first and then used to load the BPC.

What are the steps that I can take to reproduce this error in the external UI?

Thanks,
Dave