Problems compiling source - Build namespace not found

Dec 4, 2009 at 8:25 PM

I've having some difficulty compiling T4 Toolbox because the IDE can't seem to find Microsoft.Build.Engine.

I'm using VS 2010 Professional with TFS, but since I'm not a committer I just grabbed the source with TortoiseSVN.

When I load up the solution the Installer project's references for WixUtilExtension and WixVSExtension are flagged as missing. I remove those and add them from C:\Program Files (x86)\Windows Installer XML v 2.5\bin. All good.

In the T4Toolbox project the following references have the exclamation mark:

Microsoft.Build.Engine
Microsoft.VisualStudio.ExtensibilityHosting
Microsoft.VisualStudio.ExtensionManager
Microsoft.VisualStudio.TextTemplating.10.0
Microsoft.VisualStudio.TextTemplating.Interfaces.10.0
Microsoft.VisualStudio.VSHost.10.0

I remove the last three and add them from the GAC. Then I remove Microsoft.VisualStudio.ExtensibilityHosting or Microsoft.VisualStudio.ExtensionManager and add them from the VS 2010 PrivateAssemblies directory.

Now I'm down to just Microsoft.Build.Engine, which still has that dang exclamation mark. I remove it and add it back from the GAC (version 4.0.0.0, runtime v4.0.21006). But I still get the ! and I can't compile; I get an error on line 21 in DteProcessor.cs:

using MSBuild = Microsoft.Build.BuildEngine;

Error    103    The type or namespace name 'Build' does not exist in the namespace 'Microsoft' (are you missing an assembly reference?)    D:\dev\CS2010\T4Toolkit-svn\Source\DteProcessor.cs    21    31    T4Toolbox

Can anyone tell me what I'm missing here?

Many thanks.

Dave

 

Coordinator
Dec 5, 2009 at 8:15 PM

Dave,

Take a look at this: http://www.olegsych.com/2009/06/getting-and-compiling-t4-toolbox-source-code/. I have updated it today based on the recent changes made to support Visual Studio 2010. In particular section called Compiling T4Toolbox.csproj should provide some background about problems you are experiencing.

What are you trying to do with T4 Toolbox?

Thanks,
Oleg

Dec 6, 2009 at 12:26 AM

Thanks Oleg, I'll give that a try. Is Premium an absolute requirement? I have Professional installed right now, with TFS, so I do have batch build capabilities etc.

I have some questions/comments about the things I'd like to do with T4 Toolbox, but I suspect they'll make more sense once I've been able to compile and play with the code.

Dave

Coordinator
Dec 6, 2009 at 1:46 PM

We have static code analysis turned on, which I think required premium. You may be able to compile without it though.

Oleg