Where should I keep my projects? There is no special folder in VS Code. Do I have to create it? Where? Maybe .vscode folder is the best option? Or this will be automatically removed after you uninstall/reinstall the editor?
You can keep them in the default location:
%USERPROFILE%\sourcerepos
Or create another folder and name it Projects (for example) in another drive.
Any folder can be your project. That’s why there’s the “Open folder” command. How to best organize your project inside that folder depends on what type of project it is.
Related
My workspace filesystem folder is currently C:\work\Eclipse-Workspace_PROJ and my code filesystem folder is C:\work\PROJ.
I want to rename C:\work\PROJ to C:\work\PROJ-1 but last time I renamed it . . . bad things happened.
QUESTION
What are the steps to rename my code filesystem folder without corrupting things?
You can use Move in the context menu of the Navigator view to move the project to a different folder. This will move the project to a different folder without renaming it.
I sometimes get an error message that the move failed, but the only thing I can see is that the root folder at the old project location is not deleted. After deleting it no further problems occurred (Eclipse Neon.1 / 4.6.1).
Note that the Move function in CDT's Project Explorer view cannot do this.
Since your projects are not inside the workspace directory, they are not at their default location. So renaming the project won't rename the folder.
You should always rename things like Projects inside Eclipse using 'Refactor > Rename'.
There are many things in Eclipse that need to know about the rename, refactor will deal with updating them all.
If you are asking about renaming the Workspace folder then you do that outside of Eclipse (with Eclipse not running). Provided all the plug-ins you have installed in Eclipse are written correctly Eclipse should not care what the workspace folder is called.
Take a backup first if you are worried things may go wrong.
The real answer, according to the comments to this SO answer is that CDT doesn't have the ability to move projects on disk. :(
Copy (not move/rename) the directory on the filesystem to the desired new location.
Delete the Eclipse .project file in that new directory
Delete the old project in Eclipse.
Create a new project in Eclipse at the new location.
Delete the old directory from the filesystem.
I've been working on a project for a little while called (for example) work-example in my work directory.
I'm refactoring a bit and want to move the project from ~/code/projects/work/work-example to ~/work/example. However, I've found that I can't move the project directory without loosing everything. Am I just not understanding something very fundamental about IntelliJ?
My searches have all returned how to move projects within the root folder via the refactor function. This is not what I want to do.
I want to just move the entire directory to a different location.
I'm running OSX.
Thanks so much for your time, everyone. :-)
You should be able to move a project folder. IntelliJ stores all project settings inside in .idea folder or in *.ipr, *.iws, *.iml files. Close your IntelliJ move the project folder and then open from a new location and it's done.
We just started using TFS and it works great. I have one question though, if we delete a folder it's not deleted on my local workspace. We are currently reorganizing a project and I wish to not have heaps of unused folders on my local drive.
Where can I configure this?
Thanks in advance.
In you have the Visual Studio Power Tools (http://visualstudiogallery.msdn.microsoft.com/c255a1e4-04ba-4f68-8f4e-cd473d6b971f) you can use the command line tools tfpt to clean up all your workspaces.
In a shell window
change directory to your workspace root
type \tfpt.exe treeclean /recurse .
This will remove any file or folder not in source control.
Another solution, which also checks how well your project is put together, is to cut the whole folder and move it elsewhere, then perform a get across the project. This will allow you to check if the project will build or if there are some "magic" DLLs missing. Anything that is missing can be retrieved from the copy of the structure and added into source control.
Should I put the icons in:
[Solution folder]\[Project folder]\Resources\Icons
or:
[Solution folder]\Resources\Icons
or somewhere outside the solution folder?
Thanks
Update:
Based on the answers of Ritch Melton and x112358, I decided to put the icons in:
[Solution folder]\[MyProject.Views project folder]\Resources\Images
The easiest approach is to put them in the project folder, otherwise known as the "project cone" in MSBuild parlance, an then add them to the project from there.
Regarding the question of keeping resources (icons, configuration, etc.) under the solution folder versus under a specific project folder, I usually ask the question: Is it unique to a single project or does it apply to multiple projects? If it's shared, I'll stash it at a higher-level folder than if it's project-specific.
For a long time looking for a way to manage references, I haven't found any ideal way.
The main problems are:
1-) Should I include all projects that I use in same Solution and reference the Project? Or reference just the dll file?
2-) If I should reference dll file, the best way is to create a ReferencedAssemblies inside each project or a main folder at svn root?
3-) Its ok paste and reference dll´s inside bin folder of my project?
4-) Its ok add and commit dll´s inside bin folder of my project? This way when a new devoloper checkout the project, it will compile perfect, but isn´t default behavior of visual studio, all source controls ignore bin and obj by default, just adding .refresh files(for web-site project)
Someone can help me?
1) If you include projects in your solution that are already checked in somewhere else, you can change the SVN binding for that project at the solution level in Visual Studio. (File > Source Control > Change Source Control). You would change it to point to wherever it's located in your SVN repo.
2) If you have a lot of developers on different machines all wanting to use the same libraries, it's probably easier to have a common place for all your third-party libraries/assemblies. There's no point in having them copied all over the place in your SVN repository.
3) No, it's not usually ok to do this. I would avoid it (unless somebody has a valid reason for it).
4) Never commit your bin folders. The default behavior is such for a reason. The .refresh files are byproducts of the old Web Site projects and they are fine.
1) In the typical scenario yes, you should reference all projects that you own. But you should make a decision according to frequency of changes made to referenced projects. For example if you have an open source library it is better to include it as an assembly, cos you probably will not change this code frequently.
2) Typical approach is to create separate single directory at SVN root and place assemblies there in different sub-folders according to assemblies type. Here is how my current folder looks like:
3) No, it is better to reference assemblies from some other from bin folder. All referenced assemblies will be copied to the bin while building process. Also note that the purpose of *.refresh files in the bin folder is to prevent you from having to copy new versions yourself.
4) No, you should never commit your bin folder cos you can rely on *.refresh files for WebSites and just forget about this problem for other project types.
1) I'd argue it depends upon your particular situation, especially since Visual Studio is pretty flexible on what projects are included in solutions. (It's not tied to a directory structure.)
We have a couple applications that have one solution with a number of projects contained within (for each 'piece').
2, 3, 4) For referencing and including files within a project, why not just use the functionality built into Visual Studio? Adding references in this way adds the items to your csproj (vbproj) files.
(Based on my research, if you're not referencing a project that's part of the solution, put the DLLs in a directory everyone on the team can access and use that when adding the reference. In the project file it ends up looking like this:
<Reference Include="Elmah">
<HintPath>\\pathInformation\shared assemblies\ELMAH 1.1 32-bit\Elmah.dll</HintPath>
</Reference>
)
This also means that you don't have to commit DLLs; if anything changes the project file will be updated accordingly.
(I'll admit, I'm unsure about that last point. I've seen a lot of people check in external libraries, like ELMAH. I generally follow those who tell you to ignore the bin directory entirely.)