Office/Stdole getting added to web.config automatically

S

SJ

I have a VS2005 solution that has a class library and a website.
Website has a project reference to the class library in the solution.
Whenever I try to build the solution the following two lines get added
in web.config as part of the compilation process. These lines get
added right after class library is compiled and just before website
starts compiling. Because of this I am unable to publish the website on

machines that dont have these dlls even though the website doesnt
depend on them.

<add assembly="Office, Version=7.0.3300.0, Culture=neutral,
PublicKeyToken=B03F5F7F11D50A3A"/>
<add assembly="stdole, Version=7.0.3300.0, Culture=neutral,
PublicKeyToken=B03F5F7F11D50A3A"/>


The class library has the following dependencies none of which look
like they need these two entreis - System, System.Configuration,
System.Data, System.EnterpriseServices, System.Web,
System.Web.Services, System.Xml.


Any help is highly appreciated. Thanks.
 
G

George

This was happening on a co-worker's machine. It was a fresh build.
What I ended up doing, was to create an empty html page on the desktop.
Right-click and Open With VS 2005 and set it as the default. Word was
the default editor prior. After that, the entries weren't created.
Lucky guess - hopefully it will work for you. Please post if it does
work so others will find the answer as well.
 
S

SJ

Thanks for replying to this post. Unfortunately this fix didnt solve my
problem. Even after setting VS2005 as the default editor for html,
compiler tries to modify web.config with stdole/office entries.
 
D

david.iorlano

I too am having this problem. A reference to stdole is being added to
my references when compiling (No office reference is being added - Do
you by any chance reference an assembly that uses an office
component?).
I have resolved the problem (of it not running on the server due to not
being able to locate this reference) by simply deleting this line from
my web config after deployment.
<add assembly="stdole, Version=7.0.3300.0, Culture=neutral,
PublicKeyToken=B03F5F7F11D50A3A"/>

Not ideal, but at least gets you going.

I would love to know why VS 2005 is adding references to your project
that aren't required.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top