RazorEngineCore.RazorEngine.Compile not work when publish to single file
See original GitHub issuetarget framework is .net5
when i publish exe to single file ,compile a templeate ,get this error:
System.ArgumentException: Empty path name is not legal. (Parameter ‘path’)
at System.IO.FileStream…ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options)
at System.IO.FileStream…ctor(String path, FileMode mode, FileAccess access, FileShare share)
at System.IO.File.OpenRead(String path)
at Roslyn.Utilities.FileUtilities.OpenFileStream(String path)
at Microsoft.CodeAnalysis.MetadataReference.CreateFromFile(String path, MetadataReferenceProperties properties, DocumentationProvider documentation)
at RazorEngineCore.RazorEngine.<>c.<CreateAndCompileToStream>b__4_1(Assembly ass)
at System.Linq.Enumerable.SelectEnumerableIterator2.MoveNext() at System.Collections.Generic.List
1.InsertRange(Int32 index, IEnumerable1 collection) at System.Collections.Generic.List
1.AddRange(IEnumerable1 collection) at System.Linq.Enumerable.ConcatIterator
1.ToList()
at System.Linq.Enumerable.ToList[TSource](IEnumerable1 source) at RazorEngineCore.RazorEngine.CreateAndCompileToStream(String templateSource, RazorEngineCompilationOptions options) at RazorEngineCore.RazorEngine.Compile(String content, Action
1 builderAction)
if not single file , it ok
Issue Analytics
- State:
- Created 3 years ago
- Comments:17 (7 by maintainers)
Closing issue then 😃
got the exception. apparently its a NET5 breaking change…