DLL missing in VS2013 on creating publishing site definition via SPSF artefact


A error occurs If I create a publishing site definition via SPSF artefact in VS2013:

Error was: Action AddOnet failed to execute:
Could not load file or assembly 'Microsoft.VisualStudio.TextTemplating.11.0, Version=, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified.

The VS2013 SDK contains the library, but with different versions Microsoft.VisualStudio.TextTemplating.10.0 and Microsoft.VisualStudio.TextTemplating.12.0

Error occures in SPSF Version: SPALM.SPSF.


Schmolch wrote Dec 3, 2013 at 8:46 AM

I resolved this error by copying the Microsoft.VisualStudio.TextTemplating.11.0.dll to the Server and run gacutil to install the library to the gac. After that I'm able to create all SPSF artefacts in VS2013.

matein78 wrote Dec 3, 2013 at 11:24 AM

Thanks for getting back!

Still that should be solved directly :)the 11.0 comes from VS2012, so I need to check the dependency and use the 12.0 for VS2013 instead if the other is not present everywhere.

Schmolch wrote Dec 3, 2013 at 5:24 PM

Perfect and thx :-)

MichelCapdevila wrote Jan 19, 2014 at 4:07 PM

After removing VS 2012 from my development system, I am no longer enable to run any recipe ;-(As Microsoft.VisualStudio.TextTemplating.11.0 is not redistributed by Microsoft, I am completely stuck.

Do you plan to share the source code ?

matein78 wrote Jan 21, 2014 at 8:00 AM

I am already testing the fix, but unfortunately I will have to create a separate build for VS2012 and VS2013 to solve the issue which takes some time to get done.

Regarding the source code I can certainly put it on here (though we develop in our own TFS). I will do that when I have the fix.Just be aware that setting up the system to build and test SPSF for all different VS versions is quite a challenging task :(

ismailia wrote Feb 13, 2014 at 1:52 PM

Same problem here.when trying to import a list, I get the same error with missing Microsoft.VisualStudio.TextTemplating.11.0

Executing recipe 'ListTemplateImport'(*) Error: 0 : Microsoft.Practices.RecipeFramework.ActionExecutionException: An exception occurred during the binding of reference or execution of recipe ListTemplateImport. Error was: Action AddFeatureXml failed to execute:Could not load file or assembly 'Microsoft.VisualStudio.TextTemplating.11.0, Version=, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified..


pvranich wrote Mar 11, 2014 at 1:32 PM

Hi All,

As the assembly is not redistributed by MS does anyone know where I can get it?


matein78 wrote Mar 11, 2014 at 2:22 PM

The file is located at$(ProgramFiles)\Microsoft Visual Studio 11.0\VSSDK\VisualStudioIntegration\Common\Assemblies\v4.0\Microsoft.VisualStudio.TextTemplating.11.0.dll on a machine with Visual Studio 2012 installed.

Due to legal reasons I cannot upload it here. Sorry.

oisin wrote Apr 7, 2014 at 7:13 PM

The Mono guys have a full implementation of T4 available - you should remove the dependency on the VSSDK templating assembly and use that instead. See http://stackoverflow.com/questions/978281/t4-without-visual-studio -- in particular, mhutch's answer:

_I wrote a cleanly reverse-engineered implementation of a T4 engine for the MonoDevelop IDE. It's open-source, licensed under the permissive MIT/X11 license, so you are free to embed the engine in your app or redistribute it. There's also an implementation of the TextTransform.exe command-line tool, and some APIs in the Mono.TextTemplating namespace to aid in hosting the engine.

The only real missing feature right now is custom directive providers - but patches for this are welcome :-)

You can get the code from monodevelop/main/src/addins/TextTemplating in Mono SVN._

matein78 wrote Apr 7, 2014 at 7:52 PM

Thanks for the info! Very interesting.
  • The problem is that we have also a dependency to OpenGax which depends on the text templating implementation of VS. So to fix that we would have to move OpenGax to the MonoDevelop T4 engine.
Would be very interesting, but unfortunately at the moment not possible with the time at hands :(Any help is highly appreaciated!

frankok wrote Jul 23, 2014 at 11:11 AM

Just a quick comment:

If you don't have the SDK installed, or if you for some other reason don't find the dll file under Program Files, check out the GAC on the machine running Visual Studio 2012 to get the file:


On the destination server running Visual Studio 2013, I had to use gacutil to add this to the Global Assembly Cache (GAC). The drag-n-drop into the Assembly folder didn't do the trick.

Also, a reboot after also helps. :-)

Hope this helps.

matein78 wrote Aug 26, 2014 at 9:34 AM

Sorry guys for all the trouble, but time does not allow to update the project right now, as it is rather complex.
The entire current source code is available at https://github.com/rencoreab/SharePoint-Software-Factory
So please contribute fixes and I will get them into a new release asap.

Thanks for your understanding!