This project has moved and is read-only. For the latest updates, please go here.
1

Closed

Build process failed: Could not determine where NuGet Package was create ...

description

In VS.Net 2015, I recieve Errors on build "REM Create a NuGet package for this projet and place the .nupkg file in the project's Output Directory. ..."

This is the detailled output when I run the build command manually:
D:\GitHub-OpenSource\CompuMaster.Data>PowerShell -NoProfile -ExecutionPolicy Bypass -Command "& 'D:\GitHub-OpenSource\CompuMaster.Data\CompuMaster.Data\_CreateNewNuGetPackage\DoNotModify\CreateNuGetPackage.ps1' -ProjectFilePath 'D:\GitHub-OpenSource\CompuMaster.Data\CompuMaster.Data\CompuMaster.Data.VS2012.vbproj' -OutputDirectory 'D:\GitHub-OpenSource\CompuMaster.Data\CompuMaster.Data\bin\release\' -BuildConfiguration 'Release' -BuildPlatform 'AnyCPU' -verbose"
ProjectFilePath parameter value passed to script is 'D:\GitHub-OpenSource\CompuMaster.Data\CompuMaster.Data\CompuMaster
.Data.VS2012.vbproj'.
OutputDirectory parameter value passed to script is 'D:\GitHub-OpenSource\CompuMaster.Data\CompuMaster.Data\bin\release
\'.
BuildConfiguration parameter value passed to script is 'Release'.
BuildPlatform parameter value passed to script is 'AnyCPU'.
Using default Version Number value.
Using default Release Notes value.
Using user-specified Configuration value 'Release'.
Using user-specified Platform value 'AnyCPU'.
Using default Pack Properties value.
Using default Pack Options value.
Pre-processing the project file to make sure the assembly exists where NuGet.exe will expect it to be, started at 20:49
:37.9021025.
The Output Directory is the same as defined in the project file, so no pre-processing actions were required.
Pre-processing the project file finished running at 20:49:37.9921023. Completed in 0,0899998 seconds.
AUSFÜHRLICH: New-NuGetPackage script started running at 20:49:38.1301033.
AUSFÜHRLICH: Using PowerShell Version: 5.0.10240.16384.
AUSFÜHRLICH: About to run Help command '&
"D:\GitHub-OpenSource\CompuMaster.Data\CompuMaster.Data\_CreateNewNuGetPackage\DoNotModify\NuGet.exe"'.
AUSFÜHRLICH: Using NuGet Version: 2.8.50506.491.
AUSFÜHRLICH: About to run Pack command '&
"D:\GitHub-OpenSource\CompuMaster.Data\CompuMaster.Data\_CreateNewNuGetPackage\DoNotModify\NuGet.exe" pack
"D:\GitHub-OpenSource\CompuMaster.Data\CompuMaster.Data\CompuMaster.Data.VS2012.vbproj" -OutputDirectory
"D:\GitHub-OpenSource\CompuMaster.Data\CompuMaster.Data\bin\release" -Properties
Configuration="Release"`;Platform="AnyCPU" -NonInteractive '.
AUSFÜHRLICH: Es wird versucht, das Paket aus "CompuMaster.Data.VS2012.vbproj" zu erstellen.
Paketerstellung der Dateien aus "D:\GitHub-OpenSource\CompuMaster.Data\CompuMaster.Data\bin\release".
"CompuMaster.Data.nuspec" wird für Metadaten verwendet.
"packages.config" wurde gefunden. Die aufgelisteten Pakete werden als Abhängigkeiten verwendet.
Das Paket "D:\GitHub-OpenSource\CompuMaster.Data\CompuMaster.Data\bin\release\CompuMaster.Data.2.8.2015.1020.nupkg"
wurde erfolgreich erstellt.
AUSFÜHRLICH: Performing any required New-NuGetPackage script cleanup...
An error occurred while running New-NuGetPackage script:
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:
Es wird versucht, das Paket aus "CompuMaster.Data.VS2012.vbproj" zu erstellen.
Paketerstellung der Dateien aus "D:\GitHub-OpenSource\CompuMaster.Data\CompuMaster.Data\bin\release".
"CompuMaster.Data.nuspec" wird für Metadaten verwendet.
"packages.config" wurde gefunden. Die aufgelisteten Pakete werden als Abhängigkeiten verwendet.
Das Paket "D:\GitHub-OpenSource\CompuMaster.Data\CompuMaster.Data\bin\release\CompuMaster.Data.2.8.2015.1020.nupkg" wurde erfolgreich erstellt.

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:
Es wird versucht, das Paket aus "CompuMaster.Data.VS2012.vbproj" zu erstellen.
Paketerstellung der Dateien aus "D:\GitHub-OpenSource\CompuMaster.Data\CompuMaster.Data\bin\release".
"CompuMaster.Data.nuspec" wird für Metadaten verwendet.
"packages.config" wurde gefunden. Die aufgelisteten Pakete werden als Abhängigkeiten verwendet.
Das Paket "D:\GitHub-OpenSource\CompuMaster.Data\CompuMaster.Data\bin\release\CompuMaster.Data.2.8.2015.1020.nupkg"
wurde erfolgreich erstellt.
In D:\GitHub-OpenSource\CompuMaster.Data\CompuMaster.Data\_CreateNewNuGetPackage\DoNotModify\New-NuGetPackage.ps1:1225
Zeichen:7
+             throw "Could not determine where NuGet Package was create ...
+             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : OperationStopped: (Could not deter...reich erstellt.:String) [], RuntimeException
    + FullyQualifiedErrorId : Could not determine where NuGet Package was created to. This typically means that an err
   or occurred while NuGet.exe was packing it. Look for errors from NuGet.exe above (in the console window), or in th
  e following NuGet.exe output. You can also try running this command with the -Verbose switch for more information:

Es wird versucht, das Paket aus "CompuMaster.Data.VS2012.vbproj" zu erstellen.
Paketerstellung der Dateien aus "D:\GitHub-OpenSource\CompuMaster.Data\CompuMaster.Data\bin\release".
"CompuMaster.Data.nuspec" wird für Metadaten verwendet.
"packages.config" wurde gefunden. Die aufgelisteten Pakete werden als Abhängigkeiten verwendet.
    Das Paket "D:\GitHub-OpenSource\CompuMaster.Data\CompuMaster.Data\bin\release\CompuMaster.Data.2.8.2015.1020.nupkg
   " wurde erfolgreich erstellt.
I wonder why it can create a new nupkg file but doesn't find it on next steps...?

file attachments

Closed Apr 13 at 6:53 AM by deadlydog
The new New-NuGetPackage.ps1 v1.5.8 (and CreateNewNuGetPackageFromProjectAfterEachBuild NuGet package v1.8.10) now includes the required -ForceEnglishOutput parameter to NuGet.exe, so this problem should be resolved. NOTE: The -ForceEnglishOutput parameter is only supported by NuGet.exe v3.5.0+, so be sure you are using at least that version of the NuGet.exe.

comments

jwezel wrote Oct 20, 2015 at 8:05 PM

above Output is from a German Windows system/visual STudio

deadlydog wrote Oct 29, 2015 at 7:49 AM

Hi @jwezel. The problem is that in order to determine if the NuGet package was successfully created, we inspect the output of the NuGet.exe console application, but we currently only expect the output to be in English. Since you're OS is set to German, NuGet.exe outputs German, but the script is still expecting English, so the check to compare the NuGet.exe output against the expected value fails.

If you want to adjust the script to expect German output, you may do so by editing the following lines (currently lines 295 - 303):
# TF.exe output strings.
$TF_EXE_NO_WORKING_FOLDER_MAPPING_ERROR_MESSAGE = 'There is no working folder mapping for'
$TF_EXE_NO_PENDING_CHANGES_MESSAGE = 'There are no pending changes.'
$TF_EXE_KEYWORD_IN_PENDING_CHANGES_MESSAGE = 'change\(s\)'  # Escape regular expression characters.

# NuGet.exe output strings.
$NUGET_EXE_SUCCESSFULLY_CREATED_PACKAGE_MESSAGE_REGEX = [regex] "(?i)(Successfully created package '(?<FilePath>.*?)'.)"
$NUGET_EXE_SUCCESSFULLY_PUSHED_PACKAGE_MESSAGE = 'Your package was pushed.'
$NUGET_EXE_SUCCESSFULLY_SAVED_API_KEY_MESSAGE = "The API Key '{0}' was saved for '{1}'."
$NUGET_EXE_SUCCESSFULLY_UPDATED_TO_NEW_VERSION = 'Update successful.'
I hope that helps until I can get a new version that supports multiple languages released.

jwezel wrote Oct 29, 2015 at 11:19 AM

Great! I'll check for these code lines... :-)
Thank you very much!

jwezel wrote Oct 29, 2015 at 12:10 PM

Indeed, changing in New-NuGetPackage.ps1 to
$NUGET_EXE_SUCCESSFULLY_CREATED_PACKAGE_MESSAGE_REGEX = [regex] "(?i)(Das Paket ""(?<FilePath>.*?)"" wurde erfolgreich erstellt.)"
is one of the required changes for German to build the solution successfully.

I step forward and let you know the required code lines if I get them.

jwezel wrote Nov 12, 2015 at 2:21 PM

this is the required minimal set of changed code lines to support German Environment:

NuGet.exe output strings.

$NUGET_EXE_SUCCESSFULLY_CREATED_PACKAGE_MESSAGE_REGEX = [regex] "(?i)(Das Paket ""(?<FilePath>.*?)"" wurde erfolgreich erstellt.)"
$NUGET_EXE_SUCCESSFULLY_PUSHED_PACKAGE_MESSAGE = 'bertragen.' #complete string is '{{product xy}} wird mittels Push an der NuGet-Katalog (https://www.nuget.org) übertragen... Ihr Paket wurde mittels Push übertragen.' but contains German Umlaut character 'ü' not returned as is from NUGET call
$NUGET_EXE_SUCCESSFULLY_SAVED_API_KEY_MESSAGE = "The API Key '{0}' was saved for '{1}'."
$NUGET_EXE_SUCCESSFULLY_UPDATED_TO_NEW_VERSION = 'Update successful.'


Since I don't run with reference to $NUGET_EXE_SUCCESSFULLY_SAVED_API_KEY_MESSAGE or $NUGET_EXE_SUCCESSFULLY_UPDATED_TO_NEW_VERSION, I can't evaluate These text strings for now.

But you may already include the first 2 variables to provide basic support to build and to push NuGet packages.

jwezel wrote Jul 25, 2016 at 9:58 AM

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 Please find attached a new version (I increased to v1.6.0 in the file, based on your v1.5.6) of New-NuGetPackage.ps1 with required changes for the new NuGet.exe option -ForceEnglishOutput. You need a current NuGet v3.5.0.1520 (beta2) or higher.

Please note: But there is still a bug (either in newest NuGet or in New-NuGetPackage.ps1):
.\NuGet.exe push my.nupkg
fails with this latest NuGet version with error message "Source parameter was not specified".
Maybe you want to review this issue, too :-)

jwezel wrote Jul 25, 2016 at 10:00 AM

Hmm, the attached .ps1 file doesn't appear - maybe the extension is blocked; I'll retry to upload as .txt

jwezel wrote Sep 28, 2016 at 7:51 PM

This is v1.6.0.1 of the script which now supports push with the latest NuGet.exe, tested with NuGet v3.5.0.1520

Maybe self-update doesn't support the -forceenglishoutput argument - to be tested with a next NuGet RC or RTM

deadlydog wrote Jan 23 at 3:31 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.

deadlydog wrote Jan 23 at 3:40 AM

The new New-NuGetPackage.ps1 v1.5.8 now includes the required -ForceEnglishOutput parameter to NuGet.exe, so this problem should be resolved. NOTE: The -ForceEnglishOutput parameter is only supported by NuGet.exe v3.5.0+, so be sure you are using at least that version of the NuGet.exe.

If you could try the new version of the script and NuGet.exe and let me know that it does indeed work as expected, I would appreciate that. Thanks.