diff --git a/Invoke-BeforePack.ps1 b/Invoke-BeforePack.ps1
deleted file mode 100644
index cc38cc43..00000000
--- a/Invoke-BeforePack.ps1
+++ /dev/null
@@ -1,9 +0,0 @@
-# This script tries to work around NuGet's validation caused by the presence of these files:
-# - bin/Release/netstandard2.0/Lombiq.Analyzers.dll
-# - obj/Release/netstandard2.0/Lombiq.Analyzers.dll
-# The cause is probably that we don't actually do anything in the corresponding csproj, it only exists because we need
-# an entry point for `dotnet pack` (unlike the older `nuget pack` tooling, which worked with just the .nuspec alone).
-
-# Remove all .dll and other build output files from the directory to be packed.
-Remove-Item Lombiq.Analyzers/bin -Recurse
-Remove-Item Lombiq.Analyzers/obj/Release -Recurse
diff --git a/Lombiq.Analyzers/Lombiq.Analyzers.nuspec.template b/Lombiq.Analyzers/Lombiq.Analyzers.nuspec.template
index 190367c3..4763c806 100644
--- a/Lombiq.Analyzers/Lombiq.Analyzers.nuspec.template
+++ b/Lombiq.Analyzers/Lombiq.Analyzers.nuspec.template
@@ -1,4 +1,4 @@
-
+
Lombiq.Analyzers
@@ -17,4 +17,12 @@
+
+
+
+
diff --git a/TestSolutions/Lombiq.Analyzers.PackageReference/IndirectPackageReference/IndirectPackageReference.csproj b/TestSolutions/Lombiq.Analyzers.PackageReference/IndirectPackageReference/IndirectPackageReference.csproj
index 9d5d6104..71fcf694 100644
--- a/TestSolutions/Lombiq.Analyzers.PackageReference/IndirectPackageReference/IndirectPackageReference.csproj
+++ b/TestSolutions/Lombiq.Analyzers.PackageReference/IndirectPackageReference/IndirectPackageReference.csproj
@@ -10,7 +10,7 @@
-->
-
+
all
diff --git a/TestSolutions/Lombiq.Analyzers.PackageReference/Lombiq.Analyzers.PackageReference.csproj b/TestSolutions/Lombiq.Analyzers.PackageReference/Lombiq.Analyzers.PackageReference.csproj
index 726d2a1c..f7243d86 100644
--- a/TestSolutions/Lombiq.Analyzers.PackageReference/Lombiq.Analyzers.PackageReference.csproj
+++ b/TestSolutions/Lombiq.Analyzers.PackageReference/Lombiq.Analyzers.PackageReference.csproj
@@ -5,7 +5,7 @@
-
+
all