Skip to content
New issue

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

使用 Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation 发布Publish会运行出错 #65

Closed
Fat-Snail opened this issue May 10, 2024 · 5 comments
Labels
bug Something isn't working

Comments

@Fat-Snail
Copy link

No description provided.

@liesauer
Copy link
Member

能提供一个可复现的demo吗

@Fat-Snail
Copy link
Author

https://stackoverflow.com/questions/78221150/runtime-compilation-of-razor-pages-does-not-work-net-8-vs2022

就是参照这个案例,然后再引用NetBeauty就不行了

@liesauer
Copy link
Member

最好能提供一个demo复刻,不然很多都是会有不一样的效果

@Fat-Snail
Copy link
Author

https://github.com/Fat-Snail/X-Net-Mod/blob/main/RazorDom.zip
最近在忙其他事情,这包含两个项目,一个是mvc、一个是web page
引用了NetBeauty 后 发布会报

System.ArgumentOutOfRangeException: length ('-1') must be a non-negative value. (Parameter 'length')
Actual value was -1.

@liesauer liesauer added the bug Something isn't working label May 21, 2024
@liesauer
Copy link
Member

目前已经确认是和Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation包冲突的问题,这个包会解析deps.json,要求里面包的格式必须是xxxxxx/1.0.0.0,但是startup hook这个特定dll是要xxxxx的格式的,不带版本号,加了版本号hook就加载不了

liesauer added a commit that referenced this issue Oct 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants