Closed Siphonophora closed 4 years ago
@codito If you know how to do this, could you tell me what I did wrong? I can spend more time on it, but figured I would ask before I spend too much more time playing with it.
@codito I finally made some progress on this. It turns out the issue must be somehwere in the CI system. When I run build1.ps
locally, I get the right nuspec, but appveyor does not. Both build with the icon file in the package. Any ideas?
Now that I know this, I will clean up the changes I made a bit. Like removing the minClientVersion.
Also, you asked above about best practice for icon location w/in the package. I checked Newtsoft.Json and Serilog. Both just have the icon in root.
Locally
Builds using Microsoft (R) Build Engine version 16.6.0+5ff7b0c9e for .NET Core
<?xml version="1.0" encoding="utf-8"?>
<package xmlns="http://schemas.microsoft.com/packaging/2013/01/nuspec.xsd">
<metadata minClientVersion="2.12">
<id>JunitXml.TestLogger</id>
<version>1.2.3</version>
<title>JunitXml.TestLogger</title>
<authors>Siphonophora,codito,faizan2304,smadala,lahma</authors>
<owners>Siphonophora,codito,faizan2304,smadala</owners>
<requireLicenseAcceptance>false</requireLicenseAcceptance>
<license type="expression">MIT</license>
<licenseUrl>https://licenses.nuget.org/MIT</licenseUrl>
<icon>packageIcon.png</icon>
<projectUrl>https://github.com/spekt/junit.testlogger</projectUrl>
<description>Xml logger for JUnit v3 compliant xml report when test is running with "dotnet test" or "dotnet vstest".</description>
</metadata>
</package>
Appveyor
Builds using Microsoft (R) Build Engine version 16.2.32702+c4012a063 for .NET Core
<?xml version="1.0" encoding="utf-8"?>
<package xmlns="http://schemas.microsoft.com/packaging/2013/01/nuspec.xsd">
<metadata minClientVersion="2.12">
<id>JunitXml.TestLogger</id>
<version>2.1.54</version>
<title>JunitXml.TestLogger</title>
<authors>Siphonophora,codito,faizan2304,smadala,lahma</authors>
<owners>Siphonophora,codito,faizan2304,smadala</owners>
<requireLicenseAcceptance>false</requireLicenseAcceptance>
<license type="expression">MIT</license>
<licenseUrl>https://licenses.nuget.org/MIT</licenseUrl>
<projectUrl>https://github.com/spekt/junit.testlogger</projectUrl>
<description>Xml logger for JUnit v3 compliant xml report when test is running with "dotnet test" or "dotnet vstest".</description>
</metadata>
</package>
This could be because we're running on Visual Studio 2017 image in appveyor which has an older dotnet sdk. Can we try with Visual Studio 2019
?
Ok, so that generated the same errors I see when I run locally. Will try to figure these out...
C:\Program Files\dotnet\sdk\3.1.401\Sdks\NuGet.Build.Tasks.Pack\build\NuGet.Build.Tasks.Pack.targets(198,5): error NU5127: This package does not contain a lib/ or ref/ folder, and will therefore be treated as compatible for all frameworks. Since framework specific files were found under the build/ directory for netstandard1.0, net45, consider creating the following empty files to correctly narrow the compatibility of the package: [C:\projects\junit-testlogger\src\package\package.csproj] C:\Program Files\dotnet\sdk\3.1.401\Sdks\NuGet.Build.Tasks.Pack\build\NuGet.Build.Tasks.Pack.targets(198,5): error NU5127: -lib/netstandard1.0/. [C:\projects\junit-testlogger\src\package\package.csproj] C:\Program Files\dotnet\sdk\3.1.401\Sdks\NuGet.Build.Tasks.Pack\build\NuGet.Build.Tasks.Pack.targets(198,5): error NU5127: -lib/net45/. [C:\projects\junit-testlogger\src\package\package.csproj] C:\Program Files\dotnet\sdk\3.1.401\Sdks\NuGet.Build.Tasks.Pack\build\NuGet.Build.Tasks.Pack.targets(198,5): error NU5127: [C:\projects\junit-testlogger\src\package\package.csproj]
@Siphonophora I just remembered we did a similar VS 2019 exercise for NUnit logger, this PR may help: https://github.com/spekt/nunit.testlogger/pull/62
b05a8696e477423e43d453ca1deed8c955289230 Seems to produce the right package. When pushed to a local feed, visual studio sees the icon, but not on myget. So maybe its the compatability of the myget servers? https://github.com/NuGet/Home/issues/8189 suggests thats possible
@codito The previous pull from nunit was very helpful. I think this is all set. As I noted above, I don't see the icon on the feed from myget, but I think it may be lack of support on their end. The package looks to be building correctly now.
If this looks ok, I would squash these commits before merging.
Should resolve #24