Go Back   { mindfrost82.com } > Gadget Corner > Tech Newsgroups > Microsoft > .NET Framework

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 07-24-2008, 12:56 PM
....DotNet4Ever....
 
Posts: n/a
A framework confusion

I got a problem in one of my solutions and ran into something that I suppose
is what I think but I find the versioning a bit confusing.

I was trying the Add Reference in Visual Studio and noticed that it lists
both "Version" and "Runtime". Apparently the .NET Framework version is in
the "Version" but all of them (v2.0, v3.0 & v3.5) have the same runtime
"v2.0.50727" which maps to the
c:\windows\Microsoft.NET\Framework\v2.0.50727\

So, System.NET shows as follows:
System.Net 3.5.0.0 v2.0.50727 c:\Program Files\Reference
Assemblies\.....
System.Messaging 2.0.0.0 v2.0.50727 c:\Windows\Microsoft.NET\Fra....

why does the v3.5 framework DLL shows the same runtime as the v2.0 and v3.0
frameworks? and why is it in a different directory root (C:\Program
Files\Reference Assemblies\*) instead of the standard
C:\Windows\Microsoft.NET\Framework\v3.5\... ?

Shouldn't Visual Studio 2.5 not restrict itself to showing only Framework
2.0 assemblies?

Emilio

Reply With Quote
  #2 (permalink)  
Old 07-24-2008, 01:11 PM
Rory Becker
 
Posts: n/a
Re: A framework confusion

Hello ....DotNet4Ever....,

> So, System.NET shows as follows:
> System.Net 3.5.0.0 v2.0.50727 c:\Program Files\Reference Assemblies\.....
> System.Messaging 2.0.0.0 v2.0.50727 c:\Windows\Microsoft.NET\Fra....



> Why does the v3.5 framework DLL shows the same runtime as the v2.0 and
> v3.0 frameworks?


Becuase there is no 3.0 or 3.5 runtime. There are only 1.0, 1.1 and 2.0
runtimes.

> and why is it in a different directory root
> (C:\Program Files\Reference Assemblies\*) instead of the standard
> C:\Windows\Microsoft.NET\Framework\v3.5\... ?


No Idea. Presumably for organisational purposes.

> Shouldn't Visual Studio 2.5 not restrict itself to showing only
> Framework 2.0 assemblies?


Since VS2005 (I assume thats what you meant) uses assemblies that run on
the 2.0 runtime or below, all current assemblies are fair game.

--
Rory


Reply With Quote
  #3 (permalink)  
Old 07-24-2008, 01:51 PM
Cowboy \(Gregory A. Beamer\)
 
Posts: n/a
Re: A framework confusion

3.0 and 3.5 sit on top of 2.0, so there is no big deal here. All you will
find in the 3.x directories is extra stuff. Check it out yourself.

Not sure why one is referenced in one spot and not in the main spot. Most
likely someone was working with it from there and did not reset the link. As
long as it works, it is not a big deal.

--
Gregory A. Beamer
MVP, MCP: +I, SE, SD, DBA

Subscribe to my blog
http://gregorybeamer.spaces.live.com/lists/feed.rss

or just read it:
http://gregorybeamer.spaces.live.com/

********************************************
| Think outside the box! |
********************************************
"....DotNet4Ever...." <hate.spam@nowhere.com> wrote in message
news:uOvvpyY7IHA.3480@TK2MSFTNGP03.phx.gbl...
>I got a problem in one of my solutions and ran into something that I
>suppose is what I think but I find the versioning a bit confusing.
>
> I was trying the Add Reference in Visual Studio and noticed that it lists
> both "Version" and "Runtime". Apparently the .NET Framework version is in
> the "Version" but all of them (v2.0, v3.0 & v3.5) have the same runtime
> "v2.0.50727" which maps to the
> c:\windows\Microsoft.NET\Framework\v2.0.50727\
>
> So, System.NET shows as follows:
> System.Net 3.5.0.0 v2.0.50727 c:\Program Files\Reference
> Assemblies\.....
> System.Messaging 2.0.0.0 v2.0.50727 c:\Windows\Microsoft.NET\Fra....
>
> why does the v3.5 framework DLL shows the same runtime as the v2.0 and
> v3.0 frameworks? and why is it in a different directory root (C:\Program
> Files\Reference Assemblies\*) instead of the standard
> C:\Windows\Microsoft.NET\Framework\v3.5\... ?
>
> Shouldn't Visual Studio 2.5 not restrict itself to showing only Framework
> 2.0 assemblies?
>
> Emilio


