question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Add IsPackable=false to test project templates

See original GitHub issue

Hi.

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:closed
  • Created 7 years ago
  • Reactions:4
  • Comments:11 (6 by maintainers)

github_iconTop GitHub Comments

2reactions
mlorbetskecommented, Feb 26, 2017

@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.

1reaction
coditocommented, Feb 27, 2017

Yes, it should be overridable by user.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found