VS 2010 .dll.refresh is in TFS but not .dll - visual-studio-2010

I have a Web site project open from TFS. When I expand the files related to one dll, it shows that the .dll.refresh is under source control, but the plain .dll is not. If I right-click on the .dll there is no option to "Add to Source Control". How can I add it?
Thanks

Don't add the dll files from the bin folder. The .refresh files are text files which tell the aspnet compiler where to copy the dll files from. Open the .refresh files to see where it expects to find the dlls and manually add them from that location. Visual Studio will want to exclude them so using the Source Control Explorer window click the "add files" icon and in the dialog box that appears select the "excluded" page and include the dlls.
Make sure you add the dll folder(s) to the build workspaces if you're using builds.

Related

Could not find file [Visual Studio]

I have cpp and header files in my solution. I moved them from the default solution folder to a subfolder. Now visual studio says it can't find the files in the old place. How do I tell VS to search in a new folder?
Turn on Solution Explorer window View - Solution Explorer. Hover over your files in the new directory, right click on them and choose Include in project. Hover over these same files in old directory and choose Exclude from project.

Visual Studio, Copy files to project directory problem

I have Visual Studio community 2017. coming from eclipse it was just enough to copy file to project directory and hit refresh then files were appearing in project explorer.
In VS, however when I copy some i.e. *.cpp or *.h in windows explorer to project directory, in VS solution explorer I can not see them. switching to folder view I see but can not include them into project.
via drag&drop to solution explorer (project view) I see them but are not part of project and in folder view and actual directory there is nothing.
what is going on with VS? How can I manually copy paste some files into project while they become part of project?
I will note that there's nothing "going on" with Visual Studio in the sense that something is actually wrong with it, it's just that adding files to your project just requires you to actually add them to your solution. Essentially, it allows you to add miscellaneous files to your folders without automatically including them in your build project (for example, if you're working with some test images/files).
To add files/folders to your project you simply right click on your project in the Solution Explorer and then go to Add > Existing Item.... Then, it's just a matter of selecting one (or Ctrl + A/Shift Clicking to select all/multiple files) and then it will add them to your solution.
In the solution explorer pane, click on the show all files button,
it will reveal all files including your pasted file,
Right click on your file and select "include in project".

Add reference during project load within Visual Studio

There some assemblies (.dll) or cs files in a folder named D:\MyFolder. I have project in Visual Studio and I want to add assemblies from above folder into References and add CS files from above folder on project load. Is there such feature?
Thanks.
There maybe slight differences depending on the version of Visual Studio that you are using but to add any dll as a reference to your project, just right click the 'References' folder of your project and then click the 'Browse' button in the Add References dialog.
This is the exact same procedure for adding a cs file to your project. Right click your project, click Add, click Existing Item and then find your cs file from the file dialog and press OK.
UPDATE: There is no automatic way to point to a folder and have all files and or references in that folder added. You can do a multi select of dll's or cs files in either dialog so that way you can multiple files.

adding multiple existing folders and multiple existing files to Visual Studio project in single step

Does anyone have a way to add multiple folders and (existing) files within those folders to a Visual Studio project in a single step (or via macro)? Let's assume all of the folders and files were copied/pasted into the project folder where they need to reside relative to the project folder, but are not actually stored in the .csproj or .vbproj file, which I believe is a requirement to compile those files into the solution/project.
This works great if you have a web application project in your solution, but not so well if you have a .csproj or .vbproj. In that case, you must manually add folders (and nested folders), and add existing files and browse to each one individually, which can take a long time.
In the solution explorer, select the project, click the "Show All Files" button - .
This will show all the files, even those not part of the project. You can now select all of these in the solution explorer (using Ctrl + Click) then right click and go to "Include In Project".
In Visual Studio 2013 (and possibly earlier) you drag the folder from windows explorer and drop it on the project in the solution explorer.
Other answer given in this thread wouldn't work for me as the files I want to add (DTSX files) are in a different folder, and copying/moving them causes other problems. Here is what worked for me:
Using Visual Studio 2015, use Windows Explorer to locate the files you want to add to your project. Copy those files to the clipboard. If DTSX files are what you are dealing with, in the Solution Explorer right-click on SSIS Packages, and then click on Paste.

Storing referenced Dlls in visual studio solution folder

I want to have a library folder that stores all my dlls. What I'm currently doing is as suggested here. Have physical folder, create solution folder, copy the files.
If I'm using SVN, I'll have to use tortoise on the file explorer to add the library. Not sure if I'm going to have to do the same thing in TFS.
In vs 2010, is there any easier way to do this? I want to be able to just drag a dll into the library folder inside visual studio and have it physically put the dll in the folder.
This is how I do it. Not sure if there is any other better way:
Right-click on your solution from the Solution Explorer. Hover over
"Add" and select "New Solution Folder". It's not really a folder
and does not point to any Physical Folder. It's an abstract
construct for grouping projects within a solution, but we'll use it
for something else.
Call it something like "Referenced Assemblies".
Next, Right-click on your solution again and click on "Open Folder
in Windows Explorer". In the windows explorer window that pops up
add a new "Physical Folder" (this will be located right underneath
the Solution's root folder).
You can call it "Referenced Assemblies" so that the Solution Folder and Physical Folder share the same name so as to avoid confusion.
Grab all those DLL's lurking everywhere (i.e. the
AjaxControlToolkit.dll or the DocumentFormat.OpenXml.dll buried in
program files) and copy (DO NOT DRAG - keep the originals where they
are) them into the "Referenced Assemblies" folder in Windows Explorer
(NOT IN THE SOLUTION).
Now you can drag those copied dll's from the "Referenced Assemblies"
Physical Folder in Windows Explorer into the "Referenced Assemblies" Solution Folder
in Visual Studio's Solution Explorer.
Go through each project in your solution and remove all references
to the assemblies you will be referencing from the "Referenced
Assemblies" folder.
Add the references back in, but this time (under the project)
right-click on "References", click "Add Reference...", select the
"Browse" tab, click the folder icon with the green arrow (says "Up
One Level" when hovering over it), double-click the "Reference
Assemblies" folder, select all the dll's you wanna reference and
click "OK".
You're done. Now that your solution knows of these dll's and where to find them, when you check in your code (via SVN, TFS, or whatever) it will push them up and copy them down for others to use.
If your using TortiseSVN you don't have to do anything if you're also using the AnkhSVN plug-in for Visual Studio. It studies your solution file (just like TFS does) to find files referenced by the solution. In this case it will pick up on the new dll's being referenced by the "Referenced Assemblies" Solution Folder and automatically add source-control tracking before committing them (that is if you commit your solution changes from the Solution Explorer in Visual Studio like I do).
Hope this helps.

Resources