8

After pulling a project from source control down to a new dev machine with VS 2013 I found I could no longer generate my Client side proxy and entity classes (from the .tt file created by "OData Client Code Generator")

I get exceptions compiling the transform with

  • Microsoft.OData.Client.dll
  • Microsoft.OData.Core.dll
  • Microsoft.OData.Edm.dll

e.g.

Compiling transformation: Metadata file 'Microsoft.OData.Client.dll' could not be found

Followed by a few hundred other build errors as the tt file failed ot generate the required classes giving instead only the dreaded

ErrorGeneratingOutput 

This is despite these dlls and their accompanying xml files being present in the correct place in the project Bin.

MemeDeveloper
  • 6,457
  • 2
  • 42
  • 58

1 Answers1

19

I realised that I had not installed the relevant bits from "Extensions and Updates"

  1. Tools > Extensions and Updates
  2. Online > Visual Studio Gallery > "OData Client Code Generator" (type / paste into search)
  3. Installed Version 2.3.0

Bam - all working again and generating my proxy and entities correctly !

Silly me.

MemeDeveloper
  • 6,457
  • 2
  • 42
  • 58
  • 4
    If I could up vote this more I would. I'm really mystified what about the T4 template requires the OData Client Code Generator extension to be installed in Visual Studio. – MHollis Aug 19 '15 at 18:52
  • 1
    @MHollis thanks, and yes I agree it's really not obvious but I guess it must be that something (or more than one thing) referenced from the relevant .ttinclude is missing without the extension installed. – MemeDeveloper Aug 20 '15 at 01:35
  • 1
    According to [this SO thread](http://stackoverflow.com/questions/19867641/entity-framework-in-visual-studio-2013-library-not-found/19912856#19912856) some VS internals require those DLL's separately... Check the comment by Pawel. – rumblefx0 Jan 25 '16 at 13:38
  • Seriously! I think I spent half a day looking for this :| – Kalp Mar 15 '18 at 22:19