OData / lab

This repository is for exploring new ideas and developing early prototypes of various OData stacks.
Other
48 stars 59 forks source link

Fix T4 code generator include template #69

Closed tchuan closed 6 years ago

tchuan commented 6 years ago

Add missing references. Fix compilation error.

biaol-odata commented 6 years ago

@tchuan Can you please specify the detail compilation error you are running into? I can build it clean on my machine. Please note that it requires VS2017 installation for ODataConnectedService.

tchuan commented 6 years ago

@biaol-odata I installed the latest version on my VS2017. Here is how to reproduce.

  1. Use http://services.odata.org/V4/(S(zvihdypl2mjvnndu2ge4ij4f))/TripPinServiceRW/$metadata as a V4 Endpoint.
  2. Select 'Whether to include the T4 files into this project'

`Error Compiling transformation: The type 'Func<,>' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Runtime, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. ConsoleApp1 Reference.tt 586 Error Compiling transformation: The type 'XmlReader' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Xml.ReaderWriter, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. ConsoleApp1 Reference.tt 589 Error Compiling transformation: The type 'Object' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Runtime, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. ConsoleApp1 Reference.tt 589 Error Compiling transformation: Operator '!=' cannot be applied to operands of type 'method group' and '' ConsoleApp1 Reference.tt 699 Error Compiling transformation: foreach statement cannot operate on variables of type 'IEnumerable' because 'IEnumerable' does not contain a public definition for 'GetEnumerator' ConsoleApp1 Reference.tt 993 Error Compiling transformation: The type 'Enum' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Runtime, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. ConsoleApp1 Reference.tt 1169
Error Compiling transformation: The type 'IEnumerable<>' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Runtime, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. ConsoleApp1 Reference.tt 1220
Error Compiling transformation: foreach statement cannot operate on variables of type 'IEnumerable' because 'IEnumerable' does not contain a public definition for 'GetEnumerator' ConsoleApp1 Reference.tt 1288
Error Compiling transformation: foreach statement cannot operate on variables of type 'IEnumerable' because 'IEnumerable' does not contain a public definition for 'GetEnumerator' ConsoleApp1 Reference.tt 1490
Error Compiling transformation: foreach statement cannot operate on variables of type 'IEnumerable' because 'IEnumerable' does not contain a public definition for 'GetEnumerator' ConsoleApp1 Reference.tt 1530
Error Compiling transformation: Operator '==' cannot be applied to operands of type 'method group' and 'string' ConsoleApp1 Reference.tt 2066
Error Compiling transformation: foreach statement cannot operate on variables of type '?' because '?' does not contain a public definition for 'GetEnumerator' ConsoleApp1 Reference.tt 2077
Error Compiling transformation: Argument 1: cannot convert from 'System.Globalization.CultureInfo' to 'string' ConsoleApp1 Reference.tt 2456

`