Can an ASP.NET 5 application be published such that the target machine doesn't need DNX installed?

前端 未结 1 1270
天命终不由人
天命终不由人 2020-12-13 18:42

From the wiki for the main \"aspnet\" GitHub repo:

\"The DNX is an SDK containing all of the bits needed to build and run an application, inclu

相关标签:
1条回答
  • 2020-12-13 19:31

    In theory, you should be able to deploy your application into a machine where even .NET Framework is not installed but I remember hearing that even the dnxcore has some .NET Framework dependencies today and will be gone later (I could be mistaken, it's worth trying this out).

    Assuming this is there and you want to achieve this, you should indeed use the --runtime switch and you need to have coreclr active if you are going to pass active as value.

    For example:

    dnvm use 1.0.0-beta4 -r coreclr -p
    
    Active Version           Runtime Architecture Location                       Al
                                                                                 ia
                                                                                 s
    ------ -------           ------- ------------ --------                       --
           1.0.0-beta4       clr     x64          C:\Users\Tugberk\.dnx\runtimes
           1.0.0-beta4       clr     x86          C:\Users\Tugberk\.dnx\runtimes
           1.0.0-beta4       coreclr x64          C:\Users\Tugberk\.dnx\runtimes
      *    1.0.0-beta4       coreclr x86          C:\Users\Tugberk\.dnx\runtimes
    

    This should bundle the runtime along side your application.

    0 讨论(0)
提交回复
热议问题