从自定义Visual Studio模板中缺少领先点文件
我已经创建了一个自定义 Visual Studio template 包含ASP.Net Core+Angular Core+Angular Application 。但是,当我使用此模板创建一个新项目时,生成的项目中缺少以开头的文件。
这些是模板项目的 clientApp 文件夹中的文件:
但是,当我打包模板项目时,使用
dotnet new --install MintPlayer.AspNetCore.IdentityServer.Templates
这些文件安装它们是生成项目中缺少的:
我已经查看了以下内容,但没有成功:
当我运行时,
dotnet pack --configuration Release
我可以在控制台中看到以下印刷:
C:\...\NuGet.Build.Tasks.Pack.targets(221,5):
warning NU5119: File 'C:\repos\Example.AspNetCore.Templates\Example.AspNetCore.Templates\Templates\Application\Web\ClientApp\node_modules\resolve\.editorconfig' was not added to the package. Files and folders starting with '.' or ending with '.nupkg' are excluded by default. To include this file, use -NoDefaultExcludes from the commandline [C:\...\Example.AspNetCore.Templates.csproj]
如何无论如何我可以将这些文件作为“内容”包含在我的软件包中吗?
参考:
I've created a custom Visual Studio template containing an ASP.NET Core+angular application. But when I create a new project using this template, the files starting with .
are missing from the generated project.
These are the files in the ClientApp folder of the template project:
But when I package the template project, install them using
dotnet new --install MintPlayer.AspNetCore.IdentityServer.Templates
These files are missing from the generated project:
I've already taken a look at the following, but without success:
When I run
dotnet pack --configuration Release
I can see the following printed in the console:
C:\...\NuGet.Build.Tasks.Pack.targets(221,5):
warning NU5119: File 'C:\repos\Example.AspNetCore.Templates\Example.AspNetCore.Templates\Templates\Application\Web\ClientApp\node_modules\resolve\.editorconfig' was not added to the package. Files and folders starting with '.' or ending with '.nupkg' are excluded by default. To include this file, use -NoDefaultExcludes from the commandline [C:\...\Example.AspNetCore.Templates.csproj]
How can I include these files anyway in my package as "Content"?
References:
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
添加
到root
csproj
文件解决了问题spa-templates存储库做相同的
Adding
To the root
csproj
file solved the issueThe spa-templates repository does the same