Change default opening and saving location in Visual Studio Code? - settings

Is it possible to change the default opening and saving location when trying to open and/or save a file.
The default location seems to be the root, but I would like it to be the desktop.

I haven't found anything in the Preferences settings that would support this, nor found anything stating that this is supported.
As you've stated yourself, the default location is the root of your system. At least, if you aren't working in a folder.
What you could do, of course, is simply open your ~/Desktop as a folder in VSCode. Then, automatically, your default save location is exactly as you'd like it to be.

In case anyone is still looking for this, you set this in settings.json using the key "git.defaultCloneDirectory"

You can change the location of your projects/solutions.
File -> Open -> Projects/Solutions
To do this modify
Tools -> Options -> Projects and Solutions -> Locations
I think that's the closest you can get.

The topic is documented in multiroot workspaces.
https://code.visualstudio.com/docs/editor/multi-root-workspaces
Just for reading, though I couldn't find default folder config by the first look into the article.

Related

How to change the owneship of default.conf file in code::blocks editor in ubuntu?

I just started using code::blocks editor and found that its default font size is smaller to me.Whenever I open it I have to manually resize the font by settings -> editor -> choose. I'm finding a way to make my customised settings as default.
I have searched about it all over the internet but didn't find a solution. I somewhere read that basic settings are stored in a file named default.conf which is only readable and only root has permission to edit it. How can I change its permission to make it writeable or some other way .So, can somebody please help me how can I make my customized settings as default. I'm in desperate need.

What is actually contained in a *.suo file?

I've read the MSDN Article about Solution User Options files
The solution user options file is used to store user preference settings, and is created automatically when Visual Studio saves a solution.
But what sort of settings or information is considered a "user preference setting"? I have a weird issue with one of my Solution files I've received from another company and the only fix seems to be periodically deleting the *.suo whenever the problem occurs. Can't figure out what sort of information is actually stored there though. I know it's nothing important, but I'd still like to know and I cannot seem to find the answer.
Basically the suo file(i.e., Solution User Options) contains the information related to to a user level customization like breakpoints, bookmarks, Outlining, debugger watches etc.
Also note that if you delete the suo file then Visual Studio will create a new one.
Link directly from Microsoft
In addition to what Rahul Tripathi told, suo file also stores
the list of files that are currently open in your editor so that when you relaunch solution after closing it, same files will be shown in the editor to resume our work.
the current active project in the solution, so that when you relaunch it is active again.
To understand better, delete suo file and reopen your project, all the above settings will be lost.

Renaming namespaces in windows phone

Is it possible to rename the namespace, projectfolder, solution name in windows phone? I have a paid version and free version of app. The free version of the app has minor modification. So I tried copying the whole project folder of the paid version and tried renaming the namespace, solution name, foldernames. I landed up in a bag full of errors!!
Is there any way i can do this? or do I have to do it the hard way?, have to create a new project and files and Ctrl+C the whole content???
Could someone help me on this?
Alfah
Why do you want to rename the solution and project? If you want to change the name of the app, you just have to edit the manifest file.
If you really want to change the namespace, you can use Visual Studio's refactoring features: http://msdn.microsoft.com/en-us/library/6kxxabwd.aspx
Yes, but it's a 3-step process:
Rename all the namespaces, references, configuration etc (basically, everything you can find through full solution code search). Make sure it compiles.
Close solution. Rename files on the disk. Open the solution file in the Notepad, update the renamed folder references. Make sure that after opening the solution in VS it opens correctly.
In the project properties, select the Startup Object (http://www.jayway.com/2011/10/12/fixing-wp7-app-not-starting-after-project-rename/)
Yes definitely you can!
Please refer following steps
Open LocalizedStrings.cs and refactor namespace from it.
Rename project solution
Expand properties and open AppManifest file
Change the display name and tile title
Right click on solution file and select clean solution from contextual menu.
Here you are ready with your project with new name! Enjoy!

VS2008: Disable asking whether to reload files changed outside the IDE

I have a Visual Studio 2008 project where some code files are generated with each build (a parser, integrated via MSBuild aka editing the *.csproj file).
VS does not know about the generated nature of these files (i.e. they are not the result of a "Custom Tool). So they "change" with every build, naturally. And VS2008 asks me after every build if I would like to reload those files:
This file has been modified outside the source
Do you want to reload it?
That would be ok if I had one of those files opened and in front of me, but I get these modal dialogs even with none of the code files opened.
So my question is: Is there a way to disable this dialog, per project, per solution or globally?
Thanks!
For VS2008: Tools > Options > Documents > Detect when a file is changed outside the environment
For VS2010/2012/2013/2015: Tools > Options > Environment > Documents > Detect when a file is changed outside the environment
In Visual Studio Pro 2012
There is an "Auto-Load changes, if saved" that works.
Tools > Options > Environment > Documents > Detect when a file is changed > Auto-Load changes, if saved
Because a picture paints a thousand words...
I generate source files on every build, and I don't (normally) get a "file has been modified" message if the file is not open in the editor.
I was getting it just now, however, on a closed file. (That's why I went searching for this question.)
I think that's a bug. The file seems to get wedged sometimes. (But this is the first time it has happened in about a year.)
I think I've found a work-around just now: Open the offending file and then close it again.
The point is, you shouldn't need to turn off changed file detection.
This is an old post, but what worked for me was slightly different and I wanted to share:
This file has been modified outside the source
Go to Tools -> Options -> Debugging -> General and uncheck "Require source files to exactly match the original version". This allows you to use source code which is not the same as original version.

Where is the Visual Studio layout saved?

I am having problems with VS2008 moving the windows around and losing tabs when I close it and open again, or when I go from coding to debugging and back. (Yes, I know that it is supposed to save different layouts for coding and debugging). I have tried exporting my settings, but it informs me helpfully that
Your settings were exported, but there were some errors. Error 1: Some command bar settings were not exported correctly due to an internal error.
Importing them again gives a similar error, and doesn't solve the problem. Does anyone know where VS saves the layout info? Or how to reinitialise the layout, without changing all my other settings?
Some of the layout information is stored in the registry for the current user.
HKCU:\Software\Microsoft\VisualStudio\9.0
If you're really having a lot of problems you can take the desparate step of deleting or renaming this key. Personally, I would rename it, start VS and see if that fixed my import export settings problem.
This is what you're after:
Tools > Import & export settings
You will need to make it work though. Maybe manually saving it from
My Documents\Visual Studio 2008\Settings
Export your current settings. Don't choose to export the layout settings.
Reset IDE settings to your favorite
Import your exported settings
You might want to try Window > Reset Window Layout. This will reset the windows the way they were configured the last time you imported a layout.
It sounds like you might have a permissions problem trying to export the files.
Another possibility that's a little less likely is that your *.suo files are being versioned, and so when you update your projects your layout for that project is updated as well.
As far as the export bug goes this seems to be a longstanding bug in VS, they can't seem to fix it. When you export your settings uncheck the check box for menu and command bar. That seems to be the one that usually is throwing the error. Then you will at least have almost everything backed up, before you reset all your settings.

Resources