Wednesday, March 2, 2016

How to include generated files in Visual Studio Web Deployment Package without adding them to Source Control

When using Web Deployment the default is to only have it include the files that are needed to run the application. You can tell Visual Studio to include all files in the project or project folder but that could be messy.

Let's say we want to generate CSS from SCSS. In that case we wouldn't want to include the generated file into Source Control but rather generate it whenever we build or change some SCSS.

Now comes the tricky part. In order to include the generated file in the project so that Web Deployment would include it but not add it to Source Control we can use a .tfignore file. I've created one and put it in the solution root. To have it ignore the generated CSS file in my web project we simply have to add this line:

One confusing bit is when you add the generated file to your project it still shows up in Pending Changes. Just Undo that change and it won't show up as a pending change anymore.

One last thing piece to the puzzle is to hide the generated file from Solution Explorer since we don't ever want to edit that file manually.

Edit the project file, find the generated file, add the Visible tag inside the Content tag and set it to false:
<Content Include="Static\SCSS\site.css">


Aruna Ram said...

This post is very different and unique information. It's a very nice post and very attractive to me. Keep posting...
Spark Training in Chennai
Spark Training
Pega Training in Chennai
Linux Training in Chennai
Social Media Marketing Courses in Chennai
Power BI Training in Chennai
Tableau Training in Chennai
Excel Training in Chennai
Oracle DBA Training in Chennai
Spark Training in Valachery

Nannie Co Pam said...

Great Article. Thank you for sharing! Really an awesome post for every one.

IEEE Final Year projects Project Centers in Chennai are consistently sought after. Final Year Students Projects take a shot at them to improve their aptitudes, while specialists like the enjoyment in interfering with innovation. For experts, it's an alternate ball game through and through. Smaller than expected IEEE Final Year project centers ground for all fragments of CSE & IT engineers hoping to assemble. Final Year Project Domains for IT It gives you tips and rules that is progressively critical to consider while choosing any final year project point.

Spring Framework has already made serious inroads as an integrated technology stack for building user-facing applications. Spring Framework Corporate TRaining the authors explore the idea of using Java in Big Data platforms.
Specifically, Spring Framework provides various tasks are geared around preparing data for further analysis and visualization. Spring Training in Chennai

Ravi said...

You write this post very carefully I think, which is easily understand to me. Not only this, other post is also good. As a newbie this info is really helpful for me. Thanks to you.
Tally Training in Chennai
Tally ERP 9 Training
tally classes
Tally Training institute in Chennai
Tally course in Chennai

Crack Mods said...

your posting style is very awesome thanx for sharing keep it up........ Office 2016 Permanent Activator Crack Ultimate Full Download 2020!

nisharoshan said...

I like the blog format as you create user engagement in the complete article. Thanks for the informative posts.

Web Designing Course Training in Chennai | Web Designing Course Training in annanagar | Web Designing Course Training in omr | Web Designing Course Training in porur | Web Designing Course Training in tambaram | Web Designing Course Training in velachery

Unknown said...

Appreciation is a wonderful thing...thanks for sharing kepp it up.Visual SEO Studio Crack
Ashampoo Soundstage Crack
Native Instruments Massive Crack
IDM Crack 6.38 Build 16
WinRAR Crack
IOBIT Uninstaller Pro Key

shakeel said...

Keep up the good writing.
Native Instruments Massive Crack

Acent Feat said...

It includes all advanced associations to make this software more famous around the world.
Visual Studio Crack
Autodesk PowerMill Crack
All In One GSM Crack
MATLAB R2021a Crack
Harrison Mixbus Crack
CPUID HWMonitor Crack
PassFab Android Unlocker Crack
Forest Pack Pro Crack
Little AlterBoy Crack
iZotope Vinyl Crack

zunairahashmi said...

Thanks For Post which have lot of knowledge and informataion thanks.... Native Instruments Massive Crack
Native Instruments Massive Crack
Native Instruments Kontakt Crack
Native Instruments kontakt Crack

Anonymous said...

Thank you so much for sharing.
autodesk-powermill crack
kls backup pro crack
airparrot crack
auslogics boostspeed premium crack
snaptube crack
aurora hdr crack

Kiran Jameel said...

I guess I am the only one who comes here to share my very own experience guess what? I am using my laptop for almost the post 2 years.

iZotope Vinyl Crack

Rana said...

I hypothesized that most people living in Israel (and globally) have unsafe WiFi passwords that can be easily cracked or even guessed by curious neighbors or malicious actors.WiFi Password Hacker Online

Samia Beel said...

The latest version 2201.1 with 58.80 MB, Pandora One APK is the perfect app for those who breathe with the beats. It is basically a music app. Pandora One APK