我最近搬到了Visual Studio 2017Community Edition.它有2个不错的新功能
我想将我的开源CodeFirstWebFrameworkDLL打包为nuget包.除了包括之外DLL,包还必须包含其他文件的整个目录树(包括.js,.tmpl,.css和.md文件).
我怎么知道Visual Studio我希望包中包含这个目录树?
从我通过广泛搜索找到的信息,并忽略了涉及将文件添加到csproj的所有过时信息,我所能找到的只是将它们放在一个contentFiles文件夹中,但这似乎不起作用.
我的项目文件如下所示:
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net45</TargetFramework>
<GeneratePackageOnBuild>True</GeneratePackageOnBuild>
<Authors>Nikki Locke</Authors>
<Company>Trumphurst Ltd</Company>
<Description>Easy to use web server for building web apps that use sql databases generated from c# classes</Description>
<Copyright>2017 Trumphurst Ltd.</Copyright>
<PackageProjectUrl>https://github.com/nikkilocke/CodeFirstWebFramework</PackageProjectUrl>
<RepositoryUrl>https://github.com/nikkilocke/CodeFirstWebFramework</RepositoryUrl>
<RepositoryType>Github</RepositoryType>
<PackageTags>C# SQL Code First Web Server</PackageTags>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Markdig" Version="0.12.1" />
<PackageReference Include="Mono.Data.Sqlite.Portable" Version="1.0.3.5" />
<PackageReference Include="mustache-sharp" Version="0.2.10" />
<PackageReference Include="MySql.Data" Version="6.9.9" />
<PackageReference Include="Newtonsoft.Json" Version="10.0.2" …Run Code Online (Sandbox Code Playgroud)