Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

A language-agnostic project type for Visual Studio?

I'm writing a piece of code that's just a bunch of JavaScript and JSON files -- it's a grunt plugin, rather than a website -- and I'd like to edit files and manage source control through Visual Studio.

I'm trying to construct a 'vanilla' msbuild project file -- not C#, not VB, etc because those files aren't valid in this kind of file. I can write a very simple MSBuild file with a .msbuildproj extension, but can't get it to load into VS2013, and can't find an example anywhere.

Anyone know how to put together an empty, language-independent project simply for file management?

like image 541
Steve Cooper Avatar asked Nov 02 '22 04:11

Steve Cooper


1 Answers

You are mostly right:

  • Visual Studio projects (almost all modern types, that is) are MSBuild projects. But, Visual Studio only loads projects for which it has extensions. You can't load arbitrary MSBuild projects. (Of course, you can always edit an MSBuild file as XML. If it is already loaded as a project, you have to unload it first to edit it.)

  • With some project types you can't add whatever type of file you'd like. For example, WiX projects don't allow you to add T4 template (.tt) files. It's a shame. You can however, edit the project to add them, which shouldn't break anything. But it's really up to the author of the project type extension. Nonetheless, I haven't found any file that I can't add to a C# and Visual Basic .NET project.

As SLaks commented, Web Site projects do allow any type of file to be added and should work for your case.

like image 83
Tom Blodget Avatar answered Nov 11 '22 07:11

Tom Blodget