Visual Studio 2012 Business Intelligence SSIS packages missing - visual-studio

I have Visual Studio 2012 solution with multiple BI projects. One of the SSIS projects do not show all the ssis packages in the Solution Explorer (checked in by another teammember). But the missing files are in the TFS (Source Control Explorer) and are visible in the physical folder.
I tried "Show all files" did not work.
I tried adding the file again but the project does not allow that saying "file with same name exists".
Any idea what is going on here

The authoritative source of what's in a project is going to be the ProjectName.dtproj file.
Inside of that will be entries for the packages that comprise the project. For a non-package deployment model, it's trivial to edit the file by hand and make your stuff show up.
It's way too much effort to do that by hand for a 2012+ project deployment model. Open the Project in Visual Studio (ssdt/bids) and right click on the project. Click Add Existing Item (not add package) and then click the "missing" package. Check your .dtproj file in and all is right with the world.

I had the same issue in 2020, I managed to solve it by building the solution.
On the menu select Build-> Build Solution OR Ctrl+Shift+B

Related

Add existing files to visual studio project

I have a straightorward console application that I build using code::blocks. A client has requested a microsoft visual studio project to build it. So I downloaded and installed visual studio and created a project. Now I am trying to add my source files to the project.
Various online help pages say "Select project; select menu item "Add Existing Item" ( e.g. https://learn.microsoft.com/en-us/previous-versions/visualstudio/visual-studio-2010/9f4t9t92(v=vs.100). I cannot find "add existing item"! Add new item simply adds an empty file.
I tried dragging files from windows explorer onto the project, but this REMOVES the file from where it belongs - NOT what I want to happen.
Surely there must be a way to do this! Even without using alternative IDEs, different projects frequently must share common source code, so source files from one project need to be added to another.
The answer is to use File | New | Project from Existing code rather than simple 'New Project' when creating the project

Create Visual Studio Solution from Batch File

Visual Studio seems to consist of a single solution file (*.sln) along with one or more project files (a C# project would have the *.csproj extension).
I have been playing around with a console application that parses existing directory entries to create solution files with the associated project files.
It works, but every time I run into a new project here at work I find myself spending a week or more debugging my console project so that it can churn out a solution for that particular work project.
Is there something out there already that can create a VS solution out of an existing file structure?
As you can tell from my screen capture below, these projects are nested very deep, so it would take a very long time to do this with the apps folder below with the "by mouse" technique in the Visual Studio IDE.
I created the custom console application that is posted in this post:
https://stackoverflow.com/a/22153536/153923
I invite others to contribute how they approached this solution, though.
So, I found out today that this feature already exists in Visual Studio.
Link 1: How to: Create a Project from Existing Code Files
Link 2: How to: Create a Project from Existing Code Files
Basically, though, it says this (just in case the MSDN links get changed or deleted):
You can create a Visual Studio project from an existing app—for example, an app that you obtained from an online source. Project and solution files are created on your computer and the other relevant files are added. A project can be created from Visual C++, Visual Basic, or Visual C# code files.
Security note Security Note
We recommend that you determine the trustworthiness of existing code files before you import them into Visual Studio, because Visual Studio will execute some of the code in a fully trusted process when you open the newly created project.
To create a project from existing code files
On the menu bar, choose File, New, Project From Existing Code.
The Create New Project from Existing Code Files wizard opens.
Use the wizard to specify the details of the existing code files that will be added to the project and the application that will be created when you build the project.
Another good answer was given by cbp in Visual Studio: Create a web application from existing code:
--
OK I figured it out. It's weird, but the following steps will work:
Open fresh copy of Visual Studio
File->New Project, select Web Application
Use the following settings:
Name: Website (this is the name of the existing folder with the website files in it)
Location: C:\Temp\ (anywhere will do for now)
Solution Name: TheProject (name of the existing project's root folder)
Check "Create directory for solution"
Delete the auto-created Default, Global and Web.config files
Save All and close Visual Studio
In Windows Explorer, copy the new folder on top of the existing folder so that the files are merged.
Double click on the sln file to open Visual Studio again.
Select "Show all files" (at the top of Solution Explorer)
Right click on any files or folders you want to add and select Include in Project.
Great idea!

How to open two Solution in one Visual Studio IDE?

I am working on two different solutions, say, Solution1 and Solution2. As these two solutions are dependent upon each other, I have to open two separate Visual Studio while developing.
It is really difficult to switch between these Visual Studio. I can't merge these two solutions into one as Solution1 is being used by other projects and all are part of Source Control.
Just wondering, can I open both solutions in the same Visual Studio IDE? I searched a lot but no luck. Any suggestions on existing VS AddIn or how to develop it would also be helpful.
Visual Studio version - 2012 Ultimate
Source Control - TFS
Create a third Solution C than includes project from both A and B: you can keep C as a local file i.e. you don't check it in version control if this can disturb the team.
Else you can open two instances of Visual Studio and switch at need: VS is smart enough to sense file system changes, but you have to be careful in saving before switching.
Does it have to be within the same IDE instance?
You could right click the VS icon in the task bar, select "Visual Studio 20__", and you will have two seperate instances of VS. You can then open separate solutions in both, without merging the two under one solution.
This will eat up far more resources, however. The previous responses are preferable.
What you are asking is impossible and extremely dysfunctional.
The supported solution would be to add all of the projects from Solution B to Solution A. Then you can open a single solution with all of your work. If you want compartmentalisation within your solution you can use solution folders.
If you can you should have a separate solution for the core components and package them as a nuget package. Both of your other solutions can then take a dependency on that single shared package.
open the solution 1 and right click and add the second solution. When you close the VS next time it will told you once to save the sln file. Do it for saving the settings in sln file.
Now everytime you will open sln1 will show you both project. It will not affect if you only move first project to pen drive or move to another computer. In case of 2nd project missing it will told you that 2nd project not found no more worries.
In case of Source Control - TFS I can't confirm how it work but their is some sollution for github (Which maybe hint anything for TFS).
The same trick can be applied but you don't need to push modified sln so this will not break anyone else's settings. If TFS store the files and code on the file system that you currently working then you can applied same trick to do applied this trick to that TFS project which is stored in your file system.
1.open solution1 in visual studio 2012 .
2.Right click on solution1 ,add existing project option.
3.select the solution2 .
4.Now solution1 and solution2 file are same project.

Dll dependencies on a Visual Studio 2010 solution and TFS

How can I make a solution in visual studio so that the .dll dependencies that reside in some other directory totally different from where the solution itself is affected by "get latest".
What I've tried is creating a Dependencies solution folder within the solution itself and added the dlls to it, that way they belong to the solution even though they don't belong to the directory structure of the solution.
So for example the .sln file is in:
D:\tfs\repository\main\SolutionA\solution.sln
and the dlls are in:
d:\tfs\repository\main\SolutionX\Dependencies\Binaries
What I really want to achieve is to have a foolproof way to build the solution, including the following scenario:
1- Have a brand new installation of windows, visual studio, etc.
2- open visual studio
3- find solution.sln on TFS, double click on it so that visual studio gets every project and files in the solution, and opens the solution
4- successfully build
What happens when I try the Dependencies solution folder approach and repeat the scenario above, it will get all the projects within the solution, opens it, but the dependencies solution contents won't be pulled from TFS (although Visual Studio shows them on Solution explorer), which I think is flawed.
Some suggestions that don't involve creating pre/post build scripts are appreciated.
When you attempt to open a solution for the first time using the TFS Source Control Explorer, you may find that not all of your dependencies will be retrieved - the squiggly line may be highlighting some of your missing References.
One work around is to...
SOLUTION SETUP
Checkout all of your source code from TFS (i.e. Main and all of the sub-directories)
Open your solution in Visual Studio (i.e. MyApplication.sln)
In the solution explorer, create a New Solution Folder called ThirdPartyDll, and then add the appropriate assembly references (i.e. Assembly1.dll, Assembly2.dll,...)
Check-in your solution to TFS
SAMPLE FILE STRUCTURE
Main
MyApplication.sln
Source
MyProjectA
MyProjectA.csproj
MyProjectB
MyProjectB.csproj
Dependencies
Assembly1.dll
Assembly2.dll
You've run into a limitation of the "Open from Source Control" functionality. If you added the solution to source control from Visual Studio you should have seen the following message:
"The project that you are attempting to add to source control may cause other source control users to have difficulty opening this solution or getting newer versions of it. To avoid this problem, add the project from a location below the binding root of the other source controlled projects in the solution."
Open from Source Control will create a workspace mapping for the solutions root directory (D:\tfs\repository\main\SolutionA) but not a separate one for the SolutionX folder which is a peer to SolutionA. On the "new" machine you will need to manually create a workspace mapping to d:\tfs\repository\main in order to get both the SolutionA and SolutionX folder.
Create a solution folder and add the dependencies to it, that way when VS gets latest for the solution it will download these files. A bit brittle as people will need to maintain that folder but it works.
Alternatively create a nuget package and use restore packages on build. It will require a couple of extra steps when you create a new developer box (your nuget package repo will need to be added) but it will work for all projects going forward and is less brittle than the solution folder method.

Empty Visual Studio Project?

Is there a way to have an empty Project in Visual Studio 2008 or 2010? I do not mean an empty solution, I mean an empty project in a solution. Basically I have a solution with multiple projects, and I want to add a project to track some static files that are part of the solution but not of any specific project. Adding them as solution files doesn't work because solution folders are not mapped to file system folders and I want to manage hierarchy from Visual Studio.
At the moment I create an empty Visual C# project which works, but I just wonder if there is a "more empty" project.
I was misled by the C++ "Empty Project" or "Makefile Project". I cant create new folder there.
Here are three steps to add an empty C# project:
1) Create the project. (Add > New Project > Visual C# > Windows > Empty Project)
2) Exclude it from build. (Build > Configuration Manager, uncheck Build on both Debug and Release configuration)
3) Replace its csproj content with the following 3 liners:
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
</Project>
There you go. You can create a folder in this project, yet it does not build.
The Visual C++ project types has an "Empty Project" in the "General" category.
It comes up with several empty folders ("Header Files", "Resource Files", "Source Files") that are just 'filters' (they aren't on the file system). You can just remove them.
It also has all the properties of a C++ project available, so don't put C/C++ files in there unless you want them built (or you exclude them from the build).
Other than that, it's pretty empty.
Probably even closer to an "empty project" is a "Makefile Project" which is also located in the "General" category of the Visual C++ project templates. It also creates the 3 filter folders, along with a readme.txt file that you can delete. It has the advantage that unless you specifically give it commands to run during the build, it won't do a damn thing.
For Visual Studio 2015 up this can now be done with so-called Shared Projects. This is simply an empty project type that holds source files for use within another project, see here.
I found an "Empty Project" under the "Windows" category in both C# and Visual Basic, in Visual Studio 2012. I'm unsure if these are present with Visual Studio 2008 or 2010.
It seems to only create an App.Config file, which can easily be deleted.
I think the C++ empty project does support folders. At least in VS 2013 you just have to click on "Show all files" in the Solution Explorer. Then it will not show these virtual folders (filters) anymore, but real folders in the file system and then you can also create new folders, ...
Sounds to me like you want a solution folder!
Microsoft Visual Studio 2019 Community
Microsoft Visual Studio 2017 Community
Microsoft Visual Studio 2015 Community
for creating in WPF an Empty Project,
go File > New Project
then Templates > Visual Basic > Windows > Classic Desktop
use this reference to find Empty Project for other Languages;
now to work with this Empty Project, References must to be Add to the Project;
in Solution Explorer, right-click References then Add Reference...
select these references: PresentationCore, PresentationFramework, System.Windows, WindowBase;then click OK;
now you Solution Explorer should look like this :
starting coding and creating your Dynamic Generated WPF Application;
follow these steps if more References are needed depending on the code used;

Resources