VS publish vs dotless - visual-studio-2012

When Visual Studio publish feature is used, it does not publish the css files created by dotless.
E.g. I have a less style sheet named Site.less and upon build it will create Site.css. However as the Style.css file is not included in the project it will not get published.
Appreciate any ideas.

Found it...http://haacked.com/archive/2009/12/01/t4-template-for-less-css.aspx
Add this template to you project. It will compile on change rather than on build.

Related

Publishing npm_modules folder in Visual Studio

I'm just starting out with npm. I use visual studio and everything is working great. I've got my packages installed.
How do I go about publishing the website with the node modules? If I publish the site within visual studio 2015 right now, it is missing all the scripts installed via npm.
Do I need to include the npm_modules folder in my project? If so I've tried just to test, and it seems to freeze VS2015 on every attempt. I've failed to find information on how to do this. I'm guessing there is an easy fix that I'm just not aware of.
Thanks!
A brute force solution is to set the following project setting:
tab 'Package/Publish Web
Set 'Items to deploy ....' to 'All files in this project folder
See also this answer:
How to "Add Existing Item" an entire directory structure in Visual Studio?

Using Visual Studio 2015 for existing node-js client-side web projects

I have a team working on a client-side node.js application. The sources are stored in a source control. I'd like to modify and debug this application in Visual Studio 2015. They use other IDEs, and I would not like to add additional VS-specific files such as .sln to source control.
I'm able to clone the repository, create a separate empty solution and add the repository as an "Existing Web Site". However, Visual Studio do not recognize package.json, and do not install dependencies as it would for MVC6 projects. Consequently gruntfile.js would not work either.
Is there any way to make Visual Studio see and process package.json, or I'm on a wrong track here?
Instead of using the "Existing Web Site" option, create a new solution and add items to it. Web Site Projects types are a different, legacy project type.

Visual Studios "extra" build files

I am looking to create a "Publish" configuration for my VS solution that will build the project and only include the files I actually wish to distribute.
I have switched off Enable the Visual Studios hosting process and set the Debug info in Advanced Build Settings to none.
I am trying to stop all the extra XML files and Source Browser Database files that come with the nuGet packages from getting copied to the publish directory (I assume these aren't required) - anyone know how?
Is there anything else that I should be doing?
In the end I used a post build event to delete the files that I didn't want.

VS Package Extension to add a new project type to the new projects options window

I woulkd like to create a Visual Studio extension. I chose the Package option since the AddIn option will be deprecated from Visual Studio 2013 and above.
So i installed Visual Studio 2012, and Visual Studio SDK 2012, and created a new VS Package project.
Now, I want my package to enable the user to create a new type of project. i.e: I want to extend the right click->new project options to contain a new model of project, which will be a standard Visual C++ project, with some additional configurations, links, references and etc.
I googled a lot, but found nothing.
Does any of you have an idea about this target?
Thanks in advance!
I think the Visual Studio Template Schema Reference contains all information you need to create custom project templates; see: http://msdn.microsoft.com/en-us/library/xwkxbww4.aspx
You can derive a project template from an existing project, which might be the way to go, since it creates a valid template that only needs some customizing. A template export can be done by using the Export Template command found in the File menu.
The template wizard will create a ZIP file containing the template manifest and all referenced files; just extract the archive and customize it in the way you want it (add/remove files, change information like name and description in the manifest). Once you´ve your customized template, create a new VISX package project and add the template ZIP file to it (using Add Existing Item command).
The last step will be to add an Asset to the VISX manifest. Open the source.extension.vsixmanifest file in the VSIX designer, goto the Assets tab and click the New button; this will open a dialog to setup the asset... choose Microsoft.VisualStudio.ProjectTemplate as the type - and File on filesystem as the source. This will allow you to pick the previously added ZIP file. Build the package - and you´re done.

Build options in a visual studio solution with many projects

Build options like "optimize code" "debug info - none", "no DEBUG constant" are defined on a project level in Visual Studio. In a solution with many projects a build is started with a specific visual studio build configuration that is added in one main project file (as XML).
The buid process also builds all dependency projects (dll's) and I wonder if it is possible to define the options mentioned above the main project file ("globally") or should each dependency project file be edited seperately?
It turns out that you must include all referenced projects as projects in the solution of the build job. Then the build configuration of the build is applied to all projects.
When you do not inlcude all referenced projects as projects in the solution, the build server will build all referenced projects in debug configuration.

Resources