OctoPack 2.0 seems to be parsing the .csproj file

Just upgraded OctoPack to 2.0 and while it works fine without a .nuspec as soon as I use my AppScheduler.nuspec that worked in octopack 1.0.111 I have the following problem…

C:…>c:\Windows\Microsoft.NET\Framework\v4.0.30319\MSBuild.exe AppScheduler.sln /t:Build /p:RunOctoPack=true

Build FAILED.

“C:…\AppScheduler.sln” (Build target) (1) ->
“C:…\AppScheduler.csproj” (default target) (2) ->
(OctoPack target) ->
MSBUILD : OctoPack error OCT-1676060969: The NuSpec file does not contain a XML element. The NuSpec file appears to be
invalid. [C:…\AppScheduler.csproj]
MSBUILD : OctoPack error OCT-1676060969: System.Exception: The NuSpec file does not contain a XML element. The NuSpec f
ile appears to be invalid.\r [C:…\AppScheduler.csproj]
MSBUILD : OctoPack error OCT-1676060969: at OctoPack.Tasks.CreateOctoPackPackage.AddFiles(XContainer nuSpec, IEnumerable`1 sourc
eFiles, String sourceBaseDirectory, String targetDirectory) in c:\w\e54fb60b275043b3\source\OctoPack.Tasks\CreateOctoPackPackage.cs
:line 254\r [C:…\AppScheduler.csproj]
MSBUILD : OctoPack error OCT-1676060969: at OctoPack.Tasks.CreateOctoPackPackage.Execute() in c:\w\e54fb60b275043b3\source\OctoP
ack.Tasks\CreateOctoPackPackage.cs:line 136 [C:…\AppScheduler.csproj]

0 Warning(s)
2 Error(s)

Time Elapsed 00:00:01.20

Hi,

Is it possible to send me the full build log, and a copy of the .nuspec? You can get the log easily by doing:

c:\Windows\Microsoft.NET\Framework\v4.0.30319\MSBuild.exe AppScheduler.sln /t:Build /p:RunOctoPack=true > Log.txt

Paul

Hi,

This bug is now fixed in OctoPack 2.0.13

Paul

I am still getting this error in OctoPack 2.0.14:

[08:45:04][MSBuild] Syntell.PayCity.Database.Migrations\Syntell.PayCity.Database.Migrations.csproj: Build target: Rebuild
[08:45:04][Syntell.PayCity.Database.Migrations\Syntell.PayCity.Database.Migrations.csproj] OctoPack
[08:45:04][OctoPack] CreateOctoPackPackage
[08:45:04][CreateOctoPackPackage] error OCT-1676060969: The NuSpec file does not contain a XML element. The NuSpec file appears to be invalid.
[08:45:04]
[CreateOctoPackPackage] error OCT-1676060969: System.Exception: The NuSpec file does not contain a XML element. The NuSpec file appears to be invalid.
at OctoPack.Tasks.CreateOctoPackPackage.AddFiles(XContainer nuSpec, IEnumerable`1 sourceFiles, String sourceBaseDirectory, String targetDirectory) in c:\w\e54fb60b275043b3\source\OctoPack.Tasks\CreateOctoPackPackage.cs:line 256
at OctoPack.Tasks.CreateOctoPackPackage.Execute() in c:\w\e54fb60b275043b3\source\OctoPack.Tasks\CreateOctoPackPackage.cs:line 138
[08:45:04][Syntell.PayCity.Database.Migrations\Syntell.PayCity.Database.Migrations.csproj] Project Syntell.PayCity.Database.Migrations\Syntell.PayCity.Database.Migrations.csproj failed.

I have the same problem with 2.0.14 as well.

Tried overriding the nuspec file name with p:OctopusNuSpecFileName but that did not help either.

I managed to track down the problem in my case, my nuspec files look like this:

@@@

<?xml version="1.0"?> /* ... */ @@@

But octopack expects xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd" to sit on the package element and not the metadata.

Now the really weird part is that I have 3 projects that uses octopack in this solution, but only one is failing.

I have exactly the same problem. I’m using basically the same .nuspec for two different projects (the title and and id differs), but there is one change between the projects. One of the projects is targeting net35 (this one doesn’t work) and the other one is targeting net40.

These issues should now be fixed in OctoPack 2.0.18.

Paul