Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Languages / C# / November 2007

Tip: Looking for answers? Try searching our database.

Little Glitch with VS05 project post-VS08 install

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Liz - 26 Nov 2007 04:55 GMT
I installed VS 2008 -- leaving VS 2005 in place -- without any apparent
problems;  first thing I did after installing was to open a project in
progress with VS 2005 to make sure there were no problems;  there was one
...

The following line of code:

 lvColumnSorter.Order = SortOrder.Ascending;

which always compiled without error, now produced this error:

Error 1 'SortOrder' is an ambiguous reference between
'System.Data.SqlClient.SortOrder' and 'System.Windows.Forms.SortOrder'

of course this was easy to disambiguate but why did it happen at all?  I'm
still targeting the 2.0 Framework for this project ... did the VS 2008
installation update my 2.0 Framework ??  and the SortOrder enumeration is
now in the System.Data.SqlClient namespace but previously was not?

TIA
Lasse Vågsæther Karlsen - 26 Nov 2007 08:31 GMT
<snip>
> Error 1 'SortOrder' is an ambiguous reference between
> 'System.Data.SqlClient.SortOrder' and 'System.Windows.Forms.SortOrder'
[quoted text clipped - 3 lines]
> installation update my 2.0 Framework ??  and the SortOrder enumeration is
> now in the System.Data.SqlClient namespace but previously was not?

I can't say for sure about that particular item, but I do know that VS
2008 updated 2.0 to 2.0 SP1, and I seem to recall someone here saying
that they're not 100% identical in terms of contents (ie. it wasn't just
security fixes), so perhaps that's the explanation.

Do you have a machine running without 2008 still? If so, perhaps
download Reflector and look at the classes in question.

Signature

Lasse Vågsæther Karlsen
mailto:lasse@vkarlsen.no
http://presentationmode.blogspot.com/

Michael Nemtsev [MVP] - 26 Nov 2007 08:36 GMT
Hello Liz,

Seems that VS optimizes the namespaces usage, that's why u have ambiguity
error

I'd recommend to use the comparing tool to understand what really happened

---
WBR,
Michael  Nemtsev [.NET/C# MVP] :: blog: http://spaces.live.com/laflour 

"The greatest danger for most of us is not that our aim is too high and we
miss it, but that it is too low and we reach it" (c) Michelangelo

L> I installed VS 2008 -- leaving VS 2005 in place -- without any
L> apparent problems;  first thing I did after installing was to open a
L> project in progress with VS 2005 to make sure there were no problems;
L> there was one ...
L>
L> The following line of code:
L>
L> lvColumnSorter.Order = SortOrder.Ascending;
L>
L> which always compiled without error, now produced this error:
L>
L> Error 1 'SortOrder' is an ambiguous reference between
L> 'System.Data.SqlClient.SortOrder' and
L> 'System.Windows.Forms.SortOrder'
L>
L> of course this was easy to disambiguate but why did it happen at all?
L> I'm still targeting the 2.0 Framework for this project ... did the VS
L> 2008 installation update my 2.0 Framework ??  and the SortOrder
L> enumeration is now in the System.Data.SqlClient namespace but
L> previously was not?
L>
L> TIA
L>
Willy Denoyette [MVP] - 26 Nov 2007 09:45 GMT
> I installed VS 2008 -- leaving VS 2005 in place -- without any apparent
> problems;  first thing I did after installing was to open a project in
[quoted text clipped - 16 lines]
>
> TIA

Yes, the Framework is updated with the V2 SP1.
'System.Data.SqlClient.SortOrder'  is new in SP1 which is installed whenever
you install VS2008 or V3.5 or V3.0 SP1 or V2 SP1 of the Framework.

Willy.

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.