Results 1 to 3 of 3

Thread: [RESOLVED] Changes in CSS file not showing up when running code in VS

  1. #1

    Thread Starter
    Fanatic Member
    Join Date
    Jul 2007
    Posts
    523

    Resolved [RESOLVED] Changes in CSS file not showing up when running code in VS

    I am using VB, .net version 4.6.1

    I am making changes to an attached css file, just changing the top property of an object from 444 to 544. I save the file and run it inside VS, and the change is not reflected. I am using Chrome for the browser. I hit F12 and looked at the CSS setting, and it still reflects the old value of 444.

    I exited VS and reloaded the app, but I still have the same result. I also rebooted my computer, and got the same result. Up to now I have made lots of changes to the code and the CSS file and it all has been reflected, but now it does not. Changes to the aspx file do show up.

    Any idea how to address this?

  2. #2
    King of sapila
    Join Date
    Oct 2006
    Location
    Greece
    Posts
    6,597

    Re: Changes in CSS file not showing up when running code in VS

    I don't know you exact solution but I assume for aspx pages you can try these:
    1)If it is an external file, delete the href from you page , run the page, re add the href
    2)If it is on the server then, delete the file and re attach it.
    3)By Visual studio project menu, try doing a "clear solution" and rebuild your project.
    4)If everything fails, create a new project copy everything, without the CSS, the attach or link the CSS.
    ἄνδρα μοι ἔννεπε, μοῦσα, πολύτροπον, ὃς μάλα πολλὰ
    πλάγχθη, ἐπεὶ Τροίης ἱερὸν πτολίεθρον ἔπερσεν·

  3. #3

    Thread Starter
    Fanatic Member
    Join Date
    Jul 2007
    Posts
    523

    Re: Changes in CSS file not showing up when running code in VS

    Thanks for the pointers. I believe the file is being cached by VS. I even removed the file from the project, and it still was there when I ran the project, although it had a ":404" after the filename.

    I resolved my problem by:
    1) removing the file from the project
    2) renaming the file by adding a version number in the file name
    3) reattaching the file to the project
    4) searching the project for the old file name (it was in site.master), and modify it to point to the new filename.

    Since this addressed my problem, I marked the thread resolved. It would be a lot cleaner if VS would handle this automatically. It is odd because it had done it in the past. If someone knows how to automate this and make VS handle it automatically, please let me know.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width