0
votes

I'm trying to deploy a InfoPath form to Sharepoint via Visual Studio, but I'm getting this error:

Error occurred in deployment step ‘Add Solution': The XSN cannot be used on the server.

I’m publishing the form to a network location. Any ideas?

2
Have you tried deploying it locally with Powershell?Marco
Yes, I got the same errorbmccruz
Have you already deployed to form itself to your network share, before you tried to deploy?Marco

2 Answers

0
votes

In most cases this error relates to the InfoPath form not being on the network share prior to deploying your solution

So in order to get rid of this error deploy the InfoPath form to your network share. After this replace the form in your Project file with the one from your network share.

Make sure you run an elevated instance of Visual Studio or Powershell (run as Administrator) and then deploy your solution again. The error should not occur again.

0
votes

I figured it out, the field Access Path in the Publishing Window must be blank, even if InfoPath suggests to keep it as the same as the Publish Path.