0
votes

I am using Visual Studio 2015 preview and compiling SASS files with Grunt. And locally everything works great.

But when it comes to publishing, there are some differences:

  • In Visual Studio 2013 .scss files were compiled into .css files by Visual Studio (or Web Essentials)
  • When compiled, .css files were added to project as subfiles for .scss files
  • .css files were published with everything else

Now with Visual Studio 2015 version, .scss files are not compiled anymore and we have to configure Grunt for that, which I think is just great, because of various things! Except this:

  • When Grunt compiles .scss files to .css files, it is happening outside of Visual Studio
  • Files are created on the disk, but they are not included into project automatically
  • When publishing, .css files are ignored, because they are not a part of project

Therefore, I have two questions:

  • How can I configure Visual Studio to add those files as subfiles for .scss files (prefered)
  • If that is not really possible (at least for now), how can I get Visual Studio publishing tool to include the in publishing package?
1
AFAIK, when you include any file on the project structure it should automatically be added to the project. If the file is inside the wwwroot it will also be published. Are you saying that this is not happening ? - Bart Calixto
It is adding .scss files, but not adding the generated .css files. - Dovydas Navickas
What folder are css getting generated? - Bart Calixto
.css files are generated right besides the .sass files - Dovydas Navickas
As of right now (preview version) the watch on project changes is implemented on vnext projects afaik. - Bart Calixto

1 Answers

0
votes

If you manually add the generated .css files to your project, they will be included in the publish. When Grunt updates them, Visual Studio will see the updated file.