tag:help.appveyor.com,2012-11-13:/discussions/problems/5786-generated-nugetpackagesdont-use-nuspec-filesAppVeyor: Discussion 2018-08-25T02:10:27Ztag:help.appveyor.com,2012-11-13:Comment/416389932016-12-30T22:01:09Z2016-12-30T22:01:09ZGenerated NuGet packages don't use nuspec files<div><p>I was able to make it work in my fork with older nuget, by using
this in <code>install</code> section:<br></p>
<pre>
<code>appveyor DownloadFile https://dist.nuget.org/win-x86-commandline/v3.4.4/NuGet.exe</code>
</pre>
I am not sure why latest nuget ignores your .nuspec files. Does
<code>nuget pack</code> works for you locally?
<p>--ilya.</p></div>Ilya Finkelshteyntag:help.appveyor.com,2012-11-13:Comment/416389932016-12-30T22:47:19Z2016-12-30T22:47:19ZGenerated NuGet packages don't use nuspec files<div><p>Please check <a href="https://github.com/NuGet/Home/issues/2965">this</a> out. I think
that you have to migrate data from <code>.nuspec</code> to
<code>project.json</code>, rather that downgrading nuget.</p></div>Ilya Finkelshteyntag:help.appveyor.com,2012-11-13:Comment/416389932016-12-30T23:44:04Z2016-12-30T23:55:29ZGenerated NuGet packages don't use nuspec files<div><p>Wow, that's a breaking change. I didn't know that 3.5
changed that behavior! I have included everything in
the project.json file.</p>
<p>But... I'm getting the same result :( However, it
works locally.</p>
<p>Again, BIG THANKS! Your support is wonderful.</p></div>superjmntag:help.appveyor.com,2012-11-13:Comment/416389932016-12-31T00:04:20Z2016-12-31T00:04:20ZGenerated NuGet packages don't use nuspec files<div><p>I'm Sorry: I have just tried with the changes
in project.json, but now <em>no NuGet packages are
created</em>.</p>
<p><a href="https://ci.appveyor.com/project/SuperJMN/omnixaml/build/2.0.0.22">https://ci.appveyor.com/project/SuperJMN/omnixaml/build/2.0.0.22</a></p>
<p>As a side note: I modified my appveyor.yml to ensure that the
latest nuget is installed using this:</p>
<pre>
<code>install:
- rd /s /q C:\Tools\nuget
- md C:\Tools\nuget
- ps: (New-Object Net.WebClient).DownloadFile('https://dist.nuget.org/win-x86-commandline/latest/nuget.exe', 'C:\Tools\nuget\nuget.exe')</code>
</pre>
<p>Is it equivalente to this?</p>
<pre>
<code>install:
appveyor DownloadFile https://dist.nuget.org/win-x86-commandline/latest/nuget.exe</code>
</pre>
<p>If so, I would prefer the 1st because it's shorter and
easier to understand.</p></div>superjmntag:help.appveyor.com,2012-11-13:Comment/416389932016-12-31T03:00:31Z2016-12-31T03:00:31ZGenerated NuGet packages don't use nuspec files<div><p>OK, let me try to clarify it:</p>
<ul>
<li>
<p>Packages are not being created because AppVeyor runs <code>nuget
pack</code> where it finds <code>.nuspec</code> file. So by
deleting <code>.nuspec</code> file you disabled automatic discovery
of projects to pack by AppVeyor. Sorry for confusion, we probably
need to adjust to current reality. So you need to return
<code>.nuspec</code> files or do your own script: run <code>nuget
pack</code> or <code>dotnet pack</code> yourself as
<code>after_build</code> script. Also in case of own script, you
need to ensure that all nuget packages are uploaded as artifacts
(with <code>appveyor PushArtifact</code> command or
<code>artifacts</code> settings).</p>
</li>
<li>
<p>I was able to made those <code>description</code> and
<code>author</code> work by putting then in the root level of
<code>project.json</code>, like this</p>
<pre>
<code>{
"version": "2.0.0-*",
"description": "The freakin' awesome Cross-platform XAML framework.",
"authors": ["José Manuel Nieto (@SuperJMN)"],<br>...
}</code>
</pre></li>
<li>
<p>Second command (<code>appveyor DownloadFile</code>) will simple
put latest <code>nuget.exe</code> to current directory and it will
take precedence over what is set in <code>path</code>. So as long
as you don't do <code>cd</code> without coming back to
<code>appveyor_build_folder</code> in your commands in YAML, this
latest <code>nuget.exe</code> will be called.</p>
</li>
</ul>
<p>Thanks!<br>
Ilya.</p></div>Ilya Finkelshteyn