Help compiling source code

Nov 15, 2011 at 5:24 AM
Edited Nov 15, 2011 at 5:32 AM

Hi,

 

I've downloaded the latest source code but I'm having troubles getting it to compile.  First let me give you my env:

 

Windows 2003 OS

Office 2010

Visual Studio 2008 SP1

The latest version of NodeXL is installed on this same computer.

 

When I load the NodeXL.sln file in Visual Studio 2008 I get the following error:  "A compatible version of Microsoft Office is not installed on this computer.  You must install the version of Office that is compatible with your project....."

 

When I try to build I used to get 7 errors but I removed the UnitTest project and now I'm down to one error:  "The type or namespace name 'ExcelTemplate' does not exist in the namespace 'Smrf.NodeXL'  (are you missing an assembly reference?)

 

I'm trying to add additional algorithms and link coloring options,  so the work in VS2008 is warranted.

Nov 15, 2011 at 8:11 AM
Edited Nov 15, 2011 at 8:16 AM

Although the compiled ExcelTemplate project works in Excel 2010, it's actually an Excel 2007 project.  The error message is telling you that you need Excel 2007 on your development machine.

You have three options:

1. Try to figure out how to get the ExcelTemplate project to build with Office 2010 on your machine.  A coworker looked into this and concluded that it's not possible, but if you find otherwise, please let us know the fix.

2. Put Office 2007 on your development machine.

3. If you don't need the ExcelTemplate project, then remove it from the solution, along with the other projects that depend on it.  (The compiler will tell you which those are.)

-- Tony

Nov 15, 2011 at 11:17 PM

I was afraid you were going to say that.  I believe I need the template if I am going to add menu picks and visualizations along with new metric algorithms, correct?

 

Seeing as Microsoft does not support, much less sell or offer a download, do you know how I might be able to get a copy of 2007?  Is my only option to buy one from a 3rd-party vendor at this point in time?

 

Thanks,

Nick

Nov 16, 2011 at 1:51 AM

Tony,

 

Managed to find someon here who had an old copy I could have and thus am up and running.

 

However, I'm still getting errors when I try to build.  The latest is below:

 

ExcelTemplate -> C:\Documents and Settings\Administrator\Desktop\NodeXL\NodeXLSourceCode_1.0.1.194\NodeXL\ExcelTemplate\bin\Debug\Smrf.NodeXL.ExcelTemplate.dll
(if not exist C:\Documents and Settings\Administrator\Desktop\NodeXL\NodeXLSourceCode_1.0.1.194\NodeXL\ExcelTemplate\bin\Debug\PlugIns md C:\Documents and Settings\Administrator\Desktop\NodeXL\NodeXLSourceCode_1.0.1.194\NodeXL\ExcelTemplate\bin\Debug\PlugIns) && copy C:\Documents and Settings\Administrator\Desktop\NodeXL\NodeXLSourceCode_1.0.1.194\NodeXL\GraphDataProviders\bin\Debug\Smrf.NodeXL.GraphDataProviders.dll C:\Documents and Settings\Administrator\Desktop\NodeXL\NodeXLSourceCode_1.0.1.194\NodeXL\ExcelTemplate\bin\Debug\PlugIns
'and' is not recognized as an internal or external command,
operable program or batch file.
c:\WINDOWS\Microsoft.NET\Framework\v3.5\Microsoft.Common.targets(3397,13): error MSB3073: The command "(if not exist C:\Documents and Settings\Administrator\Desktop\NodeXL\NodeXLSourceCode_1.0.1.194\NodeXL\ExcelTemplate\bin\Debug\PlugIns md C:\Documents and Settings\Administrator\Desktop\NodeXL\NodeXLSourceCode_1.0.1.194\NodeXL\ExcelTemplate\bin\Debug\PlugIns) && copy C:\Documents and Settings\Administrator\Desktop\NodeXL\NodeXLSourceCode_1.0.1.194\NodeXL\GraphDataProviders\bin\Debug\Smrf.NodeXL.GraphDataProviders.dll C:\Documents and Settings\Administrator\Desktop\NodeXL\NodeXLSourceCode_1.0.1.194\NodeXL\ExcelTemplate\bin\Debug\PlugIns" exited with code 9009.
Done building project "ExcelTemplate.csproj" -- FAILED.

 

Any ideas?

 

Thanks,

Nick

Nov 16, 2011 at 2:02 AM

Nick:

There is a custom build step in the ExcelTemplate project that does some file copying.  It's failing on your machine because your path includes spaces (C:\Documents and Settings...), and I neglected to surround the folder variables in the build step with quotes to accommodate this.

Until I fix this, the temporary workaround is to move the solution to a folder that doesn't include spaces.

-- Tony

Nov 16, 2011 at 6:11 AM

Nick:

This will be fixed in versions 1.0.1.195 of NodeXL.  Thanks for reporting the bug.

If you want to fix it yourself before then, do this:

1. Right-click the ExcelTemplate project in Solution Explorer and select Properties.

2. On the Properties page, select the Build Events tab.

3. On the Build Events tab, overwrite the "Post-build event command line" with the following:

(if not exist "$(TargetDir)PlugIns" md "$(TargetDir)PlugIns") && copy "$(SolutionDir)GraphDataProviders\bin\Debug\Smrf.NodeXL.GraphDataProviders.dll" "$(TargetDir)PlugIns"

-- Tony