@@ -1106,8 +1106,8 @@ internal bool PushNupkgACR(string psd1OrPs1File, string outputNupkgDir, string p
1106
1106
{
1107
1107
errRecord = null ;
1108
1108
// Push the nupkg to the appropriate repository
1109
- var fullNupkgFile = System . IO . Path . Combine ( outputNupkgDir , pkgName + "." + pkgVersion . ToNormalizedString ( ) + ".nupkg" ) ;
1110
-
1109
+ string fullNupkgFile = System . IO . Path . Combine ( outputNupkgDir , pkgName + "." + pkgVersion . ToNormalizedString ( ) + ".nupkg" ) ;
1110
+ string pkgNameLower = pkgName . ToLower ( ) ;
1111
1111
string accessToken = string . Empty ;
1112
1112
string tenantID = string . Empty ;
1113
1113
@@ -1136,7 +1136,8 @@ internal bool PushNupkgACR(string psd1OrPs1File, string outputNupkgDir, string p
1136
1136
1137
1137
/* Uploading .nupkg */
1138
1138
_cmdletPassedIn . WriteVerbose ( "Start uploading blob" ) ;
1139
- var moduleLocation = GetStartUploadBlobLocation ( registry , pkgName , acrAccessToken ) . Result ;
1139
+ // Note: ACR registries will only accept a name that is all lowercase.
1140
+ var moduleLocation = GetStartUploadBlobLocation ( registry , pkgNameLower , acrAccessToken ) . Result ;
1140
1141
1141
1142
_cmdletPassedIn . WriteVerbose ( "Computing digest for .nupkg file" ) ;
1142
1143
bool nupkgDigestCreated = CreateDigest ( fullNupkgFile , out string nupkgDigest , out ErrorRecord nupkgDigestError ) ;
@@ -1159,7 +1160,7 @@ internal bool PushNupkgACR(string psd1OrPs1File, string outputNupkgDir, string p
1159
1160
}
1160
1161
using ( FileStream configStream = new FileStream ( emptyFilePath , FileMode . Create ) ) { }
1161
1162
_cmdletPassedIn . WriteVerbose ( "Start uploading an empty file" ) ;
1162
- var emptyLocation = GetStartUploadBlobLocation ( registry , pkgName , acrAccessToken ) . Result ;
1163
+ var emptyLocation = GetStartUploadBlobLocation ( registry , pkgNameLower , acrAccessToken ) . Result ;
1163
1164
_cmdletPassedIn . WriteVerbose ( "Computing digest for empty file" ) ;
1164
1165
bool emptyDigestCreated = CreateDigest ( emptyFilePath , out string emptyDigest , out ErrorRecord emptyDigestError ) ;
1165
1166
if ( ! emptyDigestCreated )
@@ -1200,7 +1201,7 @@ internal bool PushNupkgACR(string psd1OrPs1File, string outputNupkgDir, string p
1200
1201
File . WriteAllText ( configFilePath , fileContent ) ;
1201
1202
1202
1203
_cmdletPassedIn . WriteVerbose ( "Create the manifest layer" ) ;
1203
- bool manifestCreated = CreateManifest ( registry , pkgName , pkgVersion . OriginalVersion , configFilePath , true , acrAccessToken ) . Result ;
1204
+ bool manifestCreated = CreateManifest ( registry , pkgNameLower , pkgVersion . OriginalVersion , configFilePath , true , acrAccessToken ) . Result ;
1204
1205
1205
1206
if ( manifestCreated )
1206
1207
{
0 commit comments