问题
I have been working with RazorGenerator.Mvc and RazorGenerator.MSBuild to precompile the views. The error i face when i try to build the project.
CS8103 C# Combined length of user strings used by the program exceeds allowed limit. Try to decrease use of string literals.
Visual Studio 2019 Version 16.3
When i remove RazorGenerator packages, clean and rebuild, the error is gone.
This github issue indicated that the fix will be in VS 2019. I tried everything to debug the issue but could not found it.
UPDATE
When i exclude some of views from the project and try rebuild, error gone. I think it might be the Visual Studio 2019 bug which they say is resolved but isn't.
Any work around that might work? I haven't yet registered view engine.
There might be fix regarding RazorGenerator tool if not for vs2019, if anyone can help or reference, i will be thankful.
Thanks for your time.
回答1:
I end up generating .cs
for all my views manually. By setting property CustomTool
for all views to RazorGenerator
. That was it to work around for me.
来源:https://stackoverflow.com/questions/58555103/user-strings-used-by-the-program-exceeds-allowed-limit-by-visual-studio-2019