GithubHelp home page GithubHelp logo

Comments (9)

BryanWilhite avatar BryanWilhite commented on June 2, 2024

the big news πŸ“° (for me):

.NET Standard and .NET Core libraries are expected to be distributed as NuGet packages. This is in fact how all of the .NET Standard libraries are distributed and consumed. This is most easily done with the dotnet pack command. [docs]

ah, there is a dotnet nuget push command [docs]

from songhaycore.

BryanWilhite avatar BryanWilhite commented on June 2, 2024

this is the *.nuspec file:

<?xml version="1.0"?>
<package >
  <metadata>
    <id>SonghayCore.xUnit</id>
    <version>3.0.2</version>
    <title>Songhay Core Testing for xUnit</title>
    <authors>[email protected]</authors>
    <owners>[email protected]</owners>
    <projectUrl>https://github.com/BryanWilhite/SonghayCore</projectUrl>
    <iconUrl>https://songhaystorage.blob.core.windows.net/studio-public/songhay_icon.png</iconUrl>
    <license type="file">LICENSE.md</license>
    <requireLicenseAcceptance>false</requireLicenseAcceptance>
    <summary>Extensions and Orderers for Songhay xUnit projects</summary>
    <description>Extensions and Orderers for Songhay xUnit projects</description>
    <releaseNotes>added support for ordered tests, see https://github.com/BryanWilhite/SonghayCore/issues/23</releaseNotes>
    <copyright>Copyright 2019 Bryan D. Wilhite</copyright>
    <tags>Core Songhay xUnit VisualStudio</tags>
    <dependencies>
      <group targetFramework=".NETStandard2.0">
        <dependency id="xunit" version="2.4.1" />
        <dependency id="SonghayCore" version="3.2.0" />
      </group>
    </dependencies>
  </metadata>
  <files>
    <file src="bin\Release\netstandard2.0\*.dll" target="lib\netstandard2.0" />
    <file src="bin\Release\netstandard2.0\*.deps.json" target="lib\netstandard2.0" />
    <file src="bin\Release\netstandard2.0\*.xml" target="lib\netstandard2.0" />

    <file src="**\*.cs" exclude="obj\**" target="src" />

    <file src="..\LICENSE.md" target="" />
  </files>
</package>

and this is the *.csproj replacement:

<Project Sdk="Microsoft.NET.Sdk">

  <PropertyGroup>
    <AssemblyVersion>3.0.3</AssemblyVersion>
    <RootNamespace>Songhay.Test</RootNamespace>
    <TargetFramework>netstandard2.0</TargetFramework>

    <Title>Songhay Core Testing for xUnit</Title>
    <Description>Extensions and Orderers for Songhay xUnit projects</Description>
    <Authors>Bryan D. Wilhite @BryanWilhite</Authors>
    <Copyright>(c) 2019 Bryan D. Wilhite</Copyright>
    <Company>Songhay System</Company>
    <RepositoryUrl>https://github.com/BryanWilhite/SonghayCore</RepositoryUrl>

    <IncludeSource>false</IncludeSource>
    <IncludeSymbols>false</IncludeSymbols>
    <IsPackable>true</IsPackable>
    <PackageIconUrl>https://songhaystorage.blob.core.windows.net/studio-public/songhay_icon.png</PackageIconUrl>
    <PackageLicenseFile>LICENSE.md</PackageLicenseFile>
    <PackageReleaseNotes>re-factored ProjectFileDataAttribute</PackageReleaseNotes>
    <PackageRequireLicenseAcceptance>false</PackageRequireLicenseAcceptance>
    <PackageTags>Core;Songhay;xUnit;VisualStudio</PackageTags>
    <PackageVersion>$(AssemblyVersion)</PackageVersion>
    <SymbolPackageFormat>snupkg</SymbolPackageFormat>
  </PropertyGroup>

  <ItemGroup>
    <None Include="..\LICENSE.md" Link="LICENSE.md" Pack="true" PackagePath="$(PackageLicenseFile)" />
  </ItemGroup>

  <ItemGroup>
    <PackageReference Include="SonghayCore" Version="3.1.2" />
    <PackageReference Include="xunit" Version="2.4.1" />
  </ItemGroup>

</Project>

⚠️ dotnet pack will not run by default (and no error/warning message shown by default) when IsPackable is not declared true

from songhaycore.

BryanWilhite avatar BryanWilhite commented on June 2, 2024

issues:

  • <IncludeSource>true</IncludeSource> [docs] behaves as if <IncludeSymbols>true</IncludeSymbols>
  • --include-source CLI option behaves as if <IncludeSymbols>true</IncludeSymbols>
  • NuspecProperties [docs] appear to be ignored (and -p:NuspecProperties [docs] is also not working)

NuspecProperties is only needed for my historical understanding that the summary element is quite special (used in search results on NuGet.org?)

image

from songhaycore.

BryanWilhite avatar BryanWilhite commented on June 2, 2024

tried this because of legends about undocumented elements:

<PackageSummary>$(Description)</PackageSummary>

it did not work (<Summary/> did not work either)

there is a hearsay that <summary /> is deprecated: dotnet/project-system#2937 (comment)

image

NuGet/Home#4587 (comment)

from songhaycore.

BryanWilhite avatar BryanWilhite commented on June 2, 2024

image

image

image

image

from songhaycore.

BryanWilhite avatar BryanWilhite commented on June 2, 2024

ok the dotnet pack command is not NuGet.org-friendly by default; one way out of this problem is yet another 🐰 πŸ•³ πŸ‘‡

  • write a test that will edit the *.nuspec file(s) with respective *.csproj file(s)
  • run dotnet pack to use the *.nuspec file [docs]

image

success here 🐰 will allow the greatest control over packing πŸ•³ and eliminate the need πŸ‡ πŸ‡ to maintain a brittle pipeline for nuget.exe [ pack docs] πŸ‡

from songhaycore.

BryanWilhite avatar BryanWilhite commented on June 2, 2024

okay dotnet pack is using this:

Microsoft (R) Build Engine version 15.9.20+g88f5fadfbe for .NET Core

apparently it is not supporting <repository /> [docs]

the version of nuget.exe in my brittle pipeline:

NuGet Version: 4.9.4.5839

from songhaycore.

BryanWilhite avatar BryanWilhite commented on June 2, 2024

after this 🐰 πŸ•³ drama, i can use the lessons here to pack going forward

from songhaycore.

BryanWilhite avatar BryanWilhite commented on June 2, 2024

i notice that xUnit multi-Theory tests with my ProjectFileData attribute fails with a complaint about incorrect arguments possibly after running the test in VSCode debug mode and then switching to VS to debug the same test

from songhaycore.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.