Closed philip-reed closed 8 years ago
tried doing a repair on VS Enterprise 2015 and still doesn't work for me.
here is the common error stack between different apps using different client code instances :
Severity Code Description Project File Line Suppression State Error Compiling transformation: The type 'Func<,>' is defined in an assembly that is not referenced. You must add a reference to assembly 'mscorlib, Version=2.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e, Retargetable=Yes'.
Error Compiling transformation: The type 'XmlReader' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Xml, Version=2.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e, Retargetable=Yes'.
Error Compiling transformation: The type 'Object' is defined in an assembly that is not referenced. You must add a reference to assembly 'mscorlib, Version=2.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e, Retargetable=Yes'.
Error Compiling transformation: Operator '!=' cannot be applied to operands of type 'method group' and '
Error Compiling transformation: foreach statement cannot operate on variables of type 'System.Collections.Generic.IEnumerable
Error Compiling transformation: The type 'IEnumerable<>' is defined in an assembly that is not referenced. You must add a reference to assembly 'mscorlib, Version=2.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e, Retargetable=Yes'.
Error Compiling transformation: foreach statement cannot operate on variables of type 'System.Collections.Generic.IEnumerable
Error Compiling transformation: foreach statement cannot operate on variables of type 'System.Collections.Generic.IEnumerable
Error Compiling transformation: foreach statement cannot operate on variables of type 'System.Collections.Generic.IEnumerable
Error Compiling transformation: Operator '==' cannot be applied to operands of type 'method group' and 'string'
Error Compiling transformation: foreach statement cannot operate on variables of type '?' because '?' does not contain a public definition for 'GetEnumerator'
Error Compiling transformation: The type 'Enum' is defined in an assembly that is not referenced. You must add a reference to assembly 'mscorlib, Version=2.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e, Retargetable=Yes'.
Same issue here - also on update 2
Same issue here on update 2. I receive the same errors as listed by rsmaloney. Probably related to this: https://connect.microsoft.com/VisualStudio/feedback/details/2540224
We are also having this issue after running update 2.
Thanks for the +1s, it's good to know that this isn't just a single corrupted-state issue. We'll find some time to investigate in the next week.
We are still investigating this issue.
One workaround is to use another extension tool OData Connected Service to generate the client code.
Please do not check the "Whether to include the T4 files into this project".
Is it built as a .net portable lib? If so, it should be retargeted to the full .net framework that VS itself runs on, which should fix this issue.
Perhaps not relevant but although my project is targeted at the full framework I am using Microsoft CommonServiceLocator with MVVMLight, which I notice has a portable library. Have the same T4 issues.
Hmmm, @KeffiH, I think that probably is relevant. If you have a dependency on something built against the PCL, then you have the same T4 issue. This makes the limitation rather more important, as although there is no particularly good reason to build something that depends on EnvDTE as portable (since VS itself is hardly portable), there may be a need to ref a portable lib that has to be portable.
Just discovered same issue in our code. Also saw this bug registered.
Also getting the same mscorelib 2.0.5.0 error as mention above.
Is anyone able to give an update on this issue please?
I used the workaround mentioned above. OData Connected Service. That works! :-)
Same here.
@lisamariet @KeffiH I cant see anything in the docs that show how this work around generates the client side proxy classes. Am I missing something? With the OData Client Code Generator, I right click on the .tt file in my client app and choose 'Run Custom Tool'. What is the equivalent process for the work around?
*Edit: I was looking at the docs for the wrong extension, "OData v4 Web API Scaffolding" and not "OData Connected Service". Can't find any usage instructions for the "OData Connected Service" Extension.
http://odata.github.io/odata.net/#OData-Client-Code-Generation-Tool
I followed this tutorial.
+1, just tried to crack the cover on odata client in this tutorial:
and this issue is a breaking roadblock :(
This occurs with a vanilla console app, targeting full framework 4.5.2 with no extra dependencies.
+1
I'm also having same issue after updating Visual Studio 2015 - Update 2. I'm using OData Connected Service Extension. Getting 'ErrorGeneratingOutput' on generated file.
We are following up with the VS team. At this point we believe this to be a VS change that caused the break. We've heard of some other T4 templates that are broken as well. We will keep you posted.
Active connect report here: https://connect.microsoft.com/VisualStudio/feedback/details/2540224
Given the blocking nature of this issue we have created a hot-fix for it that will be published as part of the next regular update to VS2015 Update 2. That should happen within the next week, and I'll be sure to post here when it does, however you can also keep an eye on this page: https://msdn.microsoft.com/en-us/library/mt695655.aspx Once this update has been published it can be applied to an existing Update 2 installation by just installing the separate KB download, and it will be automatically included in any new Update 2 install after that point.
For everyone subscribed, the patch for this was uploaded yesterday (5/4).
Anyone else having an issue with this patch just spinning and spinning at waiting for updates?
The installer took a couple of minutes for me. No issues.
Thanks @hawk4031. Did it fix the original issue? Other folks, is it working for you?
@markdstafford Yes I tested it out with the T4 template we are using and it worked immediately. Thanks for looking into this and getting a fix out quickly!
Great, glad to hear it! (Although we actually didn't do anything... the VS team fixed the core problem.) At any rate, thanks to everyone who reported this issue. If anyone has continued problems here, please let us know and we'll reopen this issue.
Short summary (3-5 sentences) describing the issue.
Client Code Generator doesn't appear to support Visual Studio Update 2.
Assemblies affected
??
Reproduce steps
The simplest set of steps to reproduce the issue. If possible, reference a commit that demonstrates the issue.
Using Visual Studio Update 2 with the OData Client Code Generator Extension installed. Configure MetadataDocumentUri to target a valid odata URL Right click the ODataClient.tt -> Run Custom Tool : Does not generate code.
Expected result
ODataClient.cs is generated with code that builds.
Actual result
ErrorGeneratingOutput is placed in ODataClient.cs
Additional details
Error list mentions missing references to mscorlib, system.xml. Recent update to T4 Templates to support C#6 perhaps?