You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We have a visual studio solution containing multiple csharp projects, each project has a t4 tool running on build.
Sometimes when building the solution we get the following error.
Maybe running multiple t4 instances at the same time has some issues generating unique temp paths.
53>Target DotnetToolRestore:
53> Tool 'dotnet-t4' (version '2.2.1') was restored. Available commands: t4
53>Target T4Generate:
53> System.IO.IOException: Cannot create 'C:\Users\USER\AppData\Local\Temp\tmp749B.tmp' because a file or directory with the same name already exists.
53> at System.IO.FileSystem.CreateDirectory(String fullPath, Byte[] securityDescriptor)
53> at System.IO.Directory.CreateDirectory(String path)
53> at Mono.TextTemplating.TemplatingEngine.CompileCode(IEnumerable`1 references, TemplateSettings settings, CodeCompileUnit ccu) in D:\a\t4\t4\Mono.TextTemplating\Mono.TextTemplating\TemplatingEngine.cs:line 241
53> at Mono.TextTemplating.TemplatingEngine.CompileTemplateInternal(ParsedTemplate pt, String content, ITextTemplatingEngineHost host, TemplateSettings settings) in D:\a\t4\t4\Mono.TextTemplating\Mono.TextTemplating\TemplatingEngine.cs:line 204
53> at Mono.TextTemplating.TemplatingEngine.CompileTemplate(ParsedTemplate pt, String content, ITextTemplatingEngineHost host, TemplateSettings settings) in D:\a\t4\t4\Mono.TextTemplating\Mono.TextTemplating\TemplatingEngine.cs:line 174
53> at Mono.TextTemplating.ToolTemplateGenerator.ProcessTemplate(ParsedTemplate pt, String inputFile, String inputContent, String& outputFile, TemplateSettings settings) in D:\a\t4\t4\dotnet-t4\ToolTemplateGenerator.cs:line 64
53> at Mono.TextTemplating.TextTransform.MainInternal(String[] args) in D:\a\t4\t4\dotnet-t4\TextTransform.cs:line 218
53> at Mono.TextTemplating.TextTransform.Main(String[] args) in D:\a\t4\t4\dotnet-t4\TextTransform.cs:line 42
53> C:\CodeBase\ProjectName\ProjectName.csproj(43,5): error MSB3073: The command "dotnet tool run t4 -- generator.t4 -o OutputFIle.gen.cs" exited with code -1.
The text was updated successfully, but these errors were encountered:
This is fixed by 0c09928, but I haven't released it yet as it's intertwined with 89a98f8, which breaks assembly unload.
FWIW, all the most recent packages in GPR came from the MSBuild targets branch (PR #110), which does include the above commits and a fix for the unload issue.
We have a visual studio solution containing multiple csharp projects, each project has a t4 tool running on build.
Sometimes when building the solution we get the following error.
Maybe running multiple t4 instances at the same time has some issues generating unique temp paths.
The text was updated successfully, but these errors were encountered: