Could not deploy to server (local)

This issue has been solved. See solution.
lah's picture

I'm trying to publish a project to localhost but i get this error shortly after clicking Save:

Reason:
Could not deploy to server (local) - location (127.0.0.1:11434

Details:
System.ArgumentException: An item with the same key has already been added.
   at System.ThrowHelper.ThrowArgumentException(ExceptionResource resource)
   at System.Collections.Generic.Dictionary`2.Insert(TKey key, TValue value, Boolean add)
   at LogicBase.Tool.Deployment.CustomLibConflictsForm.GetCustomLibInstallList(IWin32Window uiOwner, String sourceDirPath, List`1 fileNames, CustomLibInfo[] customLibInfo, Boolean isPackageInstall)
   at LogicBase.Tool.Deployment.DeployToServerAction.InstallReferencedCustomLibs(RemoteDeploymentObject deploy)
   at LogicBase.Tool.Deployment.DeployToServerAction.DeployProjectToServer(ServerRegistration server, String directory)
   at LogicBase.Tool.Deployment.DeployToServerAction.DeployProject(String directory, List`1 servers)

How do I find out what is causing this error?

reecardo's picture

Looking at the code, it makes

Solution

Looking at the code, it makes me think you are referencing the exact same file twice in the Libraries tab. I'm not sure how this can happen, as the tool warns you/prevents you from adding duplicates.

Can you verify there is not 2 identical filepaths on your Libraries tab?

lah's picture

Duplicate libraries

You are correct. I must have overlooked the warning message as "Symantec.Components.Generated.Altiris.Resource.dll" is listed twice in the Libraries tab. Unfortunately I am unable to delete either one of them as they are in use. The exact message is:

The following libraries could not be removed because there are components that use them:

Does this mean I have to start all over again?

EDIT: Nevermind. I exported the primary model, deleted one of the duplicate entries from the Libraries tab, and imported the model. Thanks once again for your help.

reecardo's picture

The only way to remove that

The only way to remove that reference is to remove all components that "use" that reference i.e. any generated resource component. After removing those components, you should be able to remove one of the offending references. You can copy/paste those settings into a new WF so that you can get the settings back when readding the components.

 

... and now I see that you've worked around it, so all is good :)