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 / Visual Studio.NET / Extensibility / February 2006

Tip: Looking for answers? Try searching our database.

Limiting Solutions to One Language

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
FYA - 08 Feb 2006 20:07 GMT
I am designing a new set of three different languages that will not
interoperate at all. Because they will not interact at all, and to simplify
solution creation for my end customers, I want to limit a solution to
containing only projects that use a single language. That is, if a user
creates a project based on language A, the solution will only be able to
contain projects based on languague A.

Do I have to create a whole new solution type? Can I extened the existing
solution implementation to enforce this limit? What interfaces/base classes
should I extend?

Thanks for any help,

-Ian
Carlos J. Quintero [VB MVP] - 09 Feb 2006 09:23 GMT
Hi Ian,

Even if the projects don´t interact at all, it does not hurt to allow a
solution to include projects of different kind and languages. It's better to
allow the user to decide what to do than imposing artificial limitations.
But if you really want to, you can try to intercept the
EnvDTE.ProjectEvents.ItemAdded event, check the language, and if it is not
allowed show a messagebox and remove the project from the solution. The SDK
maybe allow to do this at a more low level.

Signature

Best regards,

Carlos J. Quintero

MZ-Tools: Productivity add-ins for Visual Studio
You can code, design and document much faster:
http://www.mztools.com

>I am designing a new set of three different languages that will not
> interoperate at all. Because they will not interact at all, and to
[quoted text clipped - 12 lines]
>
> -Ian
FYA - 09 Feb 2006 17:23 GMT
Carlos,

While I generally agree that imposing artifical limitations on my customers
is not the right thing to do, this is one of the exceptions that prove the
rule. Intercepting the AddItem event seems like a simple enough way to do it,
but I am working on a more wholesale conversion/rebranding of the IDE
(through the PPE program). As such, I need this functionality to be more
tightly integrated than sniffing for an event. Are there any suggestions on
where to start?

Thanks,

Ian

> Hi Ian,
>
[quoted text clipped - 5 lines]
> allowed show a messagebox and remove the project from the solution. The SDK
> maybe allow to do this at a more low level.
Carlos J. Quintero [VB MVP] - 09 Feb 2006 17:30 GMT
Hi Ian,

I see. Then take a look to see if in the VS 2005 SDK there is some sample
related to that; the extensibility model for add-ins (EnvDTE) won´t help at
that.

Signature

Best regards,

Carlos J. Quintero

MZ-Tools: Productivity add-ins for Visual Studio
You can code, design and document much faster:
http://www.mztools.com

> Carlos,
>
[quoted text clipped - 12 lines]
>
> Ian

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.