Visual Studio Developer Center >
Visual Studio Forums
>
Visual Studio Tools for Office
>
Building VSTO projects on Windows Server 2008 R2?
Building VSTO projects on Windows Server 2008 R2?
- I'm having trouble building a pre-existing Visual Studio 2008 C# VSTO project on a new Windows Server 2008 R2 system. This same project (files checked out of VCS) are being built by many other developers on a wide range of systems, although no one has used 2008 R2 yet, which is why I suspect that is the issue.The error is on this line:using Microsoft.Office.Tools.Excel.Extensions;"The type or namespace name 'Extensions' does not exist in the namespace 'Microsoft.Office.Tools.Excel' (are you missing an assembly reference?)"All the VSTO project references seem to be working perfectly and all the other VSTO namespaces are working fine.On my Windows Server 2008 R1 system that is able to build this project, the Project Reference "Microsoft.Office.Tools.Excel.v9.0" contains the following namespaces according to Visual Studio ClassView:Microsoft.Office.ToolsMicrosoft.Office.Tools.ExcelMicrosoft.Office.Tools.Excel.ControlsMicrosoft.Office.Tools.Excel.ExtensionsOn my Windows Server 2008 R2 system, the same project reference only has the first three namespaces and does not contain the "Extensions" namespace.On both systems, the Path to that Project Reference is the same:C:\Program Files (x86)\Reference Assemblies\Microsoft\VSTO\v9.0\Microsoft.Office.Tools.Excel.v9.0.dllThey have different file sizes/dates although I'm not sure if that is significant.Windows Server 2008 R1 file:07/29/2008 02:23 PM 438,272 Microsoft.Office.Tools.Excel.v9.0.dllWindows Server 2008 R2 file:11/07/2007 11:40 AM 479,232 Microsoft.Office.Tools.Excel.v9.0.dllOn forum searches, I've read other people recommend installing VSTO PowerToolsbut that didn't do anything (nor do I remember doing that on my 2008 R1system which doesn't have this problem)Has anyone been able to successfully reference that namespace on a WindowsServer 2008 R2 development system?Does anyone have any other ideas?Thanks!
Answers
- Perhaps you need to install the Visual Studio Tools for the Office System Power Tools (http://msdn.microsoft.com/en-us/library/cc626294.aspx) as sugested here: http://social.msdn.microsoft.com/Forums/en-SG/innovateonoffice/thread/44ee2ddc-1777-4419-891c-adb731311717.
- Marked As Answer byEvaristo9 Monday, November 02, 2009 10:08 PM
- I tried Office Power Tools and said so in the original post and that didn't help.
However, I tried Visual Studio 2008 SP1 (based on the thread you linked) and that completely fixed it... Arg, I've been going crazy trying to figure this out, I can't believe it is something so simple. That service pack is not auto installed by Windows Update; you must know about it and remember to manually install it. I wouldn't have guessed that an IDE service pack would change an API like this.- Marked As Answer byEvaristo9 Monday, November 02, 2009 10:08 PM
All Replies
Have you installed the Office Interop assemblies? Are you missing Microsoft.Office.Interop.Excel.Extensions.dll?
Have you installed the Office Interop assemblies? Are you missing Microsoft.Office.Interop.Excel.Extensions.dll?
I don't recall explicitly doing this on my 2008 R1 system that is successfully building. On that system I can do:
C:\>dir /s /b Microsoft*.Extensions.dll
File Not Found
So if that file isn't present on my system that is building, I don't think it is necessary.So if that file isn't present on my system that is building, I don't think it is necessary.
Why not install the Office Interop assemblies and give your build another try?
Office 2003: http://www.microsoft.com/downloads/details.aspx?familyid=3c9a983a-ac14-4125-8ba0-d36d67e0f4ad&displaylang=en
Office 2007: http://www.microsoft.com/downloads/details.aspx?familyid=59DAEBAA-BED4-4282-A28C-B864D8BFA513&displaylang=enWhy not install the Office Interop assemblies and give your build another try?
Tried it and it didn't help. Still doesn't build on Server 2008 R2.
Office 2003: http://www.microsoft.com/downloads/details.aspx?familyid=3c9a983a-ac14-4125-8ba0-d36d67e0f4ad&displaylang=en
Office 2007: http://www.microsoft.com/downloads/details.aspx?familyid=59DAEBAA-BED4-4282-A28C-B864D8BFA513&displaylang=en
Thanks for reply. I will try anything you can think of, BTW. I need to get this working.- Perhaps you need to install the Visual Studio Tools for the Office System Power Tools (http://msdn.microsoft.com/en-us/library/cc626294.aspx) as sugested here: http://social.msdn.microsoft.com/Forums/en-SG/innovateonoffice/thread/44ee2ddc-1777-4419-891c-adb731311717.
- Marked As Answer byEvaristo9 Monday, November 02, 2009 10:08 PM
- I tried Office Power Tools and said so in the original post and that didn't help.
However, I tried Visual Studio 2008 SP1 (based on the thread you linked) and that completely fixed it... Arg, I've been going crazy trying to figure this out, I can't believe it is something so simple. That service pack is not auto installed by Windows Update; you must know about it and remember to manually install it. I wouldn't have guessed that an IDE service pack would change an API like this.- Marked As Answer byEvaristo9 Monday, November 02, 2009 10:08 PM


