web.config contains assembly references that are automaticlly added. Why and how to solve?

I am sure that you came across the situation that while you work on a website and have multiple projects (that contain references to assemblies in the GAC) in the solution, when you compile for the first time you see many assemblies added to the web.config that you didn't add.

So you were probably asking your self why and tried to fixed it but failed.
Well after discussing this issue with few people in Microsoft that this is the behaviour - all the references of the project that are found in the GAC (including dependencies) will be added to the web.config - If you are asking me that i have no clue for the reason to do so.

Well guess what there is a workaround: If you go into the registry into HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\8.0\Projects\{E24C65DC-7377-472B-9ABA-BC803B73C61A}\FilteredGACReferences, you will see a list of GAC references as keys that will not be copied into your web config if they are dependencies of references in your client project.
So the solution is easy just add the name of the assembly that you don't want to enter the web.config as a key.

There is another solution - to use the web deployment project and have a replacement section for Release.

Home you can use this information in your project.
Special thanks to John Dundon, Scott Guthrie.
web.config contains assembly references that are automaticlly added. Why and how to solve? web.config contains assembly references that are automaticlly added. Why and how to solve? Reviewed by Ran Davidovitz on 8:39 AM Rating: 5

1 comment:

wow power leveling said...

However mean your gold in wow life is,buy wow gold meet it and live it ;wow gold cheap do not shun it and call it hard names.It is not so bad as you are.It looks poorest when you are richest.The fault-finder will find faults in paradise.wow gold kaufen love your life,poor as it is.maple meso You may perhaps have some pleasant,thrilling,maplestory power leveling glorious hourss,even in a poor-house.The setting sun is reflected from the windows of the alms-house as brightly as from the rich man's abode;the snow melts before its door as early in the spring.sell wow gold I do not see but a quiet mind may live as contentedly there,cheap mesos and have as cheering thoughts,as in a palace.The town's poor seem to me often to live the most independent lives of any.May be they are simply great enough to billig wow gold receive without misgiving.Most think that they are above being supported by the town;powerlevel but it often happens that buy maplestory mesos they are not above supporting themselves by dishonest means.which should be more disreputable.Cultivate poverty like a garden herb,like sage.Do not trouble wow powerleveln yourself much to get new things,maple mesos whether clothes or friends

Powered by Blogger.