Shamil Salakhetdinov
shamil at smsconsulting.spb.ru
Wed Dec 9 15:41:54 CST 2009
Hi Charlotte -- Yes, it's easy to create cross-refs, and it's (usually) easy to solve cross-refs under Visual Studio - please provide an example where cross-refs resolving is a really tough task - this sample shouldn't be the case where one decides to resolve cross-refs in a legacy "spaghetti" set of projects IOW we assume we're talking about experienced developers who prevent having "cross-refs" spaghetti by doing code clean-up/refactoring/de-cross-referencing once in a while within a project's sources life-time... -- Shamil -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Charlotte Foust Sent: Thursday, December 10, 2009 12:12 AM To: Discussion concerning Visual Basic and related programming issues. Subject: Re: [dba-VB] C# - Thoughts on my methods I have to point out that it is exceptionally easy to create circular references when the projects are set up like this. That's why in our apps we keep all the forms in a project, all the reports in a project, etc. Of course, if we were using libraries rather than projects under the solution, it would be different. But this way, it can get messy fast. Charlotte Foust -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Shamil Salakhetdinov Sent: Wednesday, December 09, 2009 12:59 PM To: 'Discussion concerning Visual Basic and related programming issues.' Subject: Re: [dba-VB] C# - Thoughts on my methods Hi John -- In fact this is easy (please correct me if I'm wrong): - just reference your child projects from your main project and if you have (sub-)child projects then reference them from child projects; you can also reference child-child-(nephew) projects from parent projects etc... - just avoid having circular references... All that is very similar to MS Access/VBA references but unlike in MS Access/VBA in .NET solutions this referencing always work without any glitches whatever size your solutions are - tens of projects, thousands of customer classes - no problems, no GPFs of Visual Studio (well, for ASP.NET and WPF solutions you can have GPFs but even in that case you'll have all your sources preserved).... <<< I also don't understand why some objects in a referenced project class can be seen but others cannot. >>> That should be your problem/issue: in VS2008 (Prof) you can always try to hint VS asking to "resolve" undefined class name, enum, global var - right click -> Resolve... - if it can't do that - you can always do that manually - but it may be needed to have some custom classes "shuffled" between your projects... <<< the whole "break into projects" idea is turning out to be more work than it might be worth. >>> John, it will pay itself back very quickly - just be patient - I'd guess (based on your software development experience) it will need max one week (in total) of your time to spend mastering that multi-project solutions - and when you're there - only outer space will be your limitation... Just create a very simple sample solution with several projects and try to play with it setting references, moving custom classes from one project to the other, changing namespaces, and using directives... it's really easy - imagine hierarchical catalog where child entries can be referenced/accessed from parent ones, but where sibling entries aren't aware of each other... (if only they do not inherit from the same parent entries...) Thank you. -- Shamil __________ Information from ESET NOD32 Antivirus, version of virus signature database 4674 (20091209) __________ The message was checked by ESET NOD32 Antivirus. http://www.esetnod32.ru