简体   繁体   English

Nuget包:仅在asp.net项目中复制一些文件

[英]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.

相关问题 将NuGet与ASP.NET“网站”项目中的* .dll.refresh文件与Web部署项目一起使用 - Using NuGet with *.dll.refresh files in ASP.NET “Web Site” projects with Web Deployment Projects ASP.NET解决方案迁移到3.5 ..但仅适用于*部分* CS项目! - ASP.NET Solution Migration to 3.5 .. but only for *some* of the CS Projects ! 用于ASP.Net Core和Full Framework项目的bootstrap.sass nuget软件包的不同安装 - Different installation for bootstrap.sass nuget package for ASP.Net Core and Full framework projects ASP.NET NuGet Package 依赖关系不会更新 - ASP.NET NuGet Package Dependency Will Not Update 如何防止仅在ASP.Net 5中的某些文件的浏览器缓存? - How to prevent browser cache for some files only in ASP.Net 5? ASP.NET 2项目共享相同的文件 - ASP.NET 2 projects to share same files ASP.NET Core 中的 NuGet 包位置在哪里? - Where's the NuGet package location in ASP.NET Core? Nuget 不更新 ASP.NET 网站中的包引用 - Nuget does not update Package References in ASP.NET website 在ASP.NET MVC项目中安装nuget软件包后出现错误 - Error after installing nuget package in asp.net MVC project ASP.Net网站NuGet包依赖性 - ASP.Net web site NuGet package dependencies
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM