Set root directory for project in Visual Studio 2012 Solution Explorer - msbuild

Visual Studio 2012's Solution Explorer can be configured to display the actual files on disk (rather than just project files) simply by toggling the Show All Files button. Each project will display the files and folders located in the same folder as the project file itself.
Is there any way to change the root directory of what is displayed?
My cross-platform project is organized like this:
project/ide/vs2012/project.sln
project/ide/vs2012/project.vcxproj
project/src/*
I want Solution Explorer to show the files in my src directory, not my vs2012 directory.

I created a symbolic link under the vs2012 directory to point at my source code:
MKLINK /D src ..\src
Now Visual Studio sees the src folder underneath the project.

I think, if I understand correctly, you should open up the .sln file at the project's root in a notepad application and you'll find what you're looking for in there.

Related

Adding a folder with files to application - Visual Basic 2010

In my current project I have a folder with several files that the application needs to function properly. The folder is in the bin/debug folder and with the line Application.StartupPath I can easily access the files. It couldn't be easier.
However, when I publish the application the files don't seem to be included in the project, at least not at the StartupPath.
So my question is: how am I supposed to add this folder to my published application?
First, you'll need to include those files in your project. Then click each file in the Solution Explorer and in the Properties Windows change the value for "Copy to Output Directory" to "Copy Always".

Visual studio C++ relative path

In Visual studio C++/Cli, relative pathes are relative to what? Which directory is equivalent to "." ? For example, if the solution file is at "C:\dir1\project.sln" the where is "."?
At runtime, relative paths are relative to the working directory that the application was started with.
When you run from Visual Studio, the working directory is where the project file is located.
When you double-click an exe in Windows Explorer, the working directory is generally the same as where the exe is located.
From the command line, you can have the working directory be anything: navigate to the directory you want to use as the working directory, and run your exe by typing the full path.

How to copy dll config files into bin folder while publish in Visual Studio 2013?

I am working on a web application that use some external dll with config files, such as Lib1.dll, Lib1.dll.config, etc. Basically these files are manually copied into bin folder and only got loaded at run-time.
I tried to add those dll as reference and am able to copy these dll files into bin folder, but how can I deal with those config files? Is there a way I can include these config files in solution and force them copy to bin folder when using Visual Studio publish?
Please help, Thank you.
You can include the files into the project in Visual Studio, and change the file property "copy to output directory" (in "Properties Window") to "always" or "copy if new".

Why organize projects inside a src folder?

First of all, I would like to make it clear that I know that the src folder is not required. Indeed, one can simply create manually one directory for the project, make one valid project.json and one Startup class and everything should work fine even without Visual Studio.
My point is the following: when we create a new project using ASP.NET 5 from Visual Studio 2015 it creates a solution and inside the solution's folder it creates one src folder. Within this folder all projects are created.
Now why would anyone want to make one src folder inside the solution folder? Why not putting the projects direct onto the solution folder? Is there any advange on the organization of the project to put the projects inside a src folder? Why VS does that now?
You usually have more files inside your project that are not source code related like:
README.md
CONTRIBUTING.md
.gitignore
LICENSE
Build scripts
Docs and tools folders, etc.
And a tons of others files that depend on your configuration. So, if you have a src folder, you don't need to mix your source code files with those.
because you may have your code in src folder (class libraries, etc), test in your test folder, documentation in a documetation folder
in global.json you specify which folders does roslyn pick for compiling.

Cannot find/open Bing Maps module Orchard

When installing the "Bing Maps" module into Orchard 1.6 (source version) the module does not show up under modules in solution explorer.
Other modules are simply found in the root under Modules but for some reason this module is not.
It is located on the following location: C:\Orchard\src\Orchard.Web\Modules\Bing.Maps
How come its located here and not showing up in the Solution Explorer (The Orchard.web does not show modules in solution explorer)?
For installation i just went to admin dashboard --> gallery and install.
I need to edit this module because its having troubles with my regional settings, but i do not like editing files i cannot open in solution explorer (when opening through file/open file many lines are marked in red).
Thanks.
Modules are always physically located on the filesystem under the path e.g. C:\Orchard\src\Orchard.Web\Modules\SomeModule When you install a module, the files are copied to this folder.
The root Modules folder that you refer to is a solution folder used in visual studio to organise projects within the solution explorer. Projects can be moved to these virtual folders without affecting their location on the file system. To add your new module to this folder in Visual Studio solution explorer, right click the Modules solution folder and select Add => Existing project and select the project file for your new module.