I am working on a VISIX project that would generate some classes with T4 templates. All my T4 templates include a common utility template 'Utilities.t4'. However when I initiate the generation of the code, I get the following error in VS 2015:
There was an error loading the include file 'Utilities.t4'. The transformation will not be run. The following Exception was thrown:
System.UriFormatException: Invalid URI: The format of the URI could not be determined.
at System.Uri.CreateThis(String uri, Boolean dontEscape, UriKind uriKind)
at System.Uri..ctor(String uriString)
at Microsoft.VisualStudio.TextTemplating.VSHost.TextTemplatingService.CheckSecurityZone(String path)
at Microsoft.VisualStudio.TextTemplating.VSHost.TextTemplatingService.LoadIncludeText(String requestFileName, String& content, String& location)
at Microsoft.VisualStudio.TextTemplating.Engine.ProcessIncludeDirective(Directive directive, ITextTemplatingEngineHost host, VisitedFiles includedFiles)
ClassMetadata.tt 13
The properties of the include file in VS are:
- Build Action - Content
- Copy to Output Directory - Copy if newer
- Custom Tool - (blank)
- Format Output - False
- Include in VISIX - true
- Transform on Build - false
Can someone please help with the problem?