Develop in .NET 3.5...Deploy on .NET 3.0...Assembly strong name issue in web.config


Hi. I develop locally using web developer express 2008. I have .NET 3.5 installed on the development machine.
I am trying to deploy to a Windows Server 2003 machine running.NET 3.0.
Not surprisingly, I get an error about the strong assembly names referenced all over my web.config when I try to access the site on the production server.
I don't think any of my code truly relies on .NET 3.5--it should all be compatible with the 3.0 framework.
Here's my error message:
Parser Error Message: Could not load file or assembly 'System.Core, Version=3.5.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' or one of its dependencies. The system cannot find the file specified.
 
 
What's a solution to my problem? I'm not sure I can get 3.5 installed on the production server, and I'd rather not install 3.0 on my local development machine, but will if I have to. Do the strong .NET assembly names have to be used in web.config? Web Developer Express automatically created my web.config file, so I don't know much about how it works.
 
Thanks,
Duluter
0
duluter
1/11/2009 8:27:13 PM
📁 asp.net.config-deploy
📃 12495 articles.
⭐ 0 followers.

💬 1 Replies
👁️‍🗨️ 1977 Views



If you are unable to install .NET 3.5 on your production server, then you will need to use 3.0.  However, you need to understand how these versions work.
Versions 3.0 and 3.5 are merely layers on top of the 2.0 Framework.  They are serve to replace those libraries that have been added or updated since version 2.0.  In fact, when configuring IIS, you would configure it for 2.0 for 2.0, 3.0, and 3.5.
Now, the other special feature is that VS 2008 (including VWD 2008 Express) has the capability of using any of these versions.  With your application opened, go to the Solution Explorer, right click on the solution/file path and select Property Pages at the bottom of the menu.  In the Property Pages dialog, select the Build page.  On this page, you will see the Target Framework option.  You can configure this to use .NET Framework 2.0, 3.0, or 3.5.  If your production system is not accepting version 3.5, then set your application to 3.0 and then update your application on the server.
As for "I don't think any of my code truly relies on .NET 3.5--it should all be compatible with the 3.0 framework", well, that's not exactly correct.  Any new features introduced by version 3.0 but were not updated in version 3.5 will not be available.  Again, versions 3.0 and 3.5 only contain those libraries that have been added or updated; the bulk of the Framework is still in version 2.0.  So, since 3.0 and 3.5 are layers, to ensure that 3.5 works completely, you need to have the 3.0 layer in place.

Christopher Reed
"The oxen are slow, but the earth is patient."
0
Careed
1/12/2009 1:54:17 AM
Reply: