SharePoint – Failed to instantiate file

I’ve been working on a project that deploys a SharePoint “Content Type” – and an associated Document Template – which works nicely…!

I’d changed the template file – and updated within Visual Studio – and then it wasn’t working anymore – what the ??

Failed to instantiate file "_cts/Outgoing Letter/OutgoingDocumentTemplate.docx" from module "Template Outgoing Letter": Source path "Featuresxxxxx.Intranet.Correspondence_Content TypesOutgoing LetterOutgoingDocumentTemplate.docx" not found.

image

It all looks OK in Visual Studio…>

image

And – the manifest file is referencing the file…>

image

The next step was to check the actual WSP…>

  • Open Windows Explorer
  • Navigate to the BIN folder – and find the WSP that Visual Studio created
  • Change the name to CAB – and have a look inside

THAT’S when I noticed the file wasn’t included in the CAB file – and thus not in the WSP !

Aaaah – I know now…>

  • Need to ensure that the actual file (DOCX) is included as an “ElementFile”

image

The default is “NoDeployment” – especially for a DOCX – not normally needed as part of the deployment.

Problem solved – phew !

Smile

Advertisements

One thought on “SharePoint – Failed to instantiate file

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s