Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

T4.BuildTools fails to generate preprocessed files in obj dir. #182

Open
VirusQuartirus opened this issue Mar 9, 2024 · 0 comments
Open

Comments

@VirusQuartirus
Copy link

VirusQuartirus commented Mar 9, 2024

When *.tt templates are placed in project subfolders T4.BuildTools tries to reproduce this folder structure in obj dir, however it doesn't create folder structure prior to write generated file. So it fails with following error.
Internal error: System.IO.DirectoryNotFoundException: Could not find a part of the path '...'. at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath) at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost) at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost) at System.IO.StreamWriter.CreateFile(String path, Boolean append, Boolean checkHost) at System.IO.StreamWriter..ctor(String path, Boolean append, Encoding encoding, Int32 bufferSize, Boolean checkHost) at System.IO.File.InternalWriteAllText(String path, String contents, Encoding encoding, Boolean checkHost) at System.IO.File.WriteAllText(String path, String contents, Encoding encoding) at Mono.TextTemplating.Build.TextTransformProcessor.WriteOutput(MSBuildTemplateGenerator generator, String outputFile, String outputContent, Encoding encoding) in /_/Mono.TextTemplating.Build/TextTransformProcessor.cs:line 184
I guess that simple directory existence/creation check should be added prior to write output.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant