Closed pascalberger closed 4 years ago
Notes from doing repro:
https://github.com/NuGet/Home/issues/6138 seems to be a similar issue (where something was packed because of imported .props
files). In my case I also have a .nuspec
file beside which contains a <files>
section, but files from adapter will still be added.
While test projects normally don't be packed as NuGet packages, I think this might be a general issue with a certain kind of packages. The case with the adapter popped up when I tried to add the adapter to a shared project used by all test projects, which is also packaged as a NuGet package (this case can easily be worked around by adding the adapter to the test projects directly).
I am having the same issue with nuget CLI 4.6.2. NUnit3.TestAdapter.dll and the nunit.engine.dll get added to the content folder of the built package regardless of having a nuspec file with or without a
Hey @pascalberger
After further investigation, the repro for this bug seems equivalent to https://github.com/nuget/home/issues/6138, so I am closing this bug as equivalent to that one.
If a project contains NUnit test adapter v2 and a
nuget pack myproject.csproj
is called, nuget does add the files to the content folder. Defining the dependency toNUnitTestAdapter
asdevelopmentDependency
does not help since the package imports.props
files.Details about Problem
NuGet product used (NuGet.exe | VS UI | Package Manager Console | dotnet.exe): nuget.exe
NuGet version (x.x.x.xxx): 5.0.2.5988
dotnet.exe --version (if appropriate): -
VS version (if appropriate): -
OS version (i.e. win10 v1607 (14393.321)): Microsoft Windows [Version 10.0.17763.379]
Worked before? If so, with which NuGet version: -
Detailed repro steps so we can see the same problem
Create an assembly and add
NUnitTestAdapter
NuGet package.Run
nuget pack myproject.csproj
...
Other suggested things
Verbose Logs
Sample Project
See https://github.com/pascalberger/nu5100-testadapter-repro