title: How to create nuget package for native C++
body: <p>I want to publish package about sdl_mixer, it's a native package. I did as <a href="https://docs.nuget.org/Create/using-a-gui-to-build-packages" rel="noreferrer">tutorial</a> said. I put <code>.dll</code> <code>.h</code>and <code>.lib</code> files into <strong><em>package content</em></strong>, but the final package didn't work. So what is right way to create c++ nuget package?</p>
  
  <p>Another question: I found in nuget, most native c++ package are published in two packages, for example: </p>
  
  <blockquote>
    <p>sdl2_ttf.v140</p>
    
    <p>sdl2_ttf.v140.redist</p>
  </blockquote>
  
  <p>What is difference between those two files? And how can I publish my packages like that?</p>
  
  <hr>
  
  <p><strong>Update:</strong></p>
  
  <p>I followed the <a href="https://docs.nuget.org/Create/using-a-gui-to-build-packages" rel="noreferrer">tutorial</a> on how to publish native packages. I have written the following <code>autopkg file</code></p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code> </code></pre>
  </div>
  </div>
  </p>
  
  <pre><code>nuget{
      nuspec {
          id = MySdl_mixer;
          version :2.0.0.0;
          title: sdl mixer;
          authors: { Sam Lantinga, Stephane Peter, Ryan Gordon};
          owners: {spartawhy117};
          licenseUrl: "http://libsdl.org/license.php";
          projectUrl: "http://libsdl.org/index.php";
          iconUrl:"";
          requireLicenseAcceptance:false;
          summary:Nothing;
          description: @"SDL_mixer is a sample multi-channel audio mixer library.... 
      ";
         releaseNotes: "Release of C++ ";
         copyright:Copyright 2015;
         tags: {v140 ,sdl_mixer , native, CoApp };
  };
  
      files {
          #defines {
              Include = include\;
              Bin = bin64\;
              Lib = lib64\;
          }
  
          include:{"${Include}*"};
  
          [x64,v140,debug,desktop]{
              lib: ${Lib}SDL2_mixer.lib;
              bin: ${Bin}SDL2_mixer.dll；
          }
          [x64,v140,release,desktop]{
              lib: ${Lib}SDL2_mixer.lib;
              bin: ${Bin}SDL2_mixer.dll；
          }
       };
      targets {
              Defines += HAS_SDLMIXER;
       };
  }
  </code></pre>
  
  <p>Running the command <code>Write-NuGetPackage .\sdl_mixer.autopkg</code> returns an error unexpected input of the end. What is the problem here?</p>