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.
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?
Reviewed by Ran Davidovitz
on
8:39 AM
Rating:
No comments:
Post a Comment