none
Microsoft.VisualStudio.TextTemplating.14.0 Error

    Question

  • Hi

    I have got a github project https://github.com/smangelschots/T4Host (created in vs2013) I want to update tot vs2015 but I do not seem to get it working my error:

    An Exception was thrown while running the transformation code. The process cannot continue.  The following Exception was thrown:
    System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.CodeAnalysis, Version=1.3.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified.
    File name: 'Microsoft.CodeAnalysis, Version=1.3.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'
       at Microsoft.VisualStudio.TextTemplating.CompilerBridge..ctor(String source, Boolean debug, IEnumerable`1 references, String cmdLineArguments)
       at Microsoft.VisualStudio.TextTemplating.CompilerBridge.Create(SupportedLanguage language, String source, Boolean debug, IEnumerable`1 references, String cmdLineArguments)
       at Microsoft.VisualStudio.TextTemplating.TransformationRunner.Compile(String source, String inputFile, IEnumerable`1 references, Boolean debug, SupportedLanguage language, String compilerOptions)
       at Microsoft.VisualStudio.TextTemplating.TransformationRunner.LocateAssembly(Boolean cacheAssemblies, String fullClassName, String source, String inputFile, Boolean debug, SupportedLanguage language, IEnumerable`1 compilerReferences, String compilerOptions)
       at Microsoft.VisualStudio.TextTemplating.TransformationRunner.PrepareTransformation(TemplateProcessingSession session, String source, ITextTemplatingEngineHost host)

    Also when I try to recreate the project from msdn (url below) I get the same error.

    https://msdn.microsoft.com/en-us/library/bb126579.aspx

    It works fine if I use the old dlls

    Microsoft.VisualStudio.TextTemplating.12.0.dll
    Microsoft.VisualStudio.TextTemplating.VSHost.12.0.dll

    But than i need to install VS2013 and I do not want to do that.

    Does anyone know a way around my problem

    Thanks

    Monday, November 14, 2016 3:50 PM

All replies

  • Hi Steve Mangelschots,

    In my VS2015 I could open this project and build it without any problems, because I have

    Microsoft.VisualStudio.TextTemplating.12.0.dll

    Microsoft.VisualStudio.TextTemplating.VSHost.12.0.dll

    Because in my computer, I have installed Test Agent and Test Control for VS2013 Update5, so I could open any projects that need to refer VS2013 dlls.

    In my computer:

    You could delete them and add the same dlls from VS2015. Please refer to the following screenshot:

    Sincerely,

    Oscar


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.


    Tuesday, November 15, 2016 9:57 AM
    Moderator