Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
736 views
in Technique[技术] by (71.8m points)

visual studio 2010 - Is it necessary for the build machine to have Microsoft Office 2007 installed?

Our app added functionality to allow users to import certain information from an excel spreadsheet (all users will have Office 2007 already).

The development machine has Office 2007 and the developer added a reference to Microsoft.Office.Interop.Excel - all was good.

However, the build machine does not have Office 2007 installed. When the build is run on the build machine, we get the following build error: "The type or namespace name 'Office' does not exist in the namespace 'Microsoft' (are you missing an assembly reference?)"

I did download the Office 2007 Primary Interop Assemblies redistributable. But when I run that msi on the build machine, I get a messagebox saying "Please Install Microsoft Office 2007 before installing this product"

Is it really necessary to install Office 2007 on the build machine? Is there some other way around this?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

Make sure the Microsoft.Office.Interop.Excel assembly is checked-in with the source code and the VS project is referencing it from the source tree and not from GAC.

After that is done, surely you do not need MS Office to be installed on the build machine, but you would need it for the application to run.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...