Ureader.com  
Microsoft software help and Community
   home   |   control panel login   |   archive   |  
 
DotNet
acad.assignment.mngr
academic
adonet
aspnet
aspnet.announcements
aspnet.build.controls
aspnet.caching
aspnet.datagridcontrol
aspnet.mobile
aspnet.security
aspnet.webcontrols
aspnet.webservices
clr
compactframework
component_services
datatools
distributed_apps
drawing
faqs
framework
framework.wmi
general
internationalization
interop
languages.csharp
languages.jscript
languages.vb
languages.vb.controls
languages.vb.data
languages.vb.upgrade
languages.vc
languages.vc.libraries
myservices
odbcnet
performance
remoting
scripting
sdk
security
setup
vjsharp
vsa
webservi.enhancements
webservices
windowsforms
windowsforms.controls
winforms.databinding
winforms.designtime
xml
  
 
date: Thu, 31 Jul 2008 06:38:39 -0700 (PDT),    group: microsoft.public.dotnet.framework        back       


VS 2005 and .NET 3.0   
Could someone steer me in the right direction on setting up VS 2005
Pro to be able to create .NET 3.0 applications. And how to create 3.0
projects (Winforms, ASP.NET)
I've installed the
Visual Studio 2005 Extensions for Windows Workflow Foundation
but when I create a new project, I don't immediately see an option to
select what framework version it's based on.
Thanks!
date: Thu, 31 Jul 2008 06:38:39 -0700 (PDT)   author:   G.S.

Re: VS 2005 and .NET 3.0   
> I don't immediately see an option to
> select what framework version it's based on.
> Thanks!

There is no selector in 3.0; it just comes down to what references you 
use. If you use the 3.0 dlls (System.ServiceModel, System.IdentityModel, 
etc) then you have a 3.0 application; otherwise 2.0.

If you want it to be a bit slicker, you'll need to upgrade to VS2008.

Marc
date: Thu, 31 Jul 2008 15:55:11 +0100   author:   Marc Gravell

Re: VS 2005 and .NET 3.0   
> in 3.0
I meant in VS2005
date: Thu, 31 Jul 2008 16:01:05 +0100   author:   Marc Gravell

Re: VS 2005 and .NET 3.0   
On Jul 31, 11:01 am, Marc Gravell  wrote:
>  > in 3.0
> I meant in VS2005

Thank you!

Sory if that's not an accurate question, but what about C# laguagge
features that were introduced in 3.0?

I guess this all started when I tried to follow some code samples that
were not compiling... I thought they included 3.0 features, so I
wanted to crteated 3.0 Console App to run them...
Example:
struct MutableStruct
{
    public int Value { get; set; }

    public void SetValue(int newValue)
    {
        Value = newValue;
    }
}