Reply With Quote
  #4 (permalink)  
Old 07-24-2008, 03:24 PM
....DotNet4Ever....
 
Posts: n/a
Re: A framework confusion

So if I understand correctly it should be no problem if I reference the v3.5
System.Net assembly (apparently not available in previous frameworks) from a
v2.0 solution?

Emilio
http://www.PanamaSights.com/
http://www.Virtual-Aviation.info/


"Cowboy (Gregory A. Beamer)" <NoSpamMgbworld@comcast.netNoSpamM> wrote in
message news:O6pXjRZ7IHA.4108@TK2MSFTNGP04.phx.gbl...
> 3.0 and 3.5 sit on top of 2.0, so there is no big deal here. All you will
> find in the 3.x directories is extra stuff. Check it out yourself.
>
> Not sure why one is referenced in one spot and not in the main spot. Most
> likely someone was working with it from there and did not reset the link.
> As long as it works, it is not a big deal.
>
> --
> Gregory A. Beamer
> MVP, MCP: +I, SE, SD, DBA
>
> Subscribe to my blog
> http://gregorybeamer.spaces.live.com/lists/feed.rss
>
> or just read it:
> http://gregorybeamer.spaces.live.com/
>
> ********************************************
> | Think outside the box! |
> ********************************************
> "....DotNet4Ever...." <hate.spam@nowhere.com> wrote in message
> news:uOvvpyY7IHA.3480@TK2MSFTNGP03.phx.gbl...
>>I got a problem in one of my solutions and ran into something that I
>>suppose is what I think but I find the versioning a bit confusing.
>>
>> I was trying the Add Reference in Visual Studio and noticed that it lists
>> both "Version" and "Runtime". Apparently the .NET Framework version is in
>> the "Version" but all of them (v2.0, v3.0 & v3.5) have the same runtime
>> "v2.0.50727" which maps to the
>> c:\windows\Microsoft.NET\Framework\v2.0.50727\
>>
>> So, System.NET shows as follows:
>> System.Net 3.5.0.0 v2.0.50727 c:\Program Files\Reference
>> Assemblies\.....
>> System.Messaging 2.0.0.0 v2.0.50727 c:\Windows\Microsoft.NET\Fra....
>>
>> why does the v3.5 framework DLL shows the same runtime as the v2.0 and
>> v3.0 frameworks? and why is it in a different directory root (C:\Program
>> Files\Reference Assemblies\*) instead of the standard
>> C:\Windows\Microsoft.NET\Framework\v3.5\... ?
>>
>> Shouldn't Visual Studio 2.5 not restrict itself to showing only Framework
>> 2.0 assemblies?
>>
>> Emilio

>


Reply With Quote
  #5 (permalink)  
Old 07-24-2008, 03:37 PM
Cowboy \(Gregory A. Beamer\)
 
Posts: n/a
Re: A framework confusion

Okay, I may have misread.

As long as you are referencing a 2.0 assembly, you should be fine. These can
be found in a variety of locations, but you cannot mix 2.0 and 3.5 without
some form of service boundary. If you need 3.5 funcationality in an app that
cannot be upgraded, you will have to wrap it with a service and call it.

--
Gregory A. Beamer
MVP, MCP: +I, SE, SD, DBA

Subscribe to my blog
http://gregorybeamer.spaces.live.com/lists/feed.rss

or just read it:
http://gregorybeamer.spaces.live.com/

