nuget - determine the project type before they try to install my package
how c开发者_开发技巧an I determine the project type before they try to install my package. I wanna show them a cancelation message if the project type is not and MVC application and cancel the installation process?
do I need to add a ps1 script file into tools folder of my package? if so, what should I write inside this script?
Currently it seems that pre-installation checks for aborting the install is not possible. See the answer from David Fowler here.
Scott Hanselman has an example on how to check pre-requisites using the install.ps1 script. He also mentions that it's currently not possible to stop the installation process, but that "In the future there will likely be a pre-install or a dependency check".
精彩评论