Here is a easy way to include the web.config file from your MOSS site into your Visual Studio feature project.
I learned this a while back but never really had a use for it until now. For me, this makes it easier to access the config file to add AppSetting keys and what not.
- Right-click on your feature project file and select Add Existing Item.
- Navigate to your website folder (Typically C:\Inetpub\wwwroot\wss\VirtualDirectories\80)
- Select the web.config file.
- Before clicking "Add", click on the arrow at the right of the button and select "Add as Link"
This method creates a link to the web.config and not a copy. So any changes you make will be made in the actual config file of the server.
Remember that this is only for fiddling around in your development environment. When its time to actually make permanent changes, use SPWebConfigModification so that changes are propagated throughout your farm (see this post by Mark Wagner).
0 comments:
Post a Comment