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 / October 2005

Tip: Looking for answers? Try searching our database.

ProjectItems within project item

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
hammett - 28 Oct 2005 04:17 GMT
Hello!

I'd like to provide some fast access to some special files within solutions
managed by the Add-in I'm working on. ASP.Net projects, for instance, does
exactly what I'd like to provide, say a WebForm1.aspx has a codebehind
associated and a resource file:

WebForm1.aspx vsProjectItemKindPhysicalFile
 WebForm1.aspx.cs vsProjectItemKindPhysicalFile
   WebForm1.aspx.resx vsProjectItemKindPhysicalFile

I've tried to achieve the same thing using AddFromFile and AddFolder with no
success. Is there any special thing I'm missing?

TIA,
hammett
Carlos J. Quintero [VB MVP] - 28 Oct 2005 09:20 GMT
Hi hammett.,

What do you mean by "provide some fast access"? To add related files to
existing files? Which exact problem are you getting with
ProjectItem.ProjectItems.AddFromFile?

Signature

Best regards,

Carlos J. Quintero

MZ-Tools: Productivity add-ins for Visual Studio .NET, VB6, VB5 and VBA
You can code, design and document much faster.
Free resources for add-in developers:
http://www.mztools.com

> Hello!
>
[quoted text clipped - 12 lines]
> TIA,
> hammett
hammett - 28 Oct 2005 13:27 GMT
Hey Carlos,

I can explain exactly what I want. Within a project that uses a MVC
framework I'd like to relate all views within a controller:

HomeController
. index
. about

AccountController
. create
. update

The thing is that these files already exist within the project, I need to
create a link to them. A common structure is

Project
+ Controllers
 . HomeController
 . AccountController
+ Models
+ Views
 + home
   . index
   . about
 + account
   . create
   . update

So in the end I'd like that my solution explore expose something like:

Project
+ Controllers
 + HomeController
   . index
   . about
 + AccountController
   . create
   . update
+ Models
+ Views
 + home
   . index
   . about
 + account
   . create
   . update

I wonder if this should be done through ProjectItems or UIHierarchyItem
objects, though. What do you think?

> Hi hammett.,
>
[quoted text clipped - 18 lines]
>> TIA,
>> hammett
Carlos J. Quintero [VB MVP] - 31 Oct 2005 10:18 GMT
> I wonder if this should be done through ProjectItems or UIHierarchyItem
> objects, though. What do you think?

Try with ProjectItems, which is more specific to the Solution Explorer.
UIHierarchyItem is more generic for windows with treeviews (Solution
Explorer, Server Explorer, Macros Explorer, etc.)

Signature

Best regards,

Carlos J. Quintero

MZ-Tools: Productivity add-ins for Visual Studio .NET, VB6, VB5 and VBA
You can code, design and document much faster.
Free resources for add-in developers:
http://www.mztools.com


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.