Add IsPackable=false to test project templates
See original GitHub issueHi.
At present, running dotnet pack
on a solution with test projects often generates unnecessary warnings when packing test projects. Given that there’s no point in packing test projects, how about adding:
<IsPackable>false</IsPackable>
to the test project templates.
That way, they’ll be ignored when running dotnet pack
. If you guys are ok with this idea, I could open a PR - it’s probably as simple as adding a single line to 4 files.
Issue Analytics
- State:
- Created 7 years ago
- Reactions:4
- Comments:11 (6 by maintainers)
Top Results From Across the Web
Unit test project templates should set IsPackable as false
We have determined that this issue belongs to the xUnit test project template. Please go to https://github.com/dotnet/templating for filing the issue and ...
Read more >How are dependencies managed in `dotnet` templates?
NET Core 2.0 (SDK) and tried again and now I get a pre-release version of the same dependency! What gives? <Project Sdk="Microsoft.NET.Sdk"> < ......
Read more >Creating a new bUnit test project
The steps for creating a test project with the bUnit template are as follows: Install the template (only needed the first time); Create...
Read more >Getting Started: .NET Framework with Visual Studio ...
NET Framework test project, because Visual Studio doesn't contain a test project template for xUnit.net for .NET Framework. We'll fix that in just...
Read more >Getting started: .NET Core with command line > xUnit.net
From the command line, create a folder for your test project, change into it, ... <TargetFramework>net5.0</TargetFramework> <IsPackable>false</IsPackable> ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@motowilliams this change wouldn’t prevent doing that, but would opt out of doing so by default. I’m curious as to which is the more common case, as that’s the direction we’d want to take for the templates.
Yes, it should be overridable by user.