MS OData Client Code Generator fails : Compiling transformation: Metadata file 'Microsoft.OData.Client.dll' could not be found
Asked Answered
C

1

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.

Calc answered 28/7, 2015 at 14:21 Comment(0)
C
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.

Calc answered 28/7, 2015 at 14:21 Comment(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.Stevana
@Stevana 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.Calc
According to this SO thread some VS internals require those DLL's separately... Check the comment by Pawel.Opera
Seriously! I think I spent half a day looking for this :|Subdual

© 2022 - 2024 — McMap. All rights reserved.