TypeLoadException on System.Xml.Linq.XDocument when running T4 template on build server
-
09-06-2019 - |
Question
I'm having a problem running a T4 template using TextTransform.exe on my build server. On my dev machine the template works perfectly. The error message is as follows.
error : Running transformation: System.TypeLoadException: Could not instantiate type System.Xml.Linq.XDocument
The build server has the windows 2008 SDK on it, my machine has VS 2008. I thought mayve it couldn't find System.Data.Xml so I ensure the dll was present in the same directory, but no luck. Any ideas?
Solution
Sounds like your server may not have .NET 3.5 installed.
OTHER TIPS
I installed .NET 3.5 SP1 and it corrected the problem
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow