WebActivator.PreApplicationStartMethod does not work

前端 未结 5 1197
-上瘾入骨i
-上瘾入骨i 2020-12-15 23:34
[assembly:  WebActivator.PreApplicationStartMethod(typeof(MyApp.App_Start.StructureMapMvc), \"Start\")]

namespace MyApp.App_Start
{
    public static class Structur         


        
5条回答
  •  再見小時候
    2020-12-16 00:01

    With WebActivator version 1.5.3, the MyClass.cs.pp file cannot just live in the App_Start folder, but must live in the content\App_Start folder in order for nuget install to create the transformed file in the App_Start of the target project.

    This is undocumented, as far as I can tell.

    NOTE: This solution seems to work so long as the originating .nupkg was built using nuget pack using a conventional file system approach, but NOT when using nuget pack that targets a specific .csproj file.

提交回复
热议问题