Quantcast
Channel: Deploy – SANDRO PEREIRA BIZTALK BLOG
Viewing all articles
Browse latest Browse all 52

Failed to add resource(s). Resource (…) is already in store and is either associated with another application or with another type.

$
0
0

One of my team members that is making some changes to a project that I started, called me saying that he was having problems in deploying the project. Whenever he tried to deploy the project he was stuck in the following error:

Failed to add resource(s). Resource (…) is already in store and is either associated with another application or with another type.

Failed-to-add-resource-associated-with-another-application-or-type

First we have to understand this type of error message…

CAUSE

When this message occurs, usually means that the resource we are trying to deploy is already deployed.

Before you can deploy a solution from Visual Studio (2005, 2008, 2010 …) into a BizTalk application, you must first set project properties. If a solution in Visual Studio contains multiple projects, you must separately configure properties for each project:

  • In Visual Studio Solution Explorer right-click a project for which you want to configure properties, and then click Properties.
  • Click the Deployment tab in Project Designer.
  • and configuring at least the following properties:
    • Application Name: Name of the BizTalk application to which to deploy the assemblies in this project. If the application already exists, the assemblies will be added to it when you deploy the project. If the application does not exist, the application will be created. If this field is blank, the assemblies will be deployed to the default BizTalk application in the current group. Names that include spaces must be enclosed by double quotation marks (").
    • Configuration Database: Name of the BizTalk Management database for the group, BizTalkMgmtDb by default.
    • Server: Name of the SQL Server instance that hosts the BizTalk Management database on the local computer. In a single-computer installation, this is usually the name of the local computer.

Notice: If “Application Name” property is blank, the assemblies will be deployed to the default BizTalk application, i.e., “BizTalk Application 1”.

So if you have this problem, you may:

  • Inadvertently deployed it to another application, most likely to the default “BizTalk Application 1”;
  • Someone have probably removed the previously existing name in “Application Name” property from the project properties.

SOLUTION

If “Application Name” property by mistake is blank, then this resource is already deployed in another application than the default: “BizTalk Application 1”, so we need to:

  • In the BizTalk Administration Console the <All Artifacts> view will tell you in which application the resource is deployed, we need to find were this resource is deployed.
  • We need to fix the "Application Name" property.
  • Redeploy the project

If “Application Name” property isn’t blank, then the resource may inadvertently been deployed in to another application, so we need to:

  • In the BizTalk Administration Console the <All Artifacts> view will tell you in which application the resource is deployed, we need to find were this resource is deployed.
  • When found resource delete it.
  • Redeploy the project
Working with Team Foundation Server 2010

In my case, it was really weird why this error was happening because I had been working on it a few days before and I knew that all settings were correct.

So to help my teammate and to see what was happening, I open Visual Studio get the last version of the project from TFS, because he had changed the solution, and I try to deploy the solution and to my astonishment, or not… everything worked fine, everything deployed successfully!

However my colleague was still unable to properly deploy the solution… and it wasn’t permission problems.

So what happened?

Even though I have added the solution to TFS with the correct settings for Deployment… when another member open this solution for the first time to work on it… the “Application Name” property is set to…. blank!!!!

Deployment-options

We must go to all the projects in the solution and fix this property.



Viewing all articles
Browse latest Browse all 52

Trending Articles