ASP.NET MVC Bundles not picking latest updated scripts - asp.net-mvc

I am trying to use bundles for registering scripts in my project.
I notice that the runtime isn't picking updated scripts into the bundle collection.
Is there some settings to be made for the bundles so that files are minified as changes are made to existing files ?

Related

Electron share dependencies within multiple electron.js applications

I am working of multiple electron applications and i am not using installer to install my electron application instead of installer i am using win-unpacked folder because i don't want to install application.
since win-unpacked folder hold all the required dependencies it doesn't required installation but i want to use same dependencies for my other electron applications (dependencies such as dll,resources etc) to reduce size of multiple builds.
when i try to put other exe to win-unpacked folder it shows ui of the same application because resources folder is same, i think there must be some way to change resources folder name or at leaset .asar name change while creating build will resolve issue.

How to make TFS include bin and debug folders by default

I recently started working on a project that is using .Net Core & React. Our shop is using TFS for a version control and this is where I encountered a problem.
When React project is created it uses NPM that loads up a bunch of files in "node_modules" folder as dependencies. Some of these modules have "bin" and "debug" folders in them, but TFS naturally ignores them causing compilation issues for other developers.
Is there a way to add something like "!\ClientApp\node_modules*" to ".tfignore" file to eliminate this behavior on certain paths?
Remove all folders generated by package managers from source control entirely. Restoring packages should be part of your build process, both on your desktop and during CI.

Upgraded to Bootstrap 4 - still serving Bootstrap v3 in ASP.Net MVC 5 project

I have Boostrap v4 script files installed in my project ~/Content and ~/Script folders, but when run my project uses Boostrap v3! Why, and how to force it to use v4?
It is an MVC 5 project contained in a solution with a UWP project. I have upgraded the MVC project to Bootstrap v4, which has updated all of the Bootstrap files to v4. I'm not using a CSS preprocessor. My BundleConfig.cs is unchanged, and seems to load whatever version is found in the ~/Scripts folder:
bundles.Add(new ScriptBundle("~/bundles/bootstrap").Include(
"~/Scripts/bootstrap.js",
"~/Scripts/respond.js"));
But when run, if I interogate the HTML then the bootstrap file served is v3:
When run, Visual Studio generates a temporary "Script Documents" folder underneath the parent solution for displaying "client-side script files generated from server-side scripts" - and the Bootstrap file loaded here is v3:
I noticed that the upgrade to v4 did not download updated versions of the boostrap-theme.css/.css.map/.min/.min.css.map files - but pages and elements load fine with these files removed from the project so I think its unrelated.
After updating the Bootstrap script files to v4, what other configurations are required for ASP.Net MVC to load Bootstrap v4 script files from it's project ~/Content and ~/Script files?
Clearing the browser cache did it for me

CSS intellisense not working after migrating MVC 5 Project to Bower

I've just switched a project over to using Bower and I now have blue squigglies under all the CSS classes from bower packages in my views:
I'm guessing this is because intellisense isn't finding the CSS files?
I've set Bower up to put all the files it downloads in a folder called lib at the root of my web project, that lib folder isn't included in the project in VS:
I don't really want to add that folder as it will contain thousands of files and make the proj file huge I imagine (I did try adding it, but VS just went unresponsive).
The Bower CSS files are being loaded into the project using the MVC bundler:
bundles.Add(new StyleBundle("~/Content/css").Include(
"~/lib/bootstrap/dist/css/bootstrap.*",
"~/lib/font-awesome/css/font-awesome.*",
"~/lib/AdminLTE/dist/css/AdminLTE.*",
"~/lib/AdminLTE/dist/css/skins/skin-blue-light.*",
"~/lib/AdminLTE/dist/css/skins/skin-green-light.*",
"~/Content/site.css"));
I'm using ReSharper, but switching it to use VS's Intellisense doesn't make any difference. Dave Paquette seems to have identified a similar issue in VS2013, is this just the expected behaviour with Bower?

Visual Studio 2013 Web Deploy Missing Dependencies

I have recently run into an issue where (for some reason this behaviour has appeared out of nowhere) during web deployment of a project to Azure Websites - some reference assemblies of the dependent projects are not automatically included into the deployment package.
SO this is a rough structure of my project:
1) ASP.NET MVC project that references class library project
2) Class library project that references some NuGet packages
Now, when I web deploy the ASP.NET MVC project to Azure Website - not all of the NuGet packaged assemblies from the reference class library are deployed (it seems that some are included automatically and others are not). Everything works fine when run locally. All of the required assemblies are copied over to the bin folder of the ASP.NET MVC project.
Now, the only way that I have found to work around this issue is to add the NuGet package of the missing reference directly to ASP.NET MVC project. I really don't like this workaround - since it breaks the modular structure of my project.
Surely there must be a way to specify which assemblies are to be included with Web Deploy? I have tried some pretty extensive google searches on the topic - but that didn't yield an working solution.
Try the following for each of the offending Nuget packages:
Open the Package Manager Console. Make sure the Default Project dropdown is set to your MVC project.
Run Uninstall-Package [Package Name] -Force
Run Install-Package [Package Name]
If you need to keep a particular version of a package instead of just pulling the latest in, you can add -Version [Version Number] to the end of the last command.
That will essentially refresh all the references and other bootstrapping for the package, then try to web deploy again.

Resources