(this is from Jon Skeet's http://csharpindepth.com/Articles/Chapter8/PropertiesMatter.aspx)

Would a reference to 3.0's System namespace do it? I guess I'll try
Thanks!
date: Thu, 31 Jul 2008 08:27:09 -0700 (PDT)   author:   G.S.

Re: VS 2005 and .NET 3.0   
On Jul 31, 11:27 am, "G.S."  wrote:
> On Jul 31, 11:01 am, Marc Gravell  wrote:
>
> >  > in 3.0
> > I meant in VS2005
>
> Thank you!
>
> Sory if that's not an accurate question, but what about C# laguagge
> features that were introduced in 3.0?
>
> I guess this all started when I tried to follow some code samples that
> were not compiling... I thought they included 3.0 features, so I
> wanted to crteated 3.0 Console App to run them...
> Example:
> struct MutableStruct
> {
>     public int Value { get; set; }
>
>     public void SetValue(int newValue)
>     {
>         Value = newValue;
>     }
>
> }
>
> (this is from Jon Skeet'shttp://csharpindepth.com/Articles/Chapter8/PropertiesMatter.aspx)
>
> Would a reference to 3.0's System namespace do it? I guess I'll try
> Thanks!

Well, 2.0 is the only "System" dll that I can find...
I'd appreciate any light on the above "mistery" :)
date: Thu, 31 Jul 2008 08:30:34 -0700 (PDT)   author:   G.S.

Re: VS 2005 and .NET 3.0   
First 3.0 and 3.5 is basically 2.0 with new capabilities brought into new 
assemblies. In particular a 3.0 or 3.5 application stills runs with a 2.0 
Common Language Runtime... So there is no 3.0 or  3.5 System.dll.

Then most of the new language features are compiler enhancements so :
- you need to use VS 2008 to use the new compiler
- even if you target 2.0 alone, you can still use most of those new language 
features as they are just compiler tricks i.e. the generated code is the 
same than previously, it's just the compiler that does a bit more work for 
you with those new syntactic additions...

--
Patrice


"G.S."  a écrit dans le message de groupe de discussion 
: 2e3e25bd-f416-44d1-9d85-09cbcc980cc9@e53g2000hsa.googlegroups.com...
> On Jul 31, 11:27 am, "G.S."  wrote:
>> On Jul 31, 11:01 am, Marc Gravell  wrote:
>>
>> > > in 3.0
>> > I meant in VS2005
>>
>> Thank you!
>>
>> Sory if that's not an accurate question, but what about C# laguagge
>> features that were introduced in 3.0?
>>
>> I guess this all started when I tried to follow some code samples that
>> were not compiling... I thought they included 3.0 features, so I
>> wanted to crteated 3.0 Console App to run them...
>> Example:
>> struct MutableStruct
>> {
>> public int Value { get; set; }
>>
>> public void SetValue(int newValue)
>> {
>> Value = newValue;
>> }
>>
>> }
>>
>> (this is from Jon 
>> Skeet'shttp://csharpindepth.com/Articles/Chapter8/PropertiesMatter.aspx)
>>
>> Would a reference to 3.0's System namespace do it? I guess I'll try
>> Thanks!
>
> Well, 2.0 is the only "System" dll that I can find...
> I'd appreciate any light on the above "mistery" :)
date: Thu, 31 Jul 2008 19:05:12 +0200   author:   Patrice http://www.chez.com/scribe/

Re: VS 2005 and .NET 3.0   
On Jul 31, 1:05 pm, "Patrice" <http://www.chez.com/scribe/> wrote:
> First 3.0 and 3.5 is basically 2.0 with new capabilities brought into new
> assemblies. In particular a 3.0 or 3.5 application stills runs with a 2.0
> Common Language Runtime... So there is no 3.0 or  3.5 System.dll.
>
> Then most of the new language features are compiler enhancements so :
> - you need to use VS 2008 to use the new compiler
> - even if you target 2.0 alone, you can still use most of those new language
> features as they are just compiler tricks i.e. the generated code is the
> same than previously, it's just the compiler that does a bit more work for
> you with those new syntactic additions...
>
> --
> Patrice
>


Thanks Patrice. I guess I was typing while you posted your comments.
date: Thu, 31 Jul 2008 10:13:28 -0700 (PDT)   author:   G.S.

Re: VS 2005 and .NET 3.0   
I'm familiar with the book ;-p

No; VS2005 can only use the C# 2 compiler. VS2008 only uses the C# 3 
compiler. However, you can use the 3.5 version of MSBuild (or csc) at 
the command line to compile the code.

There is a big difference between the *language* C# 3 vs C# 2, and the 
framework (1.1 / 2.0 / 3.0 / 3.5), and the runtime (1.1 / 2.0).

In this case, Jon is using C# 3 language features, so you cannot use 
VS2005; or: you need to change it to C# 2, which isn't huge:

struct MutableStruct
{
     private int _value; // _ to avoid confusion with
                         // value contextual keyword
     public int Value {
       get { return _value; }
       set { _value = value; }
     }

     public void SetValue(int newValue)
     {
         Value = newValue;
     }
}

Marc
date: Fri, 01 Aug 2008 10:22:02 +0100   author:   Marc Gravell

Re: VS 2005 and .NET 3.0   
One other thought; download the express edition of VS2008:

http://www.microsoft.com/express/vcsharp/

It is free, and will do everything you want.

Marc
date: Fri, 01 Aug 2008 10:29:20 +0100   author:   Marc Gravell

Google
 
Web ureader.com


    COPYRIGHT 2007, YARDI TECHNOLOGY LIMITED, ALL RIGHT RESERVE  |   contact us