SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

having a problem running Add-SPSolution .wsp. get the following error: Invalid character in the given encoding. line ##, position ##. Invalid data.

we have 6 dev servers dedicated to sharepoint development. this is happening on just one of the servers.

share|improve this question
can you share the code? – BlueBird Aug 16 '13 at 17:46

if you are using powershell script just check that during copying script files from one server to another sometimes it may happen that it inserts invalid character in the scripts.

So please check n remove those characters and it will work fine.

share|improve this answer
found exactly where the issue is. the package template xml file is having the issue. <?xml version="1.0" encoding="utf-8" ?> <Feature xmlns="">; </Feature> – mike Aug 21 '13 at 17:39
at this time not sure how to handle this issue, any thoughts would be helpful. – mike Aug 21 '13 at 17:51

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.