Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix group targetframeworks in nuspec #743

Closed
wants to merge 1 commit into from
Closed

Fix group targetframeworks in nuspec #743

wants to merge 1 commit into from

Conversation

bmeredith
Copy link

@bmeredith bmeredith commented Sep 17, 2018

Fixes #742

Checklist

  • I have made a material change to the repo (functionality, testing, spelling, grammar)
  • I have read the [Contribution Guide] and my PR follows them.
  • I updated my branch with the master branch.
  • I have added tests that prove my fix is effective or that my feature works
  • I have added necessary documentation about the functionality in the appropriate .md file
  • I have added in line documentation to the code I modified

Short description of what this PR does:

This correctly aligns the nuget dependencies between the nuspec and csproj files.

This correctly aligns the nuget dependencies between the nuspec and csproj files in order to fix #742.
@thinkingserious thinkingserious added the status: code review request requesting a community code review or review from Twilio label Sep 17, 2018
@SendGridDX
Copy link

SendGridDX commented Sep 17, 2018

CLA assistant check
All committers have signed the CLA.

@xt0rted
Copy link
Contributor

xt0rted commented Sep 25, 2018

Wouldn't it be easier to run dotnet pack against the .csproj? That should remove the need for a .nuspec file and then the frameworks & dependencies only need to be managed in one spot instead of two.

@thinkingserious thinkingserious added type: bug bug in the library difficulty: easy fix is easy in difficulty labels Sep 28, 2018
@thinkingserious
Copy link
Contributor

thinkingserious commented Oct 1, 2018

Hi @xt0rted,

That sounds good to me. But I'm thinking some still may rely on the .nuspec?

I'm not too sure what dotnet pack does, so I'll give it a go as soon as this comes up on my backlog.

Thanks as always for your support and contributions!

With Best Regards,

Elmer

@jnyrup
Copy link
Contributor

jnyrup commented Mar 6, 2019

@thinkingserious Using dotnet pack also puts a nuspec file in the nupkg file.

Running dotnet pack SendGrid.csproj gives

<?xml version="1.0" encoding="utf-8"?>
<package xmlns="http://schemas.microsoft.com/packaging/2013/05/nuspec.xsd">
  <metadata>
    <id>SendGrid</id>
    <version>9.10.0</version>
    <authors>SendGrid</authors>
    <owners>SendGrid</owners>
    <requireLicenseAcceptance>false</requireLicenseAcceptance>
    <description>Package Description</description>
    <dependencies>
      <group targetFramework=".NETFramework4.5.2">
        <dependency id="Newtonsoft.Json" version="9.0.1" exclude="Build,Analyzers" />
      </group>
      <group targetFramework=".NETStandard1.3">
        <dependency id="NETStandard.Library" version="1.6.1" exclude="Build,Analyzers" />
        <dependency id="Newtonsoft.Json" version="12.0.1" exclude="Build,Analyzers" />
      </group>
      <group targetFramework=".NETStandard2.0">
        <dependency id="Newtonsoft.Json" version="9.0.1" exclude="Build,Analyzers" />
      </group>
    </dependencies>
    <frameworkAssemblies>
      <frameworkAssembly assemblyName="Microsoft.CSharp" targetFramework=".NETFramework4.5.2" />
      <frameworkAssembly assemblyName="System" targetFramework=".NETFramework4.5.2" />
      <frameworkAssembly assemblyName="System.Net.Http" targetFramework=".NETFramework4.5.2" />
      <frameworkAssembly assemblyName="System.Runtime.Serialization" targetFramework=".NETFramework4.5.2" />
    </frameworkAssemblies>
  </metadata>
</package>

But that really should be handled in another issue/PR

@bmeredith
Copy link
Author

Closing as #892 fixed this issue.

@bmeredith bmeredith closed this Jul 17, 2019
@bmeredith bmeredith deleted the patch-2 branch July 17, 2019 20:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
difficulty: easy fix is easy in difficulty status: code review request requesting a community code review or review from Twilio type: bug bug in the library
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Mismatching dependencies between csproj and nuspec
5 participants