********************************************
| Think outside the box! |
********************************************
"....DotNet4Ever...." <hate.spam@nowhere.com> wrote in message
news:uJdOdFa7IHA.1952@TK2MSFTNGP02.phx.gbl...
> So if I understand correctly it should be no problem if I reference the
> v3.5 System.Net assembly (apparently not available in previous frameworks)
> from a v2.0 solution?
>
> Emilio
> http://www.PanamaSights.com/
> http://www.Virtual-Aviation.info/
>
>
> "Cowboy (Gregory A. Beamer)" <NoSpamMgbworld@comcast.netNoSpamM> wrote in
> message news:O6pXjRZ7IHA.4108@TK2MSFTNGP04.phx.gbl...
>> 3.0 and 3.5 sit on top of 2.0, so there is no big deal here. All you will
>> find in the 3.x directories is extra stuff. Check it out yourself.
>>
>> Not sure why one is referenced in one spot and not in the main spot. Most
>> likely someone was working with it from there and did not reset the link.
>> As long as it works, it is not a big deal.
>>
>> --
>> Gregory A. Beamer
>> MVP, MCP: +I, SE, SD, DBA
>>
>> Subscribe to my blog
>> http://gregorybeamer.spaces.live.com/lists/feed.rss
>>
>> or just read it:
>> http://gregorybeamer.spaces.live.com/
>>
>> ********************************************
>> | Think outside the box! |
>> ********************************************
>> "....DotNet4Ever...." <hate.spam@nowhere.com> wrote in message
>> news:uOvvpyY7IHA.3480@TK2MSFTNGP03.phx.gbl...
>>>I got a problem in one of my solutions and ran into something that I
>>>suppose is what I think but I find the versioning a bit confusing.
>>>
>>> I was trying the Add Reference in Visual Studio and noticed that it
>>> lists both "Version" and "Runtime". Apparently the .NET Framework
>>> version is in the "Version" but all of them (v2.0, v3.0 & v3.5) have the
>>> same runtime "v2.0.50727" which maps to the
>>> c:\windows\Microsoft.NET\Framework\v2.0.50727\
>>>
>>> So, System.NET shows as follows:
>>> System.Net 3.5.0.0 v2.0.50727 c:\Program Files\Reference
>>> Assemblies\.....
>>> System.Messaging 2.0.0.0 v2.0.50727 c:\Windows\Microsoft.NET\Fra....
>>>
>>> why does the v3.5 framework DLL shows the same runtime as the v2.0 and
>>> v3.0 frameworks? and why is it in a different directory root (C:\Program
>>> Files\Reference Assemblies\*) instead of the standard
>>> C:\Windows\Microsoft.NET\Framework\v3.5\... ?
>>>
>>> Shouldn't Visual Studio 2.5 not restrict itself to showing only
>>> Framework 2.0 assemblies?
>>>
>>> Emilio

>>

>


Reply With Quote
  #6 (permalink)  
Old 07-24-2008, 03:42 PM
Rory Becker
 
Posts: n/a
Re: A framework confusion

Hello ....DotNet4Ever....,

> So if I understand correctly it should be no problem if I reference
> the v3.5 System.Net assembly (apparently not available in previous
> frameworks) from a v2.0 solution?


Indeed it is technically possible and should work, but you are not allowed
to distribute the additional dll by itself (which would not work anyway)

Your solution would now require the .Net 3.5 framework and your distribution
method should take account of this.

--
Rory


Reply With Quote
  #7 (permalink)  
Old 07-24-2008, 04:02 PM
Rory Becker
 
Posts: n/a
Re: A framework confusion

Hello Cowboy (Gregory A. Beamer),

> Okay, I may have misread.
>
> As long as you are referencing a 2.0 assembly, you should be fine.
> These can be found in a variety of locations, but you cannot mix 2.0
> and 3.5 without some form of service boundary. If you need 3.5
> funcationality in an app that cannot be upgraded, you will have to
> wrap it with a service and call it.



I'm not sure why this is an issue....Doesn't it just mean that after the
reference is made, he is developing a 3.5 application under VS2005

They are all runnable under the 2.0 CLR... right? but to distribute he would
need the 3.5 framework in place



--
Rory


Reply With Quote
  #8 (permalink)  
Old 07-25-2008, 01:27 PM
Cowboy \(Gregory A. Beamer\)
 
Posts: n/a
Re: A framework confusion

The 2.0 framework will work fine with anything that is in the 2.0.x
folder(s), as they are considered 2.0, even if 3.5 has updated them. None of
the interfaces have changed. I know of nothing that breaks this rule.

If one references something out of the 3.0- directory or the 3.5 directory,
you will have to retarget for 3.5, as it will not compile. You can get
around the compilation "problem" by using reflection (late binding), but it
will fail at runtime, which is probably worse.

This is why I state you can use 3.5 in 2.0 if you wrap it with a service
boundary. This can be a web service or a WCF service (as long as it is
exposed like a web service - WCF allows you to expose in ways only WCF
understands). But you cannot directly access a 3.5 assembly that is marked
3.5, unless you move up to 3.5 as your target framework.

There may be some exceptions to this rule, but I don't know of any.

