Solved

Visual Studio - Adding New Project Types

Posted on 2013-10-24
7
354 Views
Last Modified: 2013-10-31
If this has been asked elsewhere, please direct me.  When I search for solutions I get nothing but questions on automating Visual Studio builds or tasks with batch scripts.

I'm using VS2010 Pro and moving to VS2012 Pro.

We manage our web sites as VS Projects or web site.
We manage our batch VB code with VS Projects - but mostly just include items pertaining to the EXE and its execution.  We do not include the corresponding batch scripts to run the EXE since these are often shared with other EXEs.

We have a \Runtime suite of folders to manage our batch scripts and other control files.  We currently use a varity of editors including VS and even Notepad at times.  This is not as automated as we want because TFS points to our local drive and the Runtime code is not easy to code, test, deploy locally so it must be copied to server to test adequately.  What occurs is version issues because people get lazy and edit server version directly and TFS is not always updated.

Is there a way to add a new project type that I can point to Runtime and have it expect file types of CMD, SQL, TXT, VBS to automatically include and manage?

Ideally when we say "build" we would like all modified files to be copied to similar folder structure on our development server for real execution and testing.

This would facilitate our easily checking files in and out, maintain current code both locally and where it is actually tested properly on server.

I have built an External Tool batch script to copy files one by one as I edit & save them, but it is not quite as robust.


We cannot be the only ones wanting this capability.  I'm thinking I just haven't found the right search string.

Oh, adding color coding to batch files would just be a great bonus.  Most tools I've used manage it with a specially named file containg lists of reserved words, comment identifiers and color choices to use.
0
Comment
Question by:dsmrtn
  • 3
  • 2
  • 2
7 Comments
 
LVL 96

Expert Comment

by:Bob Learned
ID: 39600211
Are you asking how to create a project template from an existing project?

How to: Create Project Templates
http://msdn.microsoft.com/en-us/library/xkh1wxd8(v=vs.110).aspx

or, do you want an extension (VSIX) template?

Creating Extensions By Using the VSIX Project Template
http://msdn.microsoft.com/en-us/library/dd885241(v=vs.110).aspx
0
 

Author Comment

by:dsmrtn
ID: 39600965
You ask a good question.  I've given both links a look.  Each seems to suggest you either have an existing project to extend, or want to create a new project template starting with an existing templatev to export and edit.

I want a completely new Project Template - like Batch Scripts or Other Runtime Files.

I think I want the latter.  I want a project type that has nothing to do with VS languages - just flat files in support of VS EXEs - namely CMD, TXT, SQL. VBS for starters.  More often than not, changes to these files tend to be project agnostic - a global change for instance.

I just want to manage them outside of a VB Console project but using the features of VS like check in/out from TFS, making edits, and have this build process copy files from local folders to the expected target on development server.

I will try this out.  Thank you.
0
 
LVL 96

Expert Comment

by:Bob Learned
ID: 39601076
If you have TFS, there are the TFS Power Tools that add an extension to Windows Explorer, so that you can do TFS functions from Windows Explorer.  The Power Tools versions are specific to the Visual Studio IDE version.  Take a look at Windows Shell Extensions.

This is the installation for Visual Studio.NET 2012:

Microsoft Visual Studio Team Foundation Server 2012 Power Tools
http://visualstudiogallery.msdn.microsoft.com/b1ef7eb2-e084-4cb8-9bc7-06c3bad9148f
0
How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

 
LVL 22

Expert Comment

by:ambience
ID: 39601509
What exactly do you mean by "Manage?" I cant think of anything but to treat them as resources - since you are not going to write any DSL or language.

It looks like an awfully complex endeavor for a simple task of enforcing proper source code control. How would a new project type be any better at solving versioning than just a bunch of files checked into TFS?

Also, copying files to all deployments, should you really want an automated way for that, is also best handled by tools specifically designed for it.

I would suggest to look into using Nuget and Octopus deploy or TeamViewer for your tasks.

Maybe setup a Nuget repository server and push Nuget packages to it - using batch files - of course. Then you can either directly pull from Nuget repo or just have a specialized tool like Octopus deploy to push it to all deployments.

http://octopusdeploy.com/
0
 

Author Comment

by:dsmrtn
ID: 39601675
I just want to manage (TSF checkout/checkin, use of IDE to make changes, and when I click "build" - which is really a way of saying "do something with this extension/file type" - which means to build programs in a language that need to be compiled.  For CMD, TXT, SQL, VBS, that same "build" button should be able to do what it is told to do, that might be perform a syntax check, or copy to output destination, or run a batch script I might have written) the same way we manage everything else that is vanilla out of the box with VS.  Managing these types of files shouldn't be any different than say Web Sites, or C++ projects.  Files are Files - just out of the box VS doesn't support them as easily.

Just because some components are traditional "source code" to be managed doesn't make non source code any less important to be managed in a similar way.  The files I'm talking about, excepting TXT, are code - just not .Net code.

Sure I want these components to have the same, minimal controls our sourse code has, what is wrong with that?  It should be doable.  Heck they added F# as a project type.  And I could manually add the files by using the Add Exisiting Item feature, and I could add a post build script to do my copy to server deployments.  This might be the easiest way to go, but I was hoping for a more elegant, VS way, to do it.

Why isn't VS the best tool to do what I want?  I just want these flat file types to exist in their own project so they can be managed together because I have figured out that about 50% of the time a global or near global edit is involved - just exactly like we manage our various .Net code projects.
0
 
LVL 22

Accepted Solution

by:
ambience earned 500 total points
ID: 39601835
VS is not stopping you from writing a new project system, you can even write a powerfull Isolated Shell Application (IDE and your own Project Type).

However, that is a lot of work and must be justified.

If you really must: http://msdn.microsoft.com/en-us/library/cc512961.aspx

Isolated Shell: http://msdn.microsoft.com/en-us/library/vstudio/bb685514.aspx - More elegant ;)
0
 

Author Closing Comment

by:dsmrtn
ID: 39615550
Hahaha.  Well, you warned.  Yes, this will do.  I will try doing more searches to see if these results were found and I skipped over them as not being what I'm looking for.

Hope I don't have to come back here and ask, okay, works on my machine, how do I deploy to myt teammates to erasily add to their VS.

Thanks.
0

Featured Post

Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

Join & Write a Comment

User art_snob (http://www.experts-exchange.com/M_6114203.html) encountered strange behavior of Android Web browser on his Mobile Web site. It took a while to find the true cause. It happens so, that the Android Web browser (at least up to OS ver. 2.…
Entering time in Microsoft Access can be difficult. An input mask often bothers users more than helping them and won't catch all typing errors. This article shows how to create a textbox for 24-hour time input with full validation politely catching …
This tutorial covers a step-by-step guide to install VisualVM launcher in eclipse.
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…

746 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now