如何从 nuget 包中排除文件夹 [英] How to exclude a folder from a nuget package

查看:24
本文介绍了如何从 nuget 包中排除文件夹的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用 Octopack/Nuspec 文件来构建我的 nuget 包.

I'm using Octopack / Nuspec file to build my nuget package.

我想排除项目中存在的某些文件夹.例如obj"文件.我一直试图让排除标签工作,但没有任何运气.nuget 文件生成,但文件夹仍然存在.

I would like to exclude certain folders which exist in the project. e.g. the "obj" file. I've been trying to get the exclude tag to work, but haven't had any luck. The nuget file builds, but the folder is still there.

遗憾的是,所有示例都在网络特定文件类型上,而不是文件夹.

Sadly, all the examples on the net specific file types and not folder.

<?xml version="1.0"?>
<package xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd">
  <metadata>
    <id>Foo</id>
    <title>Foo</title>
    <version>$version$</version>
    <authors>NA</authors>
    <owners>NA</owners>
    <licenseUrl>http://Foo</licenseUrl>
    <projectUrl>http://Foo</projectUrl>
    <requireLicenseAcceptance>false</requireLicenseAcceptance>
    <description>Foo</description>
    <releaseNotes>NA</releaseNotes>
  </metadata>
  <files>
    <file src="obj***.*" exclude="*.*" />
  </files>
</package>

推荐答案

我需要创建一个 WebApplication,但使用CodeFile"将其部署为标准 ASP.NET 网站属性.

I needed to create a WebApplication, but deploy it as a standard ASP.NET website using "CodeFile" attributes.

这基本上是为了更新标准 ADFS 登录站点中的页面.

This was basically to update a page in the standard ADFS login site.

<files>
  <file src="**" exclude="***.dll;***.designer.cs;***.csproj;***.pdb;***.user;***.vspscc;bin*.cs;bin*.aspx;bin*.config;bin*.asax;bin*.pubxml" />
</files>

这篇关于如何从 nuget 包中排除文件夹的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