Embedding View files as resource inside Binary

前端 未结 5 1148
不知归路
不知归路 2021-02-06 09:36

I am trying to create a .Net Library with few Controllers, and i want to reuse them in Multiple web projects.

I\'m half way through, But problem i\'m getting is , Whenev

5条回答
  •  渐次进展
    2021-02-06 10:01

    The WebFormView type eventually calls BuildManager.CreateInstanceFromVirtualPath. There is not an overload or other function in BuildManager to take input from a stream instead of from a virtual path. Therefore, if you do not want to implement IView yourself, you will need to actually unpack the files to disk so that they can be compiled by BuildManager. You could still distribute your DLL as a single file, but the aspx files need to be produced in order for BuildManager to compile them. See BuildManager help for details.

提交回复
热议问题