Solved

Make aspnet_compiler use 3.5 framework

Posted on 2011-02-25
6
655 Views
Last Modified: 2012-05-11
Hello,

I have an app that uses the MSBuild task, which calls aspnet_compiler which then spawns csc.exe. On my local machine, which is WinXP SP3 with .NET 2.0 & 3.5 & MS Visual Studio 2008, aspnet_compiler correctly spawns csc.exe from the 3.5 framework. However, on the production server, which is Win 2008 with both .NET 2.0 & 3.5 installed, it spawns csc.exe v 2.0, which gives a lot of compile errors. Note that I'm just running the aspnet_compiler from an NANT script to compile & merge the app to a DLL to be deployed later, not deploying it to the IIS. Is there anything I can do for using the 3.5 framework? Also, I looked into IIS config and the 3.5 framework is not listed there at all as an option to use. There's just 2.0 or no managed code.
0
Comment
Question by:bovlk
  • 3
  • 3
6 Comments
 
LVL 9

Expert Comment

by:rawinnlnx9
Comment Utility
In the VS IDE go to the Website menu and select "Start Options" in the new dialog click on the 'Build' to the left and then you will see drop downs that let you choose the framework.
0
 
LVL 9

Expert Comment

by:rawinnlnx9
Comment Utility
See here:

 Build Options
0
 
LVL 9

Expert Comment

by:rawinnlnx9
Comment Utility
Oh, I missed something key in your post. The reason 3.5 is not visible in IIS on the server is that the .Net Framework 3.5 runtimes are not installed on the web server.

http://www.microsoft.com/downloads/en/details.aspx?FamilyId=333325fd-ae52-4e35-b531-508d977d32a6&displaylang=en
0
Complete Microsoft Windows PC® & Mac Backup

Backup and recovery solutions to protect all your PCs & Mac– on-premises or in remote locations. Acronis backs up entire PC or Mac with patented reliable disk imaging technology and you will be able to restore workstations to a new, dissimilar hardware in minutes.

 

Author Comment

by:bovlk
Comment Utility
No no, the 3.5 SP1 framework is installed at the server, as the appropriate control panel says. The files are present in the appropriate subdir of c:\windows. The option you talk about is set in my project and the project compiles just fine on my local XP. But it does not compile on the server. Forgot to mention that there's no VS on the server.
0
 

Accepted Solution

by:
bovlk earned 0 total points
Comment Utility
Well, this was a really hard and stupid problem. The copy at the server had missing web.config. A long history why it happened. The compiler version to use is set up in this file. So if it was missing, the default (2.0) was used.
0
 

Author Closing Comment

by:bovlk
Comment Utility
It was the actual reason for this problem
0

Featured Post

What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Scenario:  You do full backups to a internal hard drive in either product (SBS or Server 2008).  All goes well for a very long time.  One day, backups begin to fail with a message that the disk is full.  Your disk contains many, many more backups th…
I had a question today where the user wanted to know how to delete an SSL Certificate, so I thought that I would quickly add this How to! Article for your reference. WHY WOULD YOU WANT TO DELETE A CERTIFICATE? 1. If an incorrect certificate was …
This tutorial will show how to push an installation of Backup Exec to an additional server in both 2012 and 2014 versions of the software. Click on the Backup Exec button in the upper left corner. From here, select Installation and Licensing, then I…
This tutorial will walk an individual through the steps necessary to install and configure the Windows Server Backup Utility. Directly connect an external storage device such as a USB drive, or CD\DVD burner: If the device is a USB drive, ensure i…

728 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now