views:

716

answers:

4

When I created the project I'm trying to deploy I selected that I wanted to target .NET Framework 2.0. After deploying the project I try to brows to it and get and error page that shows:

<compilation debug="true">
    <assemblies>
        <add assembly="System.Web.Entity, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
        <add assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
        <add assembly="System.Core, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
    </assemblies>
</compilation>

One of the selling points of VS2008 is that you can develop for and deploy to server running .NET2.0 what Am I doing wrong?

+1  A: 

remove those references from your project and redeploy. if your project started as 3.5 it will still have references to some of those assemblies

Jimmy
for a quick fix, delete those 3 lines from your web.config :) if you're sure you don't use those assemblies
Jimmy
+1  A: 

If you're using features from the 3.5 framework, then you'll have to deploy to a 3.5 machine.

Most information you'd probably need for this issue is in the question and answers here: problems-executing-compiled-35-code-on-a-server-which-only-has-the-20-framework

Eric Tuttleman
+1  A: 

You are referencing assemblies of the .NET Framework 3.5, are you using EntityDataSources??

Remove those 3.5 references...

You also need the AJAX Extensions (System.Web.Extensions) for .NET 2.0 on the server.

CMS
+3  A: 

Right click on your project and select "Properties." From there, select the "Compile" tab and click the "Advanced Compile Options" button down at the bottom left. The last drop down list item should be "Target Framework" and you can select 2.0 from there. As mentioned above, this is provided you're not using any 3.5 related technologies such as LINQ.

Save, recompile and deploy. Once everything is set, you can go back and select the 3.5 option to target the 3.5 framework again.

Hope this helps!

Oh, one other thing to note. If you are using the AJAX Toolkit controls in your 3.5 application (calendar extender, auto-complete extender, etc.), you'll need to make sure you download the 1.0 Toolkit from the codeplex site since the 3.5 toolkit is not compatible with the 2.0 framework.

Dillie-O