问题
I have NuGet package with some custom testing utilities. It's project is referencing MSTest.TestFramework and MSTest.TestAdapter NuGet packages, and corresponding dependencies are specified in nuspec file. Files section only specifies pdb file of project itself to be added.
Yet, I'm constantly getting DLLs related to MSTest.TestAdapter in content folder of NuGet package. Why does this happen? I can't figure out by the documentation. Can I somehow configure dependencies to not include any files?
My nuspec looks like this
<?xml version="1.0"?>
<package xmlns="http://schemas.microsoft.com/packaging/2011/08/nuspec.xsd">
<metadata>
<id>TestUtils</id>
<version>1.0.0</version>
<title>TestUtils</title>
<requireLicenseAcceptance>false</requireLicenseAcceptance>
<description>Test utilities</description>
<dependencies>
<dependency id="MSTest.TestFramework" version="1.1.18" exclude="contentFiles"/>
<dependency id="MSTest.TestAdapter" version="1.1.18" exclude="contentFiles"/>
</dependencies>
</metadata>
<files>
<file src="bin\$configuration$\$id$.pdb" target="lib\net461"/>
</files>
</package>
来源:https://stackoverflow.com/questions/50905870/why-does-mstest-testadapter-adds-its-dlls-into-my-nuget-package