OT: Can't see business assembly in Add New Data Source wizard

OT: Can't see business assembly in Add New Data Source wizard

Old forum URL: forums.lhotka.net/forums/t/1674.aspx


ajj3085 posted on Friday, November 03, 2006

Hi,

Made some changes to my business assembly.  Now in the UI layer I'm trying to update some forms, but I can no longer see the assembly in the Add New Data Source Wizard.

Anyone know what causes this?  I can see the other business assembly (I have two).

Thanks
andy

david.wendelken replied on Saturday, November 04, 2006

I'm guessing by "made some changes" that you added some new classes.

Sometimes the compiled DLLs in other projects in the solution don't get updated as they should by Visual Studio.  I've found that if I delete the DLLs and rebuild the solution the problem usually clears right up.

ajj3085 replied on Monday, November 06, 2006

I renamed a couple of classes, then created a new class which was the name of one of the classes before it was renamed.

I tried cleaning the solution a few time, with no luck.  I even tried creating a blank project, adding a reference, then running the wizard.. same thing.

So the wizard doesn't seem to like something in my assembly... but I don't know what.  It works fine via the testing dll... no unusual warnings.

Andy

ajj3085 replied on Monday, November 06, 2006

No one has run into this except me?

jlazanowski replied on Monday, November 06, 2006

I've run into this before but for the life of me I can't remember what it was I did to fix the problem.

The only thing that I can recall was that at one point I created some folders, moved some of my classes into them and updated the name spaces. Visual studio then took it upon itself to remove the public attribute from the beginning of my classes. However you said that you're unit tests are running so I doubt that's your issue.

Can you reference them in UI code without the data source wizard?

 

 

 

ajj3085 replied on Tuesday, November 07, 2006

Yes, I can reference them in code fine. 

I did get it to see the assembly again, although it seems spotty.

I'm not sure exactly what I did... as I tried a few things.

I ran FxCop, and oneof my property setters was setting the property value instead of the field.  I fixed that, and cleaned up some other stuff.

I added references to some assemblys that the business assembly depends on (previously I just set Reference paths in the project properties, and that had worked fine).

I fiddled with the copy local setting on the reference... setting it to true seems to have caused it to show up..

I'm not sure what did it, and I tried narrowing it down only to have it disappear again.. its there now... now I just want to know how to keep it there.

The other business assembly my UI uses is there constantly; I don't reference its dependancies directly, nor is the Copy local set to true.. its wierd.

ajj3085 replied on Tuesday, November 07, 2006

So it seems that I need to directly reference a couple of assemblies, which my business assembly uses, for the Add New Data Source wizard to see my business assembly.

I think I may have inavertantly exposed a DAL object in my changes.. I'm going to look at that and report back.

Andy

ajj3085 replied on Tuesday, November 07, 2006

Ok, so it was something stupid.

I had exposed some of my DAL layer though the business layer.  Obviously then those classes can't be examined unless you have references to the DAL assemblies.

Once I fixed that little problem, I can now see my business assembly with no problem.

Thanks to those that were posting, it really helped me work though the problem.  Chalk one up for non-thinking on my part..

Andy

ajj3085 replied on Tuesday, November 07, 2006

You mean nothingin the root of the solution which you are running the wizard in, or in the business assembly project?

I ran into something similar as well, but I think I was getting a Null reference exception trying to run the wizard.  Having an object in the projects root fixed that issue.

david.wendelken replied on Monday, November 06, 2006

david.wendelken:

I'm guessing by "made some changes" that you added some new classes.

Sometimes the compiled DLLs in other projects in the solution don't get updated as they should by Visual Studio.  I've found that if I delete the DLLs and rebuild the solution the problem usually clears right up.

Not clear from your posts whether you tried the above suggestion...

ajj3085 replied on Tuesday, November 07, 2006

david.wendelken:
Not clear from your posts whether you tried the above suggestion...


From my initial reply to your post:
ajj3085:
I tried cleaning the solution a few time, with no luck.  I even tried creating a blank project, adding a reference, then running the wizard.. same thing.


By cleaning I meant both using the Clean build option and also closing VS2005 and manually deleting the obj and bin folders for all projects under the solution.   I should have been more clear by my definition of cleaning.

razorkai replied on Tuesday, November 07, 2006

This may not be the case for you but I just had a problem where I couldn't get the Data Sources window to work with my assembly either.  The reason was that I had moved all my classes inside folders within Visual Studio and had nothing at the root level of the project.  As soon as I added an empty class at the project root level the Data Sources window worked again.  Some sort of VS bug I guess.  HTH.

Copyright (c) Marimer LLC