Am I making this clearer or am I just digging a deeper hole? :-)

--
Gregory A. Beamer
MVP, MCP: +I, SE, SD, DBA

Subscribe to my blog
http://gregorybeamer.spaces.live.com/lists/feed.rss

or just read it:
http://gregorybeamer.spaces.live.com/

********************************************
| Think outside the box! |
********************************************
"Rory Becker" <rorybecker@newsgroup.nospam> wrote in message
news:3af103471a71d8cabbc6344fbbbe@news.microsoft.c om...
> Hello Cowboy (Gregory A. Beamer),
>
>> Okay, I may have misread.
>>
>> As long as you are referencing a 2.0 assembly, you should be fine.
>> These can be found in a variety of locations, but you cannot mix 2.0
>> and 3.5 without some form of service boundary. If you need 3.5
>> funcationality in an app that cannot be upgraded, you will have to
>> wrap it with a service and call it.

>
>
> I'm not sure why this is an issue....Doesn't it just mean that after the
> reference is made, he is developing a 3.5 application under VS2005
>
> They are all runnable under the 2.0 CLR... right? but to distribute he
> would need the 3.5 framework in place
>
>
> --
> Rory
>
>


Reply With Quote
  #9 (permalink)  
Old 07-25-2008, 09:39 PM
Family Tree Mike
 
Posts: n/a
Re: A framework confusion

A co-worker sent an executable (3.5) developed which used an openfiledialog.
For no apparent reason, the SafeFileName property was used in the code.
This is only available in 2.0 SP 1, and therefore was failing on the 2.0
only machine. In this case, the user friendly message was that the property
does not exist.

It was an easy fix though and none of us really know why the new property is
there, but that is another discussion...

"Cowboy (Gregory A. Beamer)" <NoSpamMgbworld@comcast.netNoSpamM> wrote in
message news:ufaeFpl7IHA.5164@TK2MSFTNGP02.phx.gbl...
> The 2.0 framework will work fine with anything that is in the 2.0.x
> folder(s), as they are considered 2.0, even if 3.5 has updated them. None
> of the interfaces have changed. I know of nothing that breaks this rule.
>
> If one references something out of the 3.0- directory or the 3.5
> directory, you will have to retarget for 3.5, as it will not compile. You
> can get around the compilation "problem" by using reflection (late
> binding), but it will fail at runtime, which is probably worse.
>
> This is why I state you can use 3.5 in 2.0 if you wrap it with a service
> boundary. This can be a web service or a WCF service (as long as it is
> exposed like a web service - WCF allows you to expose in ways only WCF
> understands). But you cannot directly access a 3.5 assembly that is marked
> 3.5, unless you move up to 3.5 as your target framework.
>
> There may be some exceptions to this rule, but I don't know of any.
>
> Am I making this clearer or am I just digging a deeper hole? :-)
>
> --
> Gregory A. Beamer
> MVP, MCP: +I, SE, SD, DBA
>
> Subscribe to my blog
> http://gregorybeamer.spaces.live.com/lists/feed.rss
>
> or just read it:
> http://gregorybeamer.spaces.live.com/
>
> ********************************************
> | Think outside the box! |
> ********************************************
> "Rory Becker" <rorybecker@newsgroup.nospam> wrote in message
> news:3af103471a71d8cabbc6344fbbbe@news.microsoft.c om...
>> Hello Cowboy (Gregory A. Beamer),
>>
>>> Okay, I may have misread.
>>>
>>> As long as you are referencing a 2.0 assembly, you should be fine.
>>> These can be found in a variety of locations, but you cannot mix 2.0
>>> and 3.5 without some form of service boundary. If you need 3.5
>>> funcationality in an app that cannot be upgraded, you will have to
>>> wrap it with a service and call it.

>>
>>
>> I'm not sure why this is an issue....Doesn't it just mean that after the
>> reference is made, he is developing a 3.5 application under VS2005
>>
>> They are all runnable under the 2.0 CLR... right? but to distribute he
>> would need the 3.5 framework in place
>>
>>
>> --
>> Rory
>>
>>

>


Reply With Quote
Reply

  { mindfrost82.com } > Gadget Corner > Tech Newsgroups > Microsoft > .NET Framework


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT. The time now is 02:44 AM.


Powered by vBulletin, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.1.0 ©2007, Crawlability, Inc.
© 1999-2008 mindfrost82.com v11.0

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109