[英]Nuget package : Copy some files only in asp.net projects
I have created a nuget package. 我创建了一个nuget包。
During the package restoration, I want to copy somes files of the package ("Content", "Scripts" folders) only if the project is a web project. 在程序包还原期间,仅当项目为Web项目时,我才想复制程序包的某些文件(“内容”,“脚本”文件夹)。
If the project is not web (example: a class library), just reference the .net libs without imports other files. 如果项目不是Web(例如:类库),则只需引用.net库而不导入其他文件。
Possible ? 有可能吗
I have not tried it myself, but I would probably start here: including msbuild props and targets in a package 我自己还没有尝试过,但我可能会从这里开始: 在包中包含msbuild道具和目标
Direct conditions for files to copy seems not to be possible at the moment: Conditional assembly reference via NuGet 目前似乎无法直接复制文件的条件: 通过NuGet进行条件汇编引用
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.