Office/Stdole getting added to web.config automatically
Question posted by: SJ
(Guest)
on
March 8th, 2006 03:25 PM
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.
5
Answers Posted
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.
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.
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.
Hi,
I have posted a resolution to this issue at my blog .
Please post a comment re: whether my resolution works for you, of if you have questions/suggestions.
Quote:
Originally Posted by ChrisFalter
Hi,
I have posted a resolution to this issue at my blog .
Please post a comment re: whether my resolution works for you, of if you have questions/suggestions.
I should have noted that my blog post also explains in some detail why VS 2005 adds the lines to web.config.
|
|
|
What is Bytes?
We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights.
Get the best answers to your questions from over 196,935 network members.
Top Community Contributors
|