Is there any reason why a Visual Studio 2013 Project which is error free and works perfectly locally would not render some CSS and JS files remotely?
I have checked the remote host and all files/folders have copied successfully and the pages work but the Site.css does not appear to be rendering correctly.
Any help would be much appreciated :-)
I think I've found a solution to my problem, I ensured Release was select in Solution Configurations then removed all files from Content and Scripts folders. Then for each of the Content and Scripts folders I added back the existing items.
I then clicked Clean WebApplication1 followed by Build WebApplications1, ran the project through Internet Explorer and Firefox just to make sure everything was still functioning and displaying normally locally, which it was so then clicked Publish WebApplication1 and under Settings I selected Release and ticked Delete all existing files prior to publish.
All CSS and JS render perfectly both locally and remotely now.
I hope this solution proves useful to others :-)
Related
I have a .js file that is being statically served in my application. This file will continue to change through the course of development-
I had made some changes to the file this morning as I normally do. Debugging the project, I discovered that the changes in the .js were not reflected- i.e. the browser was using an older version of the javascript file.
I have been working on this project for a few weeks and the changes in the .js file have always been reflected in the next debug until today. I have tried in both Chrome and Edge.
What gives? I'm puzzled about the change in behavior. I did receive a Windows update overnight, could it be there's a global setting for browser caching which was previously disabled on my system and was enabled by the update. I am aware of cache busting techniques but in the past, I've always just been able to update the a static .js file and the browser has always used the latest .js file.
Hopefully someone else might find this helpful. I was poking around Visual Studio and in the "play button" next to IIS Express, there is a menu option called "Script Debugging" that I happened upon and was set to disabled. I enabled the setting and things are back to working as previously.
I was able to confirm that by disabling the setting, Chrome and Edge use a cached version of the script file.
My guess is a Windows update disabled the setting. Can someone explain how changing this setting in Visual Studio affects caching in browsers?
I'm learning Ext JS so I installed the Sencha.vscode-extjs extension v1.0.1 in my Visual Studio Code (which is new as well, just downloaded today). I want this plugin because I saw where you can put your cursor on something like a controller and do Control+MouseClick and it will open that file. Very handy when dealing with large Ext Js apps. But I can't seem to get that feature to work. I keep seeing No definition found for 'main'...
I have verified that the extension did finish indexing everything by looking at the vscode-extjs.log file. It did take a very long time to index because I also have all the example Ext Js apps. Any idea what I'm missing? Thanks!
UPDATE: The controller is in the same folder, see image...
I think I finally figured it out. I can now Ctrl+Hover over extend, controller, requires, etc... and it will show a popup of its definition and when I Ctrl+MouseClick (or press F12) it opens that file. What I did to make it work was I opened just a single Ext JS app folder then waited for the plugin to index everything. That's it. Before, I had my entire "Projects" directory open in Visual Studio Code which contained about 8 sub folders all of which were Ext JS apps. So maybe there were naming conflicts between the different apps or maybe this plugin just wasn't intended to work with multiple apps at once.
I just downloaded VS15 2015 Community on my Windows 10 machine, and just installed all of the default packages.
For whatever reason, if I try to open a javascript file, or nearly any other extension, it takes about a full 15-20 seconds for it to load. This code says nothing but the word test in text.
Now for whatever reason, if I decide to right click the javascript file and select
Open With > "Microsoft Visual Studio Version Selector"
instead of with plain Microsoft Visual Studio 2015, it opens instantly, in like 2-3 seconds tops...
What is going on? This is so irritating! I've already reinstalled VS 3 times, cleaning out all old junk files, and even tried running it without a single tool or extension installed, and it still behaves this way unless I open it with Visual Studio Version Selector, which happens to not be listed in my list of default programs in the control panel, just the original Microsoft VS 15, so I can't even set it to that as a workaround.
If anyone know what could be wrong or a possible fix, please let me know!
Thank You!
I appreciate this is an old post but I had the same problem and was looking everywhere for a solution.
What worked for me and the rest of my team was to delete the contents of the '_references.js' file that's in the 'Scripts' folder in the project. It has something to do with intellisense which doesn't seem to work anyway which makes the file completely useless. Our project is very large with a lot of js files so I don't know if that was the problem but when it was refreshing the intellisense it took ages and this seems to stop that happening.
Hope this helps someone! :)
Reference: http://madskristensen.net/post/the-story-behind-_referencesjs
I've got community 2015 version of Visual Studio. I'm working on a project in typescript and I've got problem with syncing modified datas with browser. Typically i'm working on some part of code, debug it and change, then ctrl + save and ctrl + r to refresh browser. And It looks that newly generated source maps aren't applied becouse I still have old version of .ts code! (but javascript is corrected). So javascript and .ts arent synced eachother and it's really hard to debug. What should I do to make it work?
EDIT:
ofc, My files are edited in Visual Studio, not in browser.
ALSO:
I noticed that in most cases it's good to work on anonymous mode in chrome. It helps to keep files synced (even I've got checked disable cache).
It helps to keep files synced (even I've got checked disable cache)
For development you should return the file with cache disabled using http header:
Cache-Control:no-cache, no-store, must-revalidate
So today Visual Studio (2013/Update1) thought it would be amusing to do a checkout every time I open a Javascript file. It only happens with javascript files -- .css and .cs files in the same project work just fine.
I've tried diffing my project file in source control, and I don't see anything that would cause it (there are a lot of changes, because I just updated some nuget packages, but the changes all seemed to just be file includes for the swapped out .js libraries).
I've tried the obvious stuff, like rebooting and deleting my .suo file. For now, I guess it's just a nuisance, but I would like to fix it.
I am running Resharper 8.1, if that could have anything to do with it.
It appears that the latest Web Essentials update, 1.8, has fixed this issue.
This seems to be the bug we were experiencing: https://github.com/madskristensen/WebEssentials2013/issues/596