Skip to content

Instantly share code, notes, and snippets.

Last active Aug 20, 2020
What would you like to do?
.NET NU5104 NoWarn Build Errors
using System;
namespace bugz
public class Class1
// This package used to be packable with the .NET Core 3.1.301 SDK but
// packaging fails with the .NET Core 3.1.401 SDK. The exit code from
// `dotnet pack` is now 1 indicating failure. This has prevented
// release builds of some of our libraries.
<Project Sdk="Microsoft.NET.Sdk">
<PackageReference Include="Lucene.Net" Version="4.8.0-beta00011" NoWarn="NU5104" />
#! /usr/bin/env bash
set -euo pipefail
function run_with_sdk()
echo ""
echo "with SDK $sdk_tag"
rm -rf bin/ obj/
docker run -v `pwd`:/test$sdk_tag bash -c 'if dotnet pack /test; then echo ++ passed. Exit code: $? ++; else echo -- failed. Exit code: $? --; fi'
run_with_sdk 3.1.201
run_with_sdk 3.1.301
run_with_sdk 3.1.302
run_with_sdk 3.1.401
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment