Results 1 to 11 of 11

Thread: [RESOLVED] VS2017 ignores Location Options.

Hybrid View

  1. #1

    Thread Starter
    PowerPoster Poppa Mintin's Avatar
    Join Date
    Mar 2009
    Location
    Bottesford, North Lincolnshire, England.
    Posts
    2,423

    Resolved [RESOLVED] VS2017 ignores Location Options.

    Hi,

    Not sure this is the right forum but I don't see one specifically for VS problems.

    OK, so here my problem:

    I like to keep all my projects in the one folder. When I start a new one I expect it to be saved in that folder.

    In VS2017 >Tools > Projects and Solutions > Locations.
    I have the following options entered:

    Projects location:
    D:\Visual Studio 2017\Projects

    User project templates location:
    D:\Visual Studio 2017\Templates\ProjectTemplates\Visual Basic

    User item templates location:
    D:\Visual Studio 2017\Templates\ItemTemplates\Visual Basic

    When I start a new project I'd expect to find it in those three Folders, well actually I only look in the first one... Projects location: D:\Visual Studio 2017\Projects. Since I'm starting this thread, obviously it's Not !

    When I search for, in this case, a new project called 'A Server', I only find reference to it in the following locations: -
    C:\Users\Poppa\AppData\Local\Temporary Projects
    C:\Users\Poppa\AppData\Local\Temporary Projects\.vs
    C:\Users\Poppa\Documents\Visual Studio 2017\Backup Files
    C:\Users\Poppa\source\repos
    C:\Users\Poppa\source\repos\A Server
    C:\Users\Poppa\source\repos\A Server\.vs

    What's the point of having an optional location if it's going to be completely ignored ?

    VS2017.
    Windows 10.
    i7 CPU.
    Huge HDD. (only 40% used)


    Poppa.
    Along with the sunshine there has to be a little rain sometime.

  2. #2
    You don't want to know.
    Join Date
    Aug 2010
    Posts
    4,578

    Re: VS2017 ignores Location Options.

    Give this a read and toggle the indicated setting. Your current configuration will not actually save the projects until you commit to saving it.
    This answer is wrong. You should be using TableAdapter and Dictionaries instead.

  3. #3

    Thread Starter
    PowerPoster Poppa Mintin's Avatar
    Join Date
    Mar 2009
    Location
    Bottesford, North Lincolnshire, England.
    Posts
    2,423

    Re: VS2017 ignores Location Options.

    Hi,
    Thanks for the reply.

    I followed the hyperlink. In my VS2017 clicking 'Save' just saves to the same location, no 'Save Project dialog box'.

    Clicking 'SaveAs' does open a Save Project dialog box, it automatically enters the project name which, following the instructions (specify a name that differs from the project name.) I changed by adding a ' 1' to the existing name.
    I selected the folder I wish to use.

    There was no 'Create directory for Solution check box' nor 'Add to Source Control check box' to select.

    I clicked 'Save' and received an error message saying:

    'The project can only be saved into the project location C:\Users\Poppa\repos\A Server\A Server\'
    The 'Options\Projects and Solutions\General dialog box, clear the Save new projects when created check box' was already cleared.


    Poppa.
    Last edited by Poppa Mintin; Oct 5th, 2017 at 08:10 PM.
    Along with the sunshine there has to be a little rain sometime.

  4. #4
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    110,297

    Re: VS2017 ignores Location Options.

    Actually, I just had another look and "Save As" will work if you have selected the project or solution node in the Solution Explorer but if you have selected some other item then you will only be saving that item. That link does say that but you may not have realised exactly what they meant based on the wording used.

  5. #5
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    110,297

    Re: VS2017 ignores Location Options.

    It's not "Save As" that you want but rather "Save All". "Save As" is to save a single file to a specific path. I always have the IDE configured to not save projects by default because I usually don't want to keep stuff that I've done for a test or demo. When I do want to keep a solution, I simply click the "Save All" button on the tool bar and I'm prompted for a project name, location (which is the default setting from the IDE options) and a solution name.

  6. #6

    Thread Starter
    PowerPoster Poppa Mintin's Avatar
    Join Date
    Mar 2009
    Location
    Bottesford, North Lincolnshire, England.
    Posts
    2,423

    Re: VS2017 ignores Location Options.

    Thanks guys,

    Until VS2017 I used to be able to start a project, drop in some controls, write a few subroutines etc, click 'Run' to test it, which would automatically save the project.
    Now, in VS2017, clicking 'Run' as described above, results in a error message saying we have to save the project before running it. Although after a few moments it does run the project.

    When I save the project (before trying to run it for the first time) I get the option of where to save it, so my problem is solved.

    However, I reckon that VS2017 still ignores 'Location Options'! _________________


    Poppa.
    Last edited by Poppa Mintin; Oct 6th, 2017 at 06:30 PM.
    Along with the sunshine there has to be a little rain sometime.

  7. #7
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    110,297

    Re: VS2017 ignores Location Options.

    Quote Originally Posted by Poppa Mintin View Post
    Until VS2017 I used to be able to start a project, drop in some controls, write a few subroutines etc, click 'Run' to test it, which would automatically save the project.
    No, not until VS 2017. VS 2017 works exactly the same as previous versions in that regard. When you build, any modified files are saved. That's it, that's all.
    Quote Originally Posted by Poppa Mintin View Post
    Now, in VS2017, clicking 'Run' as described above, results in a error message saying we have to save the project before running it. Although after a few moments it does run the project.
    No it doesn't. The error message tells you that you must save the solution to a permanent location before managing NuGet packages.
    Quote Originally Posted by Poppa Mintin View Post
    When I save the project (before trying to run it for the first time) I get the option of where to save it, so my problem is solved.
    Exactly as it was in previous versions.
    Quote Originally Posted by Poppa Mintin View Post
    However, I reckon that VS2017 still ignores 'Location Options'! xxxxxxxxxxxxxxxxxxx
    It doesn't, or at least it certainly doesn't for me. It works exactly the same way as previous versions. The only difference between VS 2017 and previous versions with regards to what you've said is the error message relating to NuGet and, if you're not adding NuGet packages, you can simply ignore that.

    This all boils down to one specific setting in the IDE options. Under 'Projects and Solutions' there is a check box for 'Save new projects when created'. That box has not always been there but was in VS 2012 at least and I think 2010 as well. Not sure about before that. It's always been checked by default for me and I uncheck it immediately after installing. If the box is checked then a new solution will be saved under your Projects folder when you create it, hence the extra fields in the New Project dialogue. If the box is not checked then a new solution will be saved under your personal folder initially and if you don't save it explicitly at some point then you'll be prompted to save or discard it when you close VS. Put simply, don't uncheck that box if you want new projects saved when you create them.

  8. #8
    You don't want to know.
    Join Date
    Aug 2010
    Posts
    4,578

    Re: [RESOLVED] VS2017 ignores Location Options.

    "Toggle the indicated setting" meant:


    All Visual Basic and Visual C# projects can be created as temporary projects. If you want to work with temporary projects, in the Options\Projects and Solutions\General dialog box, clear the Save new projects when created check box.

    It seems logical you DON'T want to work with temporary projects, so you should go to Options and CHECK the indicated checkbox. Just as JMC clarified.

    Here's the step that was skipped in terms of saving it:
    1. In Solution Explorer, choose the solution or project that you want to save.
    It's confusing as heck but VS has a notion of "the current file", and generally that's the document in the current tab. But you can't really edit a project file in the same way, so this step is important because "save" and "save as" have a context.
    This answer is wrong. You should be using TableAdapter and Dictionaries instead.

  9. #9
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    110,297

    Re: [RESOLVED] VS2017 ignores Location Options.

    Quote Originally Posted by Sitten Spynne View Post
    It's confusing as heck but VS has a notion of "the current file", and generally that's the document in the current tab. But you can't really edit a project file in the same way, so this step is important because "save" and "save as" have a context.
    It's not really all that confusing because the text on those menu items actually changes based on that context, so it tells you exactly what you're saving. As I said though, I always use Save All, which is on the tool bar (for me, anyway). It has no context and it's fewer clicks.

  10. #10

    Thread Starter
    PowerPoster Poppa Mintin's Avatar
    Join Date
    Mar 2009
    Location
    Bottesford, North Lincolnshire, England.
    Posts
    2,423

    Re: [RESOLVED] VS2017 ignores Location Options.

    Thanks for the explanation Jmcilhinney, I'm sure you're right.

    Having found that I could choose where save my project that first time, I went to do it again with another project and found that the pre-selected location (Which I had had to change) was now pre-selected to the folder of my choice.
    So... from what you've said I suspect that whatever is in that option only changes if I change it, and most likely it's been that way without my noticing for a long while.

    I've always just ran a new project to save it though, without any messages appearing, and before closing VS I've always used the 'Save all' button.

    The hyperlinked article in Sitten Spynne's post (#2) said to uncheck the 'Save new projects when created' box but when I went to do that I found it was already unchecked, maybe that's what's new to me ?

    One other new thing that's been happening, when I save a project for the first time... I get a yellow background warning banner (for the want of a better description) right across the page, just below the tool bar, saying 'something's gone wrong' and that I should 'save my work and re-start VS'.
    That in itself is odd because it only happens immediately after I've saved the project.


    Poppa.
    Along with the sunshine there has to be a little rain sometime.

  11. #11
    You don't want to know.
    Join Date
    Aug 2010
    Posts
    4,578

    Re: [RESOLVED] VS2017 ignores Location Options.

    The hyperlinked article said to uncheck that box "if you want to use temporary projects". You were supposed to CHECK it because you DON'T want to use temporary projects.
    This answer is wrong. You should be using TableAdapter and Dictionaries instead.

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