Conditional compilation directives are your friend:
#if DEBUG
var jsBundle = new Bundle("~/Scripts/js");
#else
var jsBundle = new ScriptBundle("~/Scripts/js");
#endif
More Related Contents:
- Can the ViewBag name be the same as the Model property name in a DropDownList?
- How to make custom error pages work in ASP.NET MVC 4
- How can I specify an explicit ScriptBundle include order?
- How to “warm-up” Entity Framework? When does it get “cold”?
- How do I render a partial form element using AJAX
- Is it possible to access MVC Views located in another project?
- mvc uppercase Model vs lowercase model
- Context menu to Add Controller/View missing
- The type initializer for ‘System.Data.Entity.Internal.AppConfig’ threw an exception
- How to return raw string with ApiController?
- The anti-forgery cookie token and form field token do not match in MVC 4
- ASP.NET MVC4 Bundling with Twitter Bootstrap
- {version} wildcard in MVC4 Bundle
- MVC4 – Bundling does not work when optimizations are set to true
- All requests to ASP.NET Web API return 404 error
- Disable browser cache for entire ASP.NET website
- ASP.NET Identity with EF Database First MVC5
- Is it possible to use Razor View Engine outside asp.net
- Using VirtualPathProvider to load ASP.NET MVC views from DLLs
- ASP.NET MVC how to disable automatic caching option?
- How and where to call Database.EnsureCreated and Database.Migrate?
- IIS URL Rewriting vs URL Routing
- ASP.NET MVC framework 4.5 CSS bundle does not work on the hosting
- MemoryCache Empty : Returns null after being set
- How do you avoid XSS vulnerabilities in ASP.Net (MVC)?
- Display a view from another controller in ASP.NET MVC
- Log4net does not write the log in the log file
- Serving favicon.ico in ASP.NET MVC
- ASP.NET MVC ViewModel Pattern
- ASP.NET MVC Performance