SVN Solution

Apr 7, 2011 at 9:01 AM

Hi,

First of all i want to congratulate for the software, i like it but i encountered a problem. After i added my solution to SVN, Visual Studio 2010 was unable to build solution because the .svn folders was included in the autogeneration of makecab.ddf and manifest.xml files of the components project.

I tried unsuccessfully to delete those svn occurrences in that files. Then i realized that the right file was generatemanifest.tt. I added 2 conditions in a couple of function and now all works.

In the AppendDDFFiles Function:

Change this:

 

foreach (KeyValuePair<string, List<string>> section in gacAssemblies) 
{
	ddfFiles.AppendLine(";");
	ddfFiles.AppendLine(".Set DestinationDir = " + GetFolderPath(section.Key, relativePrefix));
	foreach (string fileName in section.Value) 
	{ 
		ddfFiles.AppendLine("\"" + fileName + "\"");
	}
}	

With:

foreach (KeyValuePair<string, List<string>> section in gacAssemblies) 
{
	if (!(GetFolderPath(section.Key, relativePrefix).ToLower().Contains(".svn")))
	{
		ddfFiles.AppendLine(";");
		ddfFiles.AppendLine(".Set DestinationDir = " + GetFolderPath(section.Key, relativePrefix));
		foreach (string fileName in section.Value) 
		{ 
			ddfFiles.AppendLine("\"" + fileName + "\"");
		}
	}
}	

 And in GetFilesInProjectDirectory Function:

After:

	if(IsExcludedExtension(shortfilename))
	{
		additem = false;
	}

Add:

	if (shortfilename.ToLower().Contains(".svn"))	{
		additem = false;
	}

 

I know it's almost elementary but i lost a lot of time to find it so i hope it will help you to save time.

best wishes

Giuliano Montagna

Coordinator
Apr 7, 2011 at 9:11 AM

Thank you for this solution for SVN users.

We will include your changes in the next release (coming in the next month).

Cheers,

Torsten

Coordinator
Apr 7, 2011 at 11:41 AM
This discussion has been copied to a work item. Click here to go to the work item and continue the discussion.
Coordinator
Apr 7, 2011 at 11:42 AM

I also added the same for CSV support.

Thanks for your feedback!

Sep 19, 2011 at 11:39 AM

Hi,

I am currently trying to integrate SPSF with SVN and having the same issues. I understand which functions need to be changed, but in which project/files do they reside?

thanks

Sven

Coordinator
Sep 21, 2011 at 5:06 PM

Hi Sven,

the changes apply only to Hive structured projects. 
When you create a project in hive structure, there is a file calles GenerateManifest.tt included in the solutions files. 

The changes have to be made in this file.

Projects with the Visual Studio 2010 SharePoint project structure, the packaging process is done by VS itself. Therefore the the file does not exist there.

Best Regards

Matt

Sep 21, 2011 at 6:01 PM

In my case I use the VS2010 Sharepoint project structure. Sourcecode that is checked into SVN has usually a hidden ".svn" folder in each sourcecode folder.

During deployment/copy process triggered from SPSF an error occurs, because SPSF tries to copy folders which have the ".svn" folders aswell. That is why I thought that a similar solution would work here aswell. Maybe I need to exclude certain folders from being loaded into SVN ?

Thanks

Sven

Coordinator
Sep 22, 2011 at 9:05 PM

Ok, I understand. 

If the .svn folders are packaged into the WSP then it seems to be a general problem with the VS2010 packaging process, as SPSF doesn't do anything while packaging.

If the .svn are somehow copied to the SPSF Deployment package ind the ApplicationDeployment project /Output/<BuildQuality/... then this would be a different issue.

Could you specify more detailed where the files are added and what the deployment error says (If you deploy through the SPSF ApplicationDeployment Package, you can post the relevant parts of the deployment.log )

Thanks

Matt