Does the Microsoft Installer Project extension for VS2017 work correctly with Team Services? - azure-devops

We've updated to Visual Studio 2017 and switched to Team Services (VSTS) as our source control. I've migrated a few old projects and am using the Microsoft Installer Project extension to provide compatibility for the original setup projects.
However, there seems to be a potential issue with source control when working with the setup projects. Attempting to make any change results in the error:
The command you are attempting cannot be completed because the file 'Setup[Productname].vdproj' is under source code control and is not checked out.
Modifying files of other projects within the solution work correctly and trigger checkout from the repository.
I have not been able to determine a way to properly check out the setup project and work with it under the new source control. I'm unsure if it's a bug with the extension or if it simply lacks support for VSTS.
Has anyone successfully been able to work with setup projects (.vdproj) in conjunction with VSTS? If not, is there a workaround?
Edit:
Image of context menu:

You can apply the following workaround, since it seems to be a bug in the installer extension:
Choose 'Open file in File explorer' in your context menu
Open the project file in your favorite texteditor
Make a dummy change (adding a space character in an empty spot is enough)
Visual studio will prompt to reload the project and has explicity checked out the project file.
see also here

I submit a feedback here: The command you are attempting cannot be completed because the file 'Setup[Productname].vdproj' is under source code control and is not checked out
The workaround is that you can check out the project manually. (Right click the installer project > Check out for edit)

Related

Visual Studio 2017 and Visual Studio Code is not synched when new folders/files are created in vscode

I'm currently working for a new company, where most of the guys develop in Visual Studio 2017 (vs2017). I really like it, but feel more comfortable working with Visual Studio Code (vscode), and because, my work does not require any build processes.
Here's the workflow: I've put the workspace folder in C:/ directory, and open it through vscode. Whenever I apply code changes, the results are visible in vs2017 IDE. But when I create new folders/files in vscode, I don't see it in vs2017...
And because files/folders are not synched, I feel stuck using vs2017. An alternative is to do these operations on vs2017, and code in vscode. But I don't see this as a beneficial and efficient in hindsight.
To summerize, how can I create files/folders in vscode, or lets say in sublime/atom/brackets for that matter, and see it in vs2017?
Solution to my question can be found here.
In short, you have to enable show all files in solution explorer in vs2017, then right click on the newly added folder (marked in gray), and click include in project.
I recommend doing this everytime you open vs2017.
PS! Open for other alternatives where you can skip this process, it may be stress to do this when project scales.

Cannot Update EF Model From Database with TFS

I've recently moved to using TFS 2012 and have edited a couple of files and checked in without any problems. However, I've just started work on the EF data model and despite being able to open the file the "Update Model From Database" option on the Entity designer right-click menu is greyed out / disabled.
I'm a bit baffled by this. I've tried checking out the file with the "Allow other users to check out but prevent them from checking in" but that doesn't make any difference. Nor does checking out the whole folder the project is in.
Does anyone know what I'm doing wrong?
EDIT:
I've discovered that if I create a project in TFS and add an entity model to it then I can update it. However, if I import an existing project into TFS and then try to edit the .edmx file then that's when the problem happens.
I managed to work out the problem, I'll post it here just in case anyone else suffers with this:
The project wasn't set up properly. I was editing the files in the "local path" having not opened the project first (seems kind of stupid now, but this is my first time with TFS and I'd assumed opening the project in TFS opened it as a project in VS).
When I double-clicked on the .csproj file within the Source Control Explorer I was prompted with: "The solution you have opened is under source control but not currently configured for integrated source control in Visual Studio. Would you like to bind this solution to source control now?"
Clicking "Yes" opened the project correctly and I could run the update the model from the database.

NuGet Package Manager Console Default Project dropdown is empty

I recently upgraded to Visual Studio 2012 RTM Ultimate from MSDN. I'm using EF Code First Migrations to build my database in my app, and I recently added a new entity and want to scaffold the migration for it.
To do this, you need to open the Package Manage Console window in VS, and type add-migration "some name here". This will scaffold any changes to your database since the last time it was updated.
The Problem
This issue did not occur on VS 2012 RC
The problem I'm encountering is the "Default Project" dropdown in the Package Manager Console is not populated, despite having several projects in my solution. The default project that is used when I just type the command above is the wrong project (my migrations are in another project). I get the following error when I do this:
No migrations configuration type was found in the assembly 'ProjectA'. (In Visual Studio you can use the Enable-Migrations command from Package Manager Console to add a migrations configuration).
What I've Tried
I have tried setting the correct project (ProjectB) as the startup project, only to get this error:
Could not load assembly 'ProjectA'. (If you are using Code First Migrations inside Visual Studio this can happen if the startUp project for your solution does not reference the project that contains your migrations. You can either change the startUp project for your solution or use the -StartUpProjectName parameter.)
The Question
How can I manually specify which project migrations are added to, or force the Default Project dropdown to populate?
In VS 2015, I just restarted the IDE and the dropdown was filled again.
I was able to manually specify the project by using the following:
add-migration "Locations" -StartupProjectName "ProjectA" -ProjectName "ProjectB"
The documentation for this command is sparse, so here's what I assume is happening:
-StartupProjectName specifies the project where the database configuration is stored (an MVC4 project in my case)
-ProjectName specifies the project where the migrations are to be scaffolded.
I had ProjectB set as the startup project in my app due to testing for this question, but I think you can omit -StartupProjectName if the correct project is set as a startup project in VS.
Close the IDE and open again may help. It worked on my VS2015
Close the solution and open it again. Closing IDE sometimes takes more time. This works in VS 2017
If anyone is experiencing this issue with Visual Studio 2019 and .NET Core projects this is because the interface lacks a method of adding solution files to the project.
I was able to resolve the issue by using the command line tool as follows:
First navigate to the folder that holds the project and open a (git) bash console window.
Then add a solution file to the folder.
dotnet new sln
Then add a reference to each project to the solution (* will find all solutions)
dotnet sln *.sln add <project-folder-1>/<project-name-1>.csproj
dotnet sln *.sln add <project-folder-2>/<project-name-2>.csproj
N.B. Remember to replace the project folder and the name with what you need.
Close Visual Studio 2019 and reopen.
Nuget Package Manager and console will work as expected.
I had to open the solution.
To view to the solutions, look at the bottom of the "Solution Explorer" pane. There should be a "Team Explorer" tab. Click it. Then in the bottom half of the pane, your solutions should be listed. Double-click on the solution that you want to install things for, or right-click on it and select "Open".
That should open up the Package Manager Console with the correct project pre-selected.
I had to Restore NuGet packages first. Then it showed.
I had a similar issue with Visual Studio 2013. Right clicking on [Solution]->[Properties]->[Startup Project] make sure [Single startup project] is selected. I previously had multiple projects selected for Azure worker role testing.
After existing VS, Package manager worked fine.
first close vs,
then go to setting of your computer, apps & features, microsoft-visual-studio-installer,
modify, In the second tab you will get an option to define which parts of vs you want to use, select whatever belong to nuget.
when it is finished, open the vs again. now it is supposed to work
success!!!
You can select the projects under the Solution explorer .Then it showed up on package manager console . It worked for me
If you see projects under Solution explorer, but default project dropdown is empty, then my 100% precise solution is:
Select all projects under Solution explorer, right click, and REMOVE
Click in SAVE ALL
Now, select Solution explorer and ADD each project to Solution again
After that, You will see all projects added in Package Manager Console's Default Project DropDown.
That's it.

Team Foundation Server with Blackberry Project in Eclipse not synching correctly

I am using eclipse 3.5.2 with Team Foundation Everywhere plugin (TFS plugin).
I have several blackberry projects in my eclipse workspace which i have successfully added to TFS. However I have found that the BlackBerry_App_Descriptor.xml is not being updated in TFS when i make changes to it.
For example when I change the name and version number of the application TFS see's no change in the file so when I check in the server version is still the old data. We are developing on several machines so having changes i do on my machine not propigate to the others is causing problems.
Does anyone know why this is happening? I can see from visual inspection of the .xml file that it is changing but why does TFS not considered it any different?
I have tried manually 'check out for edit' on the file, then change the name and check it back in. But it sees that there are no changes and disreguards my checkin.
Thanks,
Stephanie
Incase anyone else runs into this, it seems that the eclipse plugin for TFS is having issues with comparing XML files. If i manually change the XML contents and save to disk. Then do 'Compare local with server version' it will say 'files are identical'. What I ended up doing was removing the file from TFS. Doing my edits on a local version then readding it. It gets the updates into TFS so the whole team gets the same version. Wish it would just work though because now everytime we want to change anything in an xml file its a long process instead of being a simple update/checkin

Source Control Association Bindings Problem

I've started working on an existing project at my company that was check into VSS 6.0 about a month ago. It was built using Visual Studio 2005 and C# and references all point to .NET 2.0. I went into VSS and set my working folder as per usual and got the latest version. I've opened this project at which point I'm prompted with this:
The solution appears to be under source control, but its binding information cannot be found. It is possible that the MSSCCPRJ.SCC file or another item that holds the source control settings for the solution, has been deleted. Because it is not possible to recover this missing information automatically, the projects whose bindings are missing will be treated as not under source control.
I click "OK" and that prompt is directly followed by this one:
The associated source control plug-in is not installed or could not be initialized.
That presents me with these options:
Temporarily work uncontrolled.
Permanently remove source control association bindings
How can I rectify this situation? I'd like the project to remain in VSS under control. Any Ideas?
Go to File -> Source Control -> Change Source Control, then select each project that you have under VSS and "Bind" it to the correct directory in VSS, it will prompt you for vss user name and password
instead of rebinding 100s of files, have a look at this solution:
http://regev.wordpress.com/2008/03/29/binding-to-source-control-issue/
"instead of getting the latest version through the source control client, you should have opened Visual Studio and choose: File|Source Control|Open from Source Control… this would have created the solution on the second machine with no binding problems."
Load the solution as usual and then right click on the unavailable project. Then edit the project file to comment the source control settings in the xml.
Then reload the project.
Everything is simple:
first of all, add missing project via Source Control Explorer.
Then, make check-in.
Then add it into solution and make check-in of changed solution file.
Voila!