I added a nuspec file, but that doesn’t seem to fix anything on the Console application causing these issues with nuget. Do I need to do something to get this to work?
Thanks for reaching out. If you try the same command outside of psake (just running msbuild manually), does it work? if that doesn’t work, can you try running the same MSBuild command without the Octopack parameters?
It works out of the box without the Octopack references on calling the msbuild command from psake. I do not have a custom MSBuild target setup for the console app yet.
I had to setup a nuspec file in the console application with the Ocotpack reference there for it to get a clean msbuild to work. I did not have to do this out of the box with psake on a web project or a web api project and they at least built without error(even though the artifacts may not be completely setup).
The video on doing a database deployment which is presented with a console application does not go over any of this, and I did not see them creating the build process to see how they are building up their console application artifacts.
Could you send us the content of the file E:\TFS\ProjectName\CompanyName.ProjectName.Migrations\obj\octopacking\CompanyName.ProjectName.Migrations.nuspec. I’d like to see if it has any file reference on it.
Here is the nuspec file for the console application. If I do not declare the dependencies like so, it will not build with msbuild out of the box. There are currently no build artifacts being packaged in the nuget file though when I call msbuild on the octopacked application.
Do I need to specify msbuild targets for a brand new console application? I would have thought the artifacts/executable would be built out of the box. The other thing is, despite which dependency I declare, I only have to declare a single one for it to “build” via psake/msbuild command, which I thought was odd considering the other projects(Web and WebAPI) would generate a nuspec file out of the box .
<?xml version="1.0"?>
CompanyName.ProjectName.Migrations
1.0.0.0
Joseph
Joseph
http://example.com
http://example.com
false
The CompanyName.ProjectName.Migrations deployment package, built on 8/4/2016
So the initial error was: Cannot create a package that has no dependencies nor content. . This error shows up when Nuget doesn’t find any <file> references in the nuspec file when attempting to create a package. For this reason I asked you to show me that nuspec file, to confirm it didn’t had any <file> references in it.
We ran through this ticket along with 2 of my teammates, and all we could think of was that perhaps the output of your MSBuild build is being dropped somplace else where the Nuget pack process executed by Octopack can’t see/reach it.
Do you think you could add a Pre and Post build event to your project with the script cd just so we can see where is the MSBuild process being executed from? See attached screenshot as reference
That might give us a hint of where is MSBuild executing from vs where are your binaries being dropped vs where is Nuget.exe expecting for the files to be.
This issue has been closed due to inactivity. If you encounter the same or a similar issue and require help, please open a new discussion (if we asked for logs or extra details in this thread, consider including them in the new thread). If you are the creator of this thread and believe it should not be closed let us know via our support email.