I came across an interesting problem the other day. I had installed WCSF 2.0 and Enterprise Library 4.1 on my computer about a week or so ago. I installed 4.1 instead of 3.1 since it was newer and figured it would probably be a lot better as well.
After installing them on top of Visual Studio 2008 SP1, I did the following:
- Start Visual Studio 2008 SP1. You must have already installed WCSF 2 and ent lib 4.1 for this to work.
- Go to file, then New, and click project…
- In the new project dialog box, expand Guidance packages, click Web Client Software February 2008 and then click the website or web application solution for your programming language.
- In the name box, type a name for the solution. This will also become the name of the website or web application project.
- On the web solution recipe dialog box, uncheck the box to show documentation when finished and then click finish.
- When the project is created, scroll to the web.config in the website/web application project, right click, and click Edit Enterprise Library configuration.
- Make some changes. I added an exception handling block.
- Press control shift v to validate the configuration settings.
- On the web.config file, right click and click close application. This will attempt to save the settings you just made.
- An unknown error will show up telling you that you can’t save the settings.
- Close out of the error windows and the save as dialog.
- If the errors list isn’t showing, bring it into view. Notice the errors in the list.
- Close out of the Enterprise Library settings without saving.
These errors reference version 3.1 not 4.1. I didn’t realize this until yesterday. Now comes the interesting part. Trying to fix it. I went on a search to see of I could find a way to do this. I found this article. It explains how to update WCSF 2.0 to use Enterprise Library 4.0. You can use it to update to 4.1 as well. All you have to do is reference Version=4.1.0.0 instead of Version=4.0.0.0. Just be careful to leave the Culture and PublicKeyTokens as they are in the 4.0.0.0 references. Let me know how this turned out for you.