Wrox Programmer Forums
|
Visual Studio 2005 For discussing Visual Studio 2005. Please post code questions about a specific language (C#, VB, ASP.NET, etc) in the correct language forum instead.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Visual Studio 2005 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old December 5th, 2007, 07:12 PM
Registered User
 
Join Date: Dec 2007
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default Compile an application for .Net 1.0

Dear readers,

this may be a rather stupid question since i'm not very experienced with the .Net framework.

I installed Version 1.0, 1.1 and 2.0 of the framework on my machine, and am working with Visual Studio 2005. I compiled the sources of an application with VS that was written for .Net 1.0 and it works fine on my machine under .Net 2.0.

The application has to run on another machine with only .Net Version 1.0, but it does not work. Most probably I made changes to the source not compatible with .Net 1.0.

My Question is, if there is a way to *force* VS to compile the application for Version 1.0 or any other way for me to recognize, if my binaries are 1.0 compatible.

Thank's for your help,

SM
 
Old December 5th, 2007, 08:17 PM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Hi there,

Not with VS 2005. It can't produce 1.0 or 1.1 compatible assemblies.

You need VS 2002 (or 2003 if you want to compile for 1.1) or the SDK to compile at the command line.

Multi-targeting is introduced in VS 2008, but only targets 2.0, 3.0 and 3.5, not 1.x.

Cheers,

Imar
---------------------------------------
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Everyone is unique, except for me.
Author of ASP.NET 2.0 Instant Results and Beginning Dreamweaver MX / MX 2004
Want to be my colleague? Then check out this post.
 
Old December 5th, 2007, 09:20 PM
Registered User
 
Join Date: Dec 2007
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi Imar,

that's bad news...

Thank you!

 
Old December 6th, 2007, 01:13 AM
planoie's Avatar
Friend of Wrox
 
Join Date: Aug 2003
Posts: 5,407
Thanks: 0
Thanked 16 Times in 16 Posts
Default

Each framework comes with the compilers. You don't need to have the SDK just to compile an app. Look for the files csc.exe and vbc.exe in the framework directories. Here are example paths:

D:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\csc.e xe
D:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\jsc.e xe
D:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\vbc.e xe
D:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\vjc.e xe
D:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\csc. exe
D:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\jsc. exe
D:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\vbc. exe
D:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\vjc. exe
D:\WINDOWS\Microsoft.NET\Framework\v3.5\csc.exe
D:\WINDOWS\Microsoft.NET\Framework\v3.5\vbc.exe

One option you might have is to use a tool like NAnt to build your app. You can specify which framework to target and there are tools with it that can work with solution files and such. There's a learning curve, so you might be better off just finding VS2003 somewhere and building it with that.

-Peter
 
Old December 6th, 2007, 07:55 AM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Yep, Peter is correct; you don't need the SDK.

Is upgrading the .NET Framework on the target machine an option?

Imar
---------------------------------------
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Everyone is unique, except for me.
Author of ASP.NET 2.0 Instant Results and Beginning Dreamweaver MX / MX 2004
Want to be my colleague? Then check out this post.





Similar Threads
Thread Thread Starter Forum Replies Last Post
How to compile asp.net code using command prompt sandeep.kharat ASP.NET 2.0 Basics 0 April 8th, 2006 02:52 AM
how can I compile my first VB.Net Code? jojo VB.NET 2002/2003 Basics 3 September 17th, 2004 10:29 PM
Is .NET framework req. to install .NET application tact_259 VS.NET 2002/2003 2 May 20th, 2004 08:20 PM
Creating ASP.NET Application in Visual Studio.NET Maxood ASP.NET 1.0 and 1.1 Basics 1 March 8th, 2004 01:56 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.