dep6500 errors on multi-app deploys - deployment

I'm receiving an error that's nearly identical to what's posted in How to solve DEP6500 while deploying a solution with multiple projects to an emulator or Lumia 950xl:
The issue isn't resolved and I've got further detail to add here in the hope that it might resolve & clarify both questions (that question is presently the top hit when I search for DEP6500)
AFAICT, mine really appears to be a VS15 solution deployment configuration issue.
I have a single solution with five projects: three apps, a class library, and a win runtime component:
First trivial app, references #2
Universal class library, references no other project directly, but attempts to use an AppServiceConnection to connect to #4
Second trivial app, just a hello world, references absolutely nothing
Third trivial app, references #5, meant to be used via an AppServiceConnection
Universal windows runtime component, references nothing
Really, what I want to be able to do is start with nothing deployed to the device, select "Deploy Solution", and have all three apps successfully deployed.
Based on the rest of the description below, I'm clearly misconfiguring this solution, but for the life of me I don't see where.
At the solution level, if I configure any combination of two or more of the three apps to deploy, I get the DEP6500 error when I try "Deploy Solution" - actually, two DEP6500 errors when three apps are configured to deploy.
If I configure only one of the three apps to deploy, deploying the solution works just fine.
If I uninstall every deployed app and deploy just #1, as you might expect, it has trouble at runtime when it tries to use #4.
If, instead, I deploy just #1 and then deploy just #4, #1 runs just fine.
As I said earlier, if #1 and #4 are both configured to deploy, deploying the whole solution fails.
The third app, #3, is really uninvolved in this whole mess, I only added it to better characterize the problems deploying #1 and #4.
Seeing as each deploys just fine individually and all three can be deployed to my device at the same time if I deploy them one at at time, how can I configure Visual Studio 15 to deploy all three when I run "Deploy Solution"?
Finally, it would help to find out what type of port the IDE referring to when I produces the error in question:
DEP6500 : A specified communication resource (port) is already in use by another application. 0x89731800
helpful smaller questions may be: that is that port used for? when is it opened? how long is it open? how can I configure VS15 in a way that avoids port collisions between apps during full-solution deploys?

The issue here was that Visual Studio 15 just doesn't appear to be able to time the deployment correctly when you ask it to do a full deploy of every project in one action.
In this case, manually deploying each project one at a time yields a good result.
I suspect the "port" in question has to do with device deployment, as I can do a full deploy to my local machine without issue but see the DEP6500 error on deploys to my Lumia 950XL.
My aim was to be able to do a full deploy from a single VS15 menu option and that's still not technically working consistently, but I suppose I've found a workaround in as much as a piecemeal manual deploy is working everywhere.

Related

PhpStorm - debug on local, deploy on remote server

I'm working on a website using PhpStorm. For a long time I developed it locally, but then I got hosting and a remote ftp server.
I created a new project in PhpStorm with the settings for remote host, and I found that deploying code takes long time (over a minute) before I can see the result, which is quite uncomfortable when debugging.
Is there any possibility to work with code on a local server, and, when I think that the project is ready for deploy, just send it to the server.
I understand, that I can just work in two different projects and just deploy the "ready" version to server via FTP, but maybe there is some more comfortable way?
There is several answers to this question, and most of them opinion based but i will try and keep it objective.
Case 1
A big corporation gives every developer a sandbox, to test their code from, the corp requires every developer to keep their code on the sandbox.
Using mounted drives could be extremely slow. Especially when PhpStorm is indexing.
Case 2
An easy way to keep an auto backup of your code it to use the build in (s)ftp(s) upload/deploy.
Solution
In both cases you could use the auto deploy feature that saves every changes to the server, that way the deploy doesn't take over a minute, but is usually already there before you know it.
I cannot recommend to use the deployment for Production as it will not pass through your version control, SAT, security setups etc. In that case I would suggest something like rocketeer etc.
EDIT:
As for 2 projects, well you can define 2 different deployment servers, and use the default one for your testing, with auto upload or something, and then the other one can be selected from the deployment menu.

How do we control application type versions retention?

We want to execute external integration tests and manually call a rollback if something is wrong.
We're using the 'Service Fabric Application Deployment' task in Team Services (VSTS) and it seems to only keep the latest in the cluster.
Cluster --> Applications --> [Application], and then under Essentials. Only one row item is listed which shows the latest version.
Also, attempting Start-ServiceFabricApplicationUpgrade results in 'Application type and version not found.'
How do we alter the behaviour of previous version retention of application types? (And what is the default?)
I don't have the answer to your question, but I do offer this thought:
While I understand there may be a valid use case out there for trying to do this, I think a more accepted approach is to set up a test environment that matches production very closely. Deploy to test and test the heck out of it before approving the deployment to production.
One of the main selling points of Service Fabric is its ability to be so redundant, yet with your proposed workflow you are deploying code to that environment in which you're not entirely confident in. I think that really goes against what Service Fabric offers you.
Since you will be testing it so thoroughly on the Test environment, hopefully anything you end up finding in Production is small enough to be fixed through a patch a few hours later or however fast you can fix it.

TFS Intranet Automated Deploy Strategy

I have introduced branching/merging to my team and have talked before about how it would be great to automatically build and deploy code checked into the staging/master branches, but I'm a junior dev, not very ops-y.
The trouble I'm having, is that we create intranet applications and store them on our own VM's which we have access to, but we also have load balancing which is causing me grief!
I can get a build to automate (well, I haven't got all the bugs figured out but I'm working my way through them) - and I can even get the build to automatically create a zip file ready for deployment.
Is it possible to configure several servers for deployment?
I.E
1) I check in some code to stage
***Automatically***
2) Code builds
3) Build completes, Unit tests run and they complete
4) Code is packaged into a .zip
5) .Zip is deployed across the three load balancing servers (all with the same file path).
***
Maybe worth noting we currently have our TFS server running Visual Studio so the code is built on the same server it is all stored, but this is not the server we run live code from.
Any help or tutorials specific to my setup would be GREATLY appreciated, I really want to turn this departments releasing strategies around!
I am going to address only the deployment aspect. There are a lot of different ways that this can be handled, such as:
Customizing the build template
Writing custom .Net code and inserting it into the build template (which would also involve customizing the template)
Creating a Batch or Powershell script set to run after the build completes
Using a separate tool such as OctoDeploy or Release Manager to handle the deployments
The first thing you need to do is separate the build and deployment steps in your head. While they are tightly coupled in your model, they are two totally different tasks that need to be handled different ways.
The second thing is to stop thinking like a developer when it comes to the deployment portion. While there will likely be a programmatic solution, you'll need to identify the manual steps first.
You stated that you're not very ops-y, by which I assume you mean you're more Developer and not Systems Analyst. If that is the case, then the third thing you'll need to do is get someone who is involved, such as your current release team.
There are 3 major things that need to be done then:
EVERYTHING needs to be standardized. If you can't standardize something, then standardize the way that it's non-standard (example: You have a bulk list of servers you need to deploy to, and you need to figure out which ones to deploy to based on their name, which can be anything. In that case, a rule needs to be put in place that all QA servers need to have QA in their name, User Acceptance servers need UAT, Production need PROD, etc.).
Figure out how you're going to communicate from the build to the deployment, which builds are going to deployed, to which servers, and where the code is going to be picked up from
You need to document every manual step, and every exception to those steps, and every exception to those exceptions.
Once you have all those pieces in place, you need to then go through each manual step and automate it, whether that's through Batch, Powershell, or a custom-built application. Once you have all the steps automated, you'll have both the build and deploy pieces complete.
After you're able to execute a single "manual" automatic deployment to a single environment, you're then ready to figure out how you want to run it for multiple environments. This can be as complex as an XML file that is iterated through, to simply calling the same command multiple times with different parameters.
A quick summary of how I've done this at my current job (where using a third-party deployment tool was not an option):
Created a tool using .Net WinForms to allow us to "manually" run automated builds (We use the interface to determine the input parameters, and the custom classes under the hood do all the heavy lifting. These custom classes are in a separate project that builds to their own dll. This also allows us to test tweaks and changes to the process in a testing environment before we roll it out to our production build server)
Set up an XML file for each set of environment (QA, UAT, Prod, etc.) that contains all of the servers that need to be deployed to in that environment, including destination paths, scheduled tasks, and Windows Services
Customize the TFS build template and include the custom classes created for the custom tool, which will read the XML file and iterate through each server entry to perform the deployments
I'm more than happy to help with more specific examples and assistance, I look at things a bit different than most people and it helps when it comes to release management.

Multiple deploys on single azure instance

I have a question regarding azure deploys. My specific scenario is that I would like to deploy N projects on the same WebRole / WebSite.
The solution (don't think only as a visual studio way of organizing projects) will involve 1 web service (that could be scaled-out later) and N web sites (that also could be scaled-out later)
Because right now my traffic is very low I was planning to deploy the web app on port 80 (of course) and the web services on say port 5000 of the same instance to save some money.
What i can't figure out right now is how to do this... in the end i have 2 questions:
-1: Can I deploy multiple projects in a single instance? (this question is similar but is not straighfoward... I was hoping for a more direct answer...)
-2: How?
EDIT: Don't get this question wrong! I do not want to create a azure web role project in VS 2012 and "Add" the 2 minor projects... i want to create 2 projects completaly independent... 2 separated solutions... separated deploys (ex: I want to correct a bug in the service without updating the web-site!)
Am I being clear? if not just say and I will re-explain...
Based on the edits to your question, the short answer is no, you can't have two completely different solutions that deploy to the same instance without overwriting the other. For Azure one role is the smallest unit of deployment.
You might be able to write your own auto updating code, but you'd be on your own there, there's nothing baked into the service to help you with this.

.net application throwing TypeLoadExceptions or saying that side-by-side configuration is invalid, etc

I post this merely as a reference for others that might end up being in the same situation and since I spent almost 3 days trying to figure out the root cause of the problem, I thought it would be a good idea to post the solution here.
My situation was as follows:
I tried to build a deployment package for a .net application and got TypeLoadExceptions, FileNotFoundExceptions (regarding DLLs), Side-By-Side configuration errors, etc. once I tried to run it on a vanilla test machine.
[edit]: stackoverflow won't let me answer my own question within 8 hours of it being posted, the answer follows in ~8 hours ;)
The problem was that one of the dependency projects of my application was set to "Debug" build in the Visual Studio configuration manager, therefore the debug dll of the dependency ended up being used for release builds as well. On any development machine this was no problem after all since all debug runtimes were available.
On the vanilla test machine however only the release runtimes were present which caused so much trouble to me and gave me unmeaning exceptions that lead me to so many wrong directions via google, etc.
In my case it was SlimDX that was set to build a debug build in the VS configuration manager, even when doing release builds. Since SlimDX makes use of the VC runtimes I got the above problem, but this could happen with any .net assembly that uses the VC runtimes.
I hope this will eventually safe someone some hours ;)