Problem when using resource

Aug 13, 2007 at 12:56 PM
First, I want to thank you for your wonderful project. I have a problem when using a resource file. A resource assembly is created for one of my project and it needs to be deployed in the GAC. However, the WSP file created contains the resource assembly twice for the same location. When adding the solution to sharepoint using stsadm, I get an error stating that the solution is invalid. For a temporary fix, I have added the following code to the Keutmann.SharePoint.WSPBuilder.CabHandler.CreateCab(ArrayList files) method:

StringCollection fileCollection = new StringCollection();
IList<int> indexToDelete = new List<int>();

int index = 0;

foreach (string[] file in files)
{
if (!fileCollection.Contains(file0))
{
fileCollection.Add(file0);
}
else
{
indexToDelete.Add(index);
}

index++;
}

if (indexToDelete.Count > 0)
{
int count = 0;
foreach (int i in indexToDelete)
{
files.RemoveAt(i - count);
count++;
}
}


It fixes the problem for me.
Coordinator
Aug 14, 2007 at 11:27 PM
Edited Aug 15, 2007 at 1:20 AM
The problem with resource files have been found and fixed in version 0.9.7.0815.