Getting Illegal characters in path if using excludefiles option

Apr 23, 2008 at 1:51 PM
Edited Apr 23, 2008 at 1:53 PM
I am trying to exclude some assemblies from the wsp package so I thought of using ExcludeFiles option, I am getting
Illegal characters in path. Any help would be highly appreciated. I have used
WSPBuilder.exe version and but problem is same with both the versions.
Dec 3, 2008 at 1:34 PM
I was able to make this run like this ...
-excludefiles "filenameslist.txt"

where filenamelist.txt is a file that is in same place with 12,80 etc folders exist and contains fully qualified file names separated by new line.

Hope this helps someone.
(sharepoint & dotnetnuke)
Feb 10, 2009 at 11:24 AM
Hi all,

I also have this error.

It looks like a bug..

I tried
<add key="Excludefiles" value="GAC/ssocli.dll" />



add key="Excludefiles" value="GAC\ssocli.dll" />




add key="Excludefiles" value="GAC\\ssocli.dll" />


Mar 18, 2009 at 4:39 PM
Edited Feb 16, 2010 at 5:04 PM

I found a workaround for excluding the 'ssocli.dll' file from the package. The WSPBuilder loops the target folder ('bin\debug\') and finds the 'ssocli.dll'-file. This is why it includes the 'ssocli.dll' in the WSP package.

If we delete the file in the post-build event. It will not be included in the WSP package. Weird but it does the trick :-)

Command line code, added to the post-build event of the VS.NET project:
REM Delete the 'ssocli.dll' (Microsoft® Office SharePoint® Server 2007) assembly from target folder. Not needed as part of the WSP-Package.
DEL $(TargetDir)ssocli.dll

Greetz and good luck!

Mar 10, 2010 at 10:47 PM
Edited Mar 10, 2010 at 10:49 PM

I have tried all sorts of ways to use the ExcludeFiles option, and non of them ever actually Exclude the files I specify. I have resorted to @bdejager's method of deleting the files in a post build event.

So, is deleting the files in a PostBuild event the final solution to this bug?


Is WSPBuilder being updated to fix the bug in the 'ExcludeFiles' option?

Apr 15, 2010 at 9:36 AM

Browsing around I discovered that the ExcludeFiles requires the filename of a textfile with the files to exclude.

So I added a WSPBuilder-exclude.txt with the files to exclude (one on each line) and added 

<font size="2" color="#0000ff"><font size="2" color="#0000ff">


</font></font><font size="2" color="#0000ff">



add key="Excludefiles" value="WSPBuilder-exclude.txt" />


To the WSPBuilder.exe.config file.