.vs folder & applicationhost.config ( core MVC) RRS feed

  • Question

  • Why is the .vs folder hidden?

    Is it okay if I set it to not hidden?

    Why do I have to delete applicationhost.config everytime I want to run my core MVC project on another pc? If I don't, I get an error regarding IIS Express saying something along the lines that it is unable to run.

    Thank you

    • Moved by CoolDadTx Friday, September 13, 2019 1:58 PM VS related
    Friday, September 13, 2019 4:59 AM

All replies

  • The `.vs` folder is a per-machine, per-user folder that Visual Studio uses to store your stuff for VS like open files, breakpoints, cached settings etc. It is hidden because you should never touch this folder or share it with others. Furthermore it shouldn't be in source control as it is useless to everyone else. There is no reason to change anything about this folder or its structure. In fact if VS starts having issues the first thing you'll do is wipe the folder so VS will rebuild everything.

    Your issue with running your app on another machine has nothing to do with this folder. All MVC settings are stored in the project file by default. Check your project settings to ensure you have the option to store the IIS settings in the project file. The solution can then be moved to any other machine with the appropriate workloads installed and run just fine. The only time you'd run into a conflict is if the remote machine happened to have an application configured in IISX that uses the same port. In this case you'd have to tell IISX to stomp over the port assignment. But given that port numbers are somewhat random this is unlikely.

    Michael Taylor

    Friday, September 13, 2019 1:58 PM