Closed SharkLock closed 2 years ago
@SharkLock you may want to translate your message to English for better comprehension of everyone on Github. We could all everyone open the translator, or you could do it once, thus you will help everyone once for all
Closing, as I have no idea what this is all about ¯_(ツ)_/¯
#387 这个问题我也遇到了, 不过我用的是DateTime的对象同样提示
Describe the solution you'd like 在这个文件中 D:\RazorLight\src\RazorLight\Generation\RazorSourceGenerator.cs 在internal protected RazorSourceDocument GetNamespacesImports()增加对Namespaces的非空判断 在public virtual async Task<IEnumerable> GetImportsAsync(RazorLightProjectItem projectItem)
中调整 TextSourceRazorProjectItem的返回值 变更后的代码如 下面两张图
![image](https://user-images.githubusercontent.com/9404132/132639845-3598dbd0-26c7-46f9-b778-5c27e31d668d.png)
代码变更后,目前已有的单元测试能正常通过 附支持后的单元测试, 如下图![image](https://user-images.githubusercontent.com/9404132/132640394-bc7201c8-b291-43ba-8463-17443b4f7a05.png)