We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Transform seems fine, but preprocess fails for non-root paths. It seems no directory existence check is made before writing a output file.
Include item:
<T4Preprocess Include="CodeGeneration\CSharp73\CSharp73GameDataGenerator.tt"/>
Error message:
0>CSharp73GameDataGenerator.cs(-1,-1): Error : Internal error: System.IO.DirectoryNotFoundException: Could not find a part of the path '\projects\ProjectName\src\ProjectName\obj\Release\net472\TextTransform\CodeGeneration\CSharp73\CSharp73GameDataGenerator.cs'. at Microsoft.Win32.SafeHandles.SafeFileHandle.CreateFile(String fullPath, FileMode mode, FileAccess access, FileShare share, FileOptions options) at Microsoft.Win32.SafeHandles.SafeFileHandle.Open(String fullPath, FileMode mode, FileAccess access, FileShare share, FileOptions options, Int64 preallocationSize, Nullable`1 unixCreateMode) at System.IO.File.OpenHandle(String path, FileMode mode, FileAccess access, FileShare share, FileOptions options, Int64 preallocationSize) at System.IO.File.WriteToFile(String path, FileMode mode, 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
The text was updated successfully, but these errors were encountered:
The following works for me with package <PackageReference Include="T4.BuildTools" Version="3.0.0" /> : (windows Vs2022 net8.0)
<PackageReference Include="T4.BuildTools" Version="3.0.0" />
<PropertyGroup> <TransformOnBuild>true</TransformOnBuild> <T4DefaultNamespace>EfScaffolding.CodeTemplate.EFCore</T4DefaultNamespace> <TransformOutOfDateOnly>false</TransformOutOfDateOnly> <UseLegacyT4Preprocessing>true</UseLegacyT4Preprocessing> </PropertyGroup> <ItemGroup> <T4Preprocess Include="EfScaffolding\CodeTemplates\EFCore\DbContext.t4" /> <T4Preprocess Include="EfScaffolding\CodeTemplates\EFCore\EntityTypeModel.t4" /> </ItemGroup> <ItemGroup> <Compile Update="EfScaffolding\CodeTemplates\EFCore\*.cs"> <DependentUpon>%(Filename).t4</DependentUpon> <DesignTime>True</DesignTime> <AutoGen>True</AutoGen> </Compile> </ItemGroup>
Sorry, something went wrong.
Thanks @UweLesta, workaround works. Still, bug exists and should be fixed.
No branches or pull requests
Transform seems fine, but preprocess fails for non-root paths.
It seems no directory existence check is made before writing a output file.
Include item:
Error message:
The text was updated successfully, but these errors were encountered: