Link to home
Start Free TrialLog in
Avatar of dsmrtn
dsmrtnFlag for United States of America

asked on

Visual Studio - Adding New Project Types

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.
Avatar of Bob Learned
Bob Learned
Flag of United States of America image

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
Avatar of dsmrtn

ASKER

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.
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
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/
Avatar of dsmrtn

ASKER

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.
ASKER CERTIFIED SOLUTION
Avatar of ambience
ambience
Flag of Pakistan image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of dsmrtn

ASKER

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.