Closed jddj007-hydra closed 2 years ago
when i publish a single file on .net6 Complie method get this errors:
Empty path name is not legal. (Parameter 'path') at System.IO.Strategies.FileStreamHelpers.ValidateArguments(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, Int64 preallocationSize) at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share) at Roslyn.Utilities.StandardFileSystem.OpenFile(String filePath, FileMode mode, FileAccess access, FileShare share) at Roslyn.Utilities.CommonCompilerFileSystemExtensions.OpenFileWithNormalizedException(ICommonCompilerFileSystem fileSystem, String filePath, FileMode fileMode, FileAccess fileAccess, FileShare fileShare) at Microsoft.CodeAnalysis.MetadataReference.CreateFromFile(String path, MetadataReferenceProperties properties, DocumentationProvider documentation) at RazorEngineCore.RazorEngine.<>c.b__4_1(Assembly ass) at System.Linq.Enumerable.SelectEnumerableIterator2.MoveNext() at System.Collections.Generic.List1.InsertRange(Int32 index, IEnumerable1 collection) at System.Collections.Generic.List1.AddRange(IEnumerable1 collection) at System.Linq.Enumerable.ConcatIterator1.ToList() at System.Linq.Enumerable.ToList[TSource](IEnumerable1 source) at RazorEngineCore.RazorEngine.CreateAndCompileToStream(String templateSource, RazorEngineCompilationOptions options) at RazorEngineCore.RazorEngine.Compile(String content, Action1 builderAction)
2.MoveNext() at System.Collections.Generic.List
1 collection) at System.Collections.Generic.List
1 collection) at System.Linq.Enumerable.ConcatIterator
1 source) at RazorEngineCore.RazorEngine.CreateAndCompileToStream(String templateSource, RazorEngineCompilationOptions options) at RazorEngineCore.RazorEngine.Compile(String content, Action
look this :https://github.com/dotnet/aspnetcore/issues/38493
does it work with net5?
probably https://github.com/adoconnection/RazorEngineCore/commit/097a1c3f341f86241a85b9986cc4e68e0724c7b8#diff-9b40affa6fb42b4acc645668f9fc81bb994aa69a30a834bf5220e35a925e0c08
it work with net6 now. thank you.
when i publish a single file on .net6 Complie method get this errors:
Empty path name is not legal. (Parameter 'path') at System.IO.Strategies.FileStreamHelpers.ValidateArguments(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, Int64 preallocationSize) at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share) at Roslyn.Utilities.StandardFileSystem.OpenFile(String filePath, FileMode mode, FileAccess access, FileShare share) at Roslyn.Utilities.CommonCompilerFileSystemExtensions.OpenFileWithNormalizedException(ICommonCompilerFileSystem fileSystem, String filePath, FileMode fileMode, FileAccess fileAccess, FileShare fileShare) at Microsoft.CodeAnalysis.MetadataReference.CreateFromFile(String path, MetadataReferenceProperties properties, DocumentationProvider documentation) at RazorEngineCore.RazorEngine.<>c.b__4_1(Assembly ass)
at System.Linq.Enumerable.SelectEnumerableIterator
2.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)