WPBuilder conflict with svn

Feb 18, 2009 at 1:51 PM

I'm using tortoise svn (and visual svn) for source control.
The problem is that svn creates a folder 'svn' in every folder of the visual studio solution.

With version 0.9.8.0408 these files were not included in the wsp, but the latest version (0.9.8.0830) is including all the files under these 'svn' folders.
I can't use the exclude paths attribute because there are many paths to exclude and as the project grows more svn folder will be added.

Is there any way I can exclude thes pesky folders?

Thanks

Mar 26, 2009 at 9:28 AM
Hi,

I am having a similar issue,  .svn and other folders are being included in the solution.  I tried using -Excludepaths parameter but no luck. I am getting some exception.  Details below..

WSPBuilder

Version: 0.9.8.0830
Created by Carsten Keutmann
GPL License 2007

Building the solution - please wait
No webtemp configuration for sitedefinition '.svn' was found.
There can not be more files with the same location. Currently using 'D:\Data\Wor
ldVision.PMIS\TRUNK\PMIS\WorldVision.PMIS\WorldVision.PMIS.Global\12\template\fe
atures\.svn\all-wcprops'.

The file 'D:\Data\WorldVision.PMIS\TRUNK\PMIS\WorldVis
ion.PMIS\WorldVision.PMIS.Global\12\template\.svn\all-wcprops' is ignored.
There can not be more files with the same location. Currently using 'D:\Data\Wor
ldVision.PMIS\TRUNK\PMIS\WorldVision.PMIS\WorldVision.PMIS.Global\12\template\fe
atures\.svn\entries'. The file 'D:\Data\WorldVision.PMIS\TRUNK\PMIS\WorldVision.
PMIS\WorldVision.PMIS.Global\12\template\.svn\entries' is ignored.
There can not be more files with the same location. Currently using 'D:\Data\Wor
ldVision.PMIS\TRUNK\PMIS\WorldVision.PMIS\WorldVision.PMIS.Global\12\template\fe
atures\.svn\format'. The file 'D:\Data\WorldVision.PMIS\TRUNK\PMIS\WorldVision.P
MIS\WorldVision.PMIS.Global\12\template\.svn\format' is ignored.
Saving the Manifest.xml file
Creating the WSP file
Cleanup
Done!

Seems that something is broken this functionality i saw some previous posts where it was working,  please look into it..

--Sudhir Kesharwani

May 27, 2009 at 11:53 AM

I too am experiencing this issue.

Is there any plan to fix this?

Mark Stokes
http://sharepointstudio.com

Jan 14, 2010 at 2:03 AM
Edited Jan 14, 2010 at 4:43 PM

I had the same problem too. I ended up adding a new config entry called Exlcudefolders and also made Excludefiles recognize '?' for files without extensions.

In Keutmann.SharePoint.WSPBuilder.Library.Config.cs:

Added a new constant

 

public const string EXCLUDEFOLDERS = "Excludefolders";

 

Added a new field

 

private List<string> _excludefolders = null;

Added a new property

 

[DisplayName("-Excludefolders [\"folder1;folder2\"] (Default is empty. Use semicolon as a separator.)")]
[Description("Specifies which folders to exclude and not include in the building process.")]
public List<string> Excludefolders
{
	get
	{
		if (_excludefolders == null)
		{
			string typeString = GetString(EXCLUDEFOLDERS, null);
			List<string> list = new List<string>();
			if (typeString != null)
			{
				string[] folders = typeString.Split(';');
				foreach (string folder in folders)
				{
					list.Add(folder);
				}
			}
				_excludefolders = list;
		}
			return _excludefolders;
	}
	set
	{
		_excludefolders = value;
	}
}

Then in Keutmann.SharePoint.WSPBuilder.Library.FileProvider.cs:

In the method public static List<DirectoryInfo> GetDirectories(DirectoryInfo dirInfo)

 

//...
foreach (string exludepath in Config.Current.Excludepaths)
{
	if (childDirs.FullName.StartsWith(exludepath, StringComparison.InvariantCultureIgnoreCase))
	{
		found = true;
		break;
	}
}
// New code start
foreach (string exludeFolder in Config.Current.Excludefolders)
{
	if (childDirs.Name.Equals(exludeFolder, StringComparison.InvariantCultureIgnoreCase))
	{
		found = true;
		break;
	}
}
// New code end
if (!found)
{
	dirs.Add(childDirs);
}
//...

and in the method public static bool IncludeFileExtension(string extension)

 

if (extension.StartsWith("."))
{
	extension = extension.Substring(1);
}
// New code start
if (string.IsNullOrEmpty(extension))
	extension = "?";
// New Code end
bool result = true;
//...

Now I can modify the config file to include

 

<add key="Excludefiletypes" value="?"/>
<add key="Excludefolders" value=".svn;_svn"/>  

Viola, no more subversion files for me.

 

 

 

 

 

 

 

public const string EXCLUDEFOLDERS = "Excludefolders";
private List<string> _excludefolders = null;
[DisplayName("-Excludefolders [\"folder1;folder2\"] (Default is empty. Use semicolon as a separator.)")]
[Description("Specifies which folders to exclude and not include in the building process.")]
public List<string> Excludefolders
{
get
{
if (_excludefolders == null)
{
string typeString = GetString(EXCLUDEFOLDERS, null);
List<string> list = new List<string>();
if (typeString != null)
{
string[] folders = typeString.Split(';');
foreach (string folder in folders)
{
list.Add(folder);
}
}
_excludefolders = list;
}
return _excludefolders;
}
set
{
_excludefolders = value;
}
}

 

 

May 11, 2010 at 2:04 PM

Hi!

Thank you very much!

In case if anyone needs compiled version, I've put it here: http://sorokoletov.com/wp-content/uploads/2010/05/WSPBuilder.zip

Alex.

Jun 15, 2010 at 2:20 PM
Edited Jun 15, 2010 at 2:21 PM

Alex,

Thanks for the executable. I did the same a few weeks back and realized I nuked it out by accident and was annoyed to have to go through the hassle again. You saved me some time - much appreciated!

Josh

btw - I think this should be included in the code base. i would think this is probably a very common scenario and lots of folks may just not be aware they're packing up svn instrumentation in their packages.

Jul 13, 2010 at 1:03 PM

I have downloaded the suppiled binaires only to get the following error when I run it :-

 

Could not load type 'WSPTools.BaseLibrary.IO.ResourceReader' from assembly 'WSPTools.BaseLibrary, Version=1.0.0.0, Culture=neutral, PublicKeyToken=2b778c59697d7d9e'.   at Keutmann.SharePoint.WSPBuilder.Library.ManifestConfig.Load(String path)   at Keutmann.SharePoint.WSPBuilder.Program.BuildWSP()   at Keutmann.SharePoint.WSPBuilder.Program.ExecuteOldStyle()   at Keutmann.SharePoint.WSPBuilder.Program.Main(String[] args)

Any ideas?  Is there another version that'll ignore .svn files?

Jul 13, 2010 at 1:47 PM

Sorry, James!

I missed one assembly.

I've updated the archive so use the same link to download updated version

http://sorokoletov.com/wp-content/uploads/2010/05/WSPBuilder.zip

Alex.

Jul 29, 2010 at 1:23 PM
I get the same error jamesafisk was getting: Could not load type 'WSPTools.BaseLibrary.IO.ResourceReader' from assembly 'WSPTools.BaseLibrary, Version=1.0.0.0, Culture=neutral, PublicKeyToken=2b778c59697d7d9e'. at Keutmann.SharePoint.WSPBuilder.Library.ManifestConfig.Load(String path) at Keutmann.SharePoint.WSPBuilder.Program.BuildWSP() at Keutmann.SharePoint.WSPBuilder.Program.ExecuteOldStyle() at Keutmann.SharePoint.WSPBuilder.Program.Main(String[] args)
Nov 14, 2011 at 9:14 PM

I think the base should include a more generic means to exclude items. Given that the .svn directories are hidden I'm more curious as to why they're being added at all??

Are users of VSS and other SVNs having the same issue, or is it just Tortoise?

Nov 14, 2011 at 9:23 PM

Oh! And, Alex - thanks for the fix! :)

Question: I notice that Microsoft.Web.Administration.dll is now in the root directory. Should it be?

Nov 14, 2011 at 9:25 PM

Also, WSPTools\WSPBuilderExtensions\Resources\x64\ contains a zip archive rather than a DLL. cablibx64.zip appears corrupt.

Nov 14, 2011 at 9:29 PM

Sorry for the spam...I'm still getting the "Could not load type 'WSPTools.BaseLibrary.IO.ResourceReader'..." error. Just downloaded 10 minutes ago.

Nov 14, 2011 at 10:01 PM

Damn. I'm also getting the following when just trying to upgrade without rebuilding the WSP.

Could not load type 'WSPTools.BaseLibrary.Win32.SharePointRegistry' from assembly 'WSPTools.BaseLibrary, Version=1.0.0.0, Culture=neutral, PublicKeyToken=2b778c59697d7d9e'.

I just extracted the new zip over the existing directory. Was this correct, or should I have performed some other step(s)?

Nov 15, 2011 at 1:10 AM

Hi Carsten, I just uninstalled and reinstalled 1.06 freshly downloaded. The SVN issue persists. This is weir because I have never had this problem until today.

I have gotten around this by removing the code folder and moving all code pages into the project root.

Curiously, the build output from WSPBuilder still displays v0.9.9.0728. Anyway, all good for now.