Little Glitch with VS05 project post-VS08 install

L

Liz

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
 
L

Lasse Vågsæther Karlsen

Liz wrote:
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?

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.
 
M

Michael Nemtsev [MVP]

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>
 
W

Willy Denoyette [MVP]

Liz said:
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

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top