This project has moved. For the latest updates, please go here.
2

Closed

On Compilation despite error package created

description

I got the package via nuget package manager for VS 2015 Update 1. I compiled a project of mine and got the following error messages in the output window: (I translated it since I am usingthe German Version) and I am posting the complete output.
1>  XPRDStandardSIUnits -> C:\SWE\XPRDLibs\Debug\XPRD.SIUnits.StandardUnits.dll
1>  Creating NuGet package in Post-Build event...
1>  ProjectFilePath parameter value passed to script is 'C:\SWE\XPRDSIUnit\XPRDStandardSIUnits\XPRDStandardSIUnits.csproj'.
1>  OutputDirectory parameter value passed to script is 'C:\SWE\XPRDLibs\Debug\'.
1>  BuildConfiguration parameter value passed to script is 'Debug'.
1>  BuildPlatform parameter value passed to script is 'AnyCPU'.
1>  Using default Version Number value.
1>  Using default Release Notes value.
1>  Using default Configuration value.
1>  Using default Platform value.
1>  Using default Pack Properties value.
1>  Using default Pack Options value.
1>  Pre-processing the project file to make sure the assembly exists where NuGet.exe will expect it to be, started at 16:47:47.4927590.
1>  The proper assembly already exists where NuGet.exe will expect it to be, so no pre-processing actions were required.
1>  Pre-processing the project file finished running at 16:47:47.5396389. Completed in 0,0468799 seconds.
1>  VERBOSE: New-NuGetPackage script started running at 16:47:47.6091630.
1>  VERBOSE: Using PowerShell Version: 5.0.10586.63.
1>  VERBOSE: About to run Help command '& 
1>  "C:\SWE\XPRDSIUnit\XPRDStandardSIUnits\_CreateNewNuGetPackage\DoNotModify\NuGet.exe"'.
1>  VERBOSE: Using NuGet Version: 2.8.50506.491.
1>  VERBOSE: About to run Pack command '& 
1>  "C:\SWE\XPRDSIUnit\XPRDStandardSIUnits\_CreateNewNuGetPackage\DoNotModify\NuGet.exe" pack "C:\SWE\XPRDSIUnit\XPRDStandardSIUnits\XPRDStandardSIUnits.csproj" -OutputDirectory "C:\SWE\XPRDLibs\Debug" -Properties Configuration="Debug"`;Platform="AnyCPU" -NonInteractive '.
1>  VERBOSE: Try to generate package from "XPRDStandardSIUnits.csproj" 
1>  
1>  package generation from files at "C:\SWE\XPRDLibs\Debug".
1>  
1>  "packages.config" found. The listed packages are use as dependencies.
1>  
1>  The package "C:\SWE\XPRDLibs\Debug\XPRD.SIUnits.StandardUnits.1.2012.1105.7.nupkg" was created successfuly.
1>  VERBOSE: Performing any required New-NuGetPackage script cleanup...
1>  An error occurred while running New-NuGetPackage script:
1>  Could not determine where NuGet Package was created to. This typically means that an error occurred while NuGet.exe was packing it. Look for errors from NuGet.exe above (in the console window), or in the following NuGet.exe output. You can also try running this command with the -Verbose switch for more information:
1>  Trying to create package from "XPRDStandardSIUnits.csproj"
1>  creation of package using file at "C:\SWE\XPRDLibs\Debug".
1>  "packages.config" found. The listed packages are use as dependencies.
1>  Package "C:\SWE\XPRDLibs\Debug\XPRD.SIUnits.StandardUnits.1.2012.1105.7.nupkg" successfuly created.
1>  
1>  Could not determine where NuGet Package was created to. This typically means 
1>  that an error occurred while NuGet.exe was packing it. Look for errors from 
1>  NuGet.exe above (in the console window), or in the following NuGet.exe output. 
1>  You can also try running this command with the -Verbose switch for more 
1>  information:
1>  Trying to create package from "XPRDStandardSIUnits.csproj"
1>  creation of package using file at "C:\SWE\XPRDLibs\Debug".
1>  "packages.config" found. The listed packages are use as dependencies.
1>  Package "C:\SWE\XPRDLibs\Debug\XPRD.SIUnits.StandardUnits.1.2012.1105.7.nupkg" successfuly created.
1> C:\SWE\XPRDSIUnit\XPRDStandardSIUnits\_CreateNewNuGetPackage\DoNotModify\New  -NuGetPackage.ps1:1225 Zeichen:7
1>  +             throw "Could not determine where NuGet Package was create ...
1>  +             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1>      + CategoryInfo          : OperationStopped: (Could not deter...reich erste llt.:String) [], RuntimeException
1>      + FullyQualifiedErrorId : Could not determine where NuGet Package was crea 
1>     ted to. This typically means that an error occurred while NuGet.exe was pa  
1>    cking it. Look for errors from NuGet.exe above (in the console window), or   
1>    in the following NuGet.exe output. You can also try running this command     
1>  with the -Verbose switch for more information:
1>      Trying to create package from "XPRDStandardSIUnits.csproj"
1>  creation of package using file at "C:\SWE\XPRDLibs\Debug".
1>  "packages.config" found. The listed packages are use as dependencies.
1>  Package "C:\SWE\XPRDLibs\Debug\XPRD.SIUnits.StandardUnits.1.2012.1105.7.nupkg" successfuly created.
1>   
1>C:\Program Files (x86)\MSBuild\14.0\bin\Microsoft.Common.CurrentVersion.targets(4713,5): error MSB3073: Command "REM Create a NuGet package for this project and place the .nupkg file in the project's output directory.
1>C:\Program Files (x86)\MSBuild\14.0\bin\Microsoft.Common.CurrentVersion.targets(4713,5): error MSB3073: REM If you see this in Visual Studio's Error List window, check the Output window's Build tab for the actual error.
1>C:\Program Files (x86)\MSBuild\14.0\bin\Microsoft.Common.CurrentVersion.targets(4713,5): error MSB3073: ECHO Creating NuGet package in Post-Build event...
1>C:\Program Files (x86)\MSBuild\14.0\bin\Microsoft.Common.CurrentVersion.targets(4713,5): error MSB3073: PowerShell -NoProfile -ExecutionPolicy Bypass -Command "& 'C:\SWE\XPRDSIUnit\XPRDStandardSIUnits\_CreateNewNuGetPackage\DoNotModify\CreateNuGetPackage.ps1' -ProjectFilePath 'C:\SWE\XPRDSIUnit\XPRDStandardSIUnits\XPRDStandardSIUnits.csproj' -OutputDirectory 'C:\SWE\XPRDLibs\Debug\' -BuildConfiguration 'Debug' -BuildPlatform 'AnyCPU'"" wurde mit dem Code 1 beendet.
Any recommendation how to cure that?
My knowledge about PowerShell is, well, limited at the best :-)

I would really like to use that package and it feels like an enormous help for me!

So, thank you kn advance for your kind help!

file attachments

Closed Apr 13 at 5:48 AM by deadlydog
Closing as I believe this is fixed in the latest version.

comments

phmerk wrote Jan 27, 2016 at 3:08 PM

SORRY - just found the previous issue having the same problem- due to using German.

Reading is sometimes beneficial! Sorry again for waisting your time!

martinsuchan wrote May 19, 2016 at 11:52 AM

Same problem here - package is successfully created but the script reports an error, see the screenshot.
Note the text "Balicek xxx byl uspesne vytvoren" is "Package xxx was successfully created" in Czech.

deadlydog wrote May 30, 2016 at 3:51 PM

Yeah, the issue is that I parse the nuget.exe output to see if it completed successfully or not, but the script only looks for English text. We've had the NuGet team add a switch to force the nuget.exe always output english, but it's only available in the newest version of NuGet and I haven't yet had time to incorporate it into this package yet, but am hoping to do so in the next few weeks.

jwezel wrote Jul 25, 2016 at 8:49 AM

Maybe this article already solves your problem: https://newnugetpackage.codeplex.com/workitem/35

It targets system is German language. You just need to modify _CreateNewNuGetPackage\DoNotModify\New-NuGetPackage.ps1 at a few lines.

FYI / for other languages: improvement is on the way, but requires NuGet.exe to force output to Always-English, see issue https://github.com/NuGet/NuGet.Client/pull/451

deadlydog wrote Jan 23 at 2:33 AM

I believe this problem should now be solved using the CreateNewNuGetPackageFromProjectAfterEachBuild NuGet package v1.8.10 or greater. Can you please give it a try and let me know if it now works as expected. Thanks.