Click here to Skip to main content
15,889,176 members
Home / Discussions / C#
   

C#

 
QuestionGenerics [modified] Pin
Daniel.J.A8-Sep-09 13:52
Daniel.J.A8-Sep-09 13:52 
AnswerRe: Generics Pin
Christian Graus8-Sep-09 13:59
protectorChristian Graus8-Sep-09 13:59 
AnswerRe: Generics Pin
Luc Pattyn8-Sep-09 14:04
sitebuilderLuc Pattyn8-Sep-09 14:04 
AnswerRe: Generics Pin
N a v a n e e t h8-Sep-09 16:36
N a v a n e e t h8-Sep-09 16:36 
AnswerRe: Generics Pin
Daniel.J.A28-Sep-09 12:16
Daniel.J.A28-Sep-09 12:16 
Questionhow to create a tool item dropdown menu with C#? Pin
iozk8-Sep-09 12:20
iozk8-Sep-09 12:20 
AnswerRe: how to create a tool item dropdown menu with C#? Pin
Christian Graus8-Sep-09 12:31
protectorChristian Graus8-Sep-09 12:31 
QuestionOdd Visual Studio 2005 behaviour when adding Object Data Source [modified] Pin
Martijn Boeker8-Sep-09 12:10
Martijn Boeker8-Sep-09 12:10 
I have been working on this issue for a few hours and finally found a work-around. This is not a pressing issue, but I am curious about getting more info. I also wanted to share my findings in case anybody else struggles with this. If you have a few minutes and you're curious too, read on...

Here are the steps to reproduce:

The first steps to set up and show a working situation...

1) Create new C# Class Library project
2) Build solution
3) Go to Data -> Add New Data Source...
4) Select Object and click Next
5) You should be able to browse to the Class1 class

Steps to cause the issue...

6) Create new folder and name it 'a'
7) Drag Class1.cs into 'a'
8) Rebuild solution
9) Go to Data -> Add New Data Source...
10) Select Object and click Next
11) The list of objects is empty while it shouldn't be

Steps to fix it again...

12) Add new class (accept default name)
13) Rebuild solution
14) Go to Data -> Add New Data Source...
15) Select Object and click Next
16) Both Class1 and Class2 show up in the list

The oddest thing...

17) Remove Class2.cs
18) Add empty text file
19) Rebuild solution
20) Go to Data -> Add New Data Source...
21) Select Object and click Next
22) Class1 show up in the list

The conclusion is that you must have a file in the top level directory of a project, or otherwise you cannot add an object data source. In my project, I just added a dummy class in the top level for now, because I have nothing useful to put in the top-level folder right now.

Another conclusion is that this has nothing to do with the namespace of the class or the default namespace of the project. You can put Class1 in namespace xxx.yyy, and it will still be found, as long as there is a file (ANY kind of file) in the root.

My questions to you are:

* Can you reproduce this issue?
* Is there any reasonable explanation for this?
* Do you consider this a bug in Visual Studio?
* If so, is this a known issue? Any references?

Thanks,
Martijn

modified on Tuesday, September 8, 2009 6:25 PM

QuestionSubreports Pin
mbangh8-Sep-09 12:05
mbangh8-Sep-09 12:05 
AnswerRe: Subreports Pin
Mycroft Holmes8-Sep-09 15:59
professionalMycroft Holmes8-Sep-09 15:59 
QuestionNetworking problems. Pin
CRAZYCRICKET2258-Sep-09 9:19
CRAZYCRICKET2258-Sep-09 9:19 
GeneralRe: Networking problems. Pin
harold aptroot8-Sep-09 10:40
harold aptroot8-Sep-09 10:40 
AnswerRe: Networking problems. Pin
Luc Pattyn8-Sep-09 14:08
sitebuilderLuc Pattyn8-Sep-09 14:08 
GeneralRe: Networking problems. Pin
CRAZYCRICKET2258-Sep-09 21:36
CRAZYCRICKET2258-Sep-09 21:36 
GeneralRe: Networking problems. Pin
CRAZYCRICKET2259-Sep-09 0:26
CRAZYCRICKET2259-Sep-09 0:26 
GeneralRe: Networking problems. Pin
Luc Pattyn9-Sep-09 12:29
sitebuilderLuc Pattyn9-Sep-09 12:29 
QuestionC# Pin
aayshasid8-Sep-09 9:18
aayshasid8-Sep-09 9:18 
AnswerRe: C# Pin
Not Active8-Sep-09 9:22
mentorNot Active8-Sep-09 9:22 
AnswerRe: C# Pin
Manas Bhardwaj8-Sep-09 9:26
professionalManas Bhardwaj8-Sep-09 9:26 
AnswerRe: C# Pin
Christian Graus8-Sep-09 11:34
protectorChristian Graus8-Sep-09 11:34 
QuestionRunning C# App over Network Pin
mbangh8-Sep-09 8:41
mbangh8-Sep-09 8:41 
AnswerRe: Running C# App over Network Pin
Not Active8-Sep-09 9:19
mentorNot Active8-Sep-09 9:19 
AnswerRe: Running C# App over Network Pin
DaveyM698-Sep-09 9:38
professionalDaveyM698-Sep-09 9:38 
GeneralRe: Running C# App over Network Pin
mbangh8-Sep-09 10:24
mbangh8-Sep-09 10:24 
GeneralRe: Running C# App over Network Pin
DaveyM698-Sep-09 10:26
professionalDaveyM698-Sep-09 10:26 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.