Error MSB3073

(Rakhtar) #1

Hi Everyone,

I am getting the below error when building a package in team city. Below are the logs. Please help and advise.

Collecting changes in 22 VCS roots (12s)

[10:52:26]The build is removed from the queue to be prepared for the start

[10:52:26]Starting the build on the agent FayMkeDevCI01

[10:52:28]Clearing temporary directory: E:\JetBrains\ApplicationData\TeamCity\buildAgent\temp\buildTmp

[10:52:28]Publishing internal artifacts (3s)

[10:52:28]Using vcs information from agent file: fad7e772eebfde9a.xml

[10:52:28]Checkout directory: E:\JetBrains\ApplicationData\TeamCity\buildAgent\work\fad7e772eebfde9a

[10:52:28]Updating sources: auto checkout (on agent) (11s)

[10:52:39]Resolving artifact dependencies

[10:52:40]File content replacer

[10:52:40]Step 1/3: NuGet Installer (3s)

[10:52:44]Step 2/3: Visual Studio (sln) (31s)

[10:52:44][Step 2/3] Enabling OctoPack

[10:52:45][Step 2/3] Starting: E:\JetBrains\TeamCity\buildAgent\plugins\dotnetPlugin\bin\JetBrains.BuildServer.MsBuildBootstrap.exe /workdir:E:\JetBrains\ApplicationData\TeamCity\buildAgent\work\fad7e772eebfde9a “/msbuildPath:C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\MSBuild\15.0\bin\MSBuild.exe”

[10:52:45][Step 2/3] in directory: E:\JetBrains\ApplicationData\TeamCity\buildAgent\work\fad7e772eebfde9a

[10:52:47][Step 2/3] src\AMQueue02.sln.teamcity: Build target: TeamCity_Generated_Build (28s)

[10:52:47][src\AMQueue02.sln.teamcity] TeamCity_Generated_Build (28s)

[10:52:47][TeamCity_Generated_Build] MSBuild (28s)

[10:52:47][MSBuild] src\AMQueue02.sln: Build target: Rebuild (28s)

[10:52:47][src\AMQueue02.sln] ValidateSolutionConfiguration

[10:52:47][src\AMQueue02.sln] Rebuild (28s)

[10:52:47][Rebuild] MSBuild (28s)

[10:52:47][MSBuild] src\AMQueue02\AMQueue02.csproj: Build target: Rebuild (27s)

[10:52:48][src\AMQueue02\AMQueue02.csproj] CoreClean

[10:52:48][src\AMQueue02\AMQueue02.csproj] _GetProjectReferenceTargetFrameworkProperties

[10:52:48][src\AMQueue02\AMQueue02.csproj] CleanReferencedProjects

[10:52:48][src\AMQueue02\AMQueue02.csproj] EntityClean

[10:52:48][src\AMQueue02\AMQueue02.csproj] EntityDeploy

[10:52:48][src\AMQueue02\AMQueue02.csproj] ResolveProjectReferences (1s)

[10:52:50][src\AMQueue02\AMQueue02.csproj] GenerateTargetFrameworkMonikerAttribute

[10:52:50][src\AMQueue02\AMQueue02.csproj] ResolveCodeAnalysisRuleSet

[10:52:50][src\AMQueue02\AMQueue02.csproj] CoreCompile (9s)

[10:53:00][src\AMQueue02\AMQueue02.csproj] _CopyFilesMarkedCopyLocal

[10:53:00][src\AMQueue02\AMQueue02.csproj] GetCopyToOutputDirectoryItems

[10:53:00][src\AMQueue02\AMQueue02.csproj] _CopyAppConfigFile

[10:53:00][src\AMQueue02\AMQueue02.csproj] CopyFilesToOutputDirectory

[10:53:00][src\AMQueue02\AMQueue02.csproj] CopyRoslynCompilerFilesToOutputDirectory

[10:53:00][src\AMQueue02\AMQueue02.csproj] OctoPack (14s)

[10:53:00][OctoPack] Using package version: 4.1.0.651

[10:53:00][OctoPack] CreateOctoPackPackage (9s)

[10:53:10][Step 2/3] Publishing artifacts (2s)

[10:53:10][OctoPack] Publish to repository: https://ci.fay.local/octopusdeploy/nuget/packages

[10:53:10][OctoPack] Exec (5s)

[10:53:10][Exec] “E:\JetBrains\ApplicationData\TeamCity\buildAgent\work\fad7e772eebfde9a\src\packages\OctoPack.3.6.4\build\nuget.exe” push “E:\JetBrains\ApplicationData\TeamCity\buildAgent\work\fad7e772eebfde9a\src\AMQueue02\obj\octopacked\AMQueue02.4.1.0.651.nupkg” API-V3AKMCA6KL6UXNS1OTL9TDAEYA -Source https://ci.fay.local/octopusdeploy/nuget/packages

[10:53:11][Exec] NuGet Version: 3.5.0.38733 (Custom build for OctoPack. See http://g.octopushq.com/VersioningInOctopusDeploy)

[10:53:11][Exec] Pushing AMQueue02.4.1.0.651.nupkg to ‘https://ci.fay.local/octopusdeploy/nuget/packages’…

[10:53:11][Exec] PUT https://ci.fay.local/octopusdeploy/nuget/packages/

[10:53:15][Exec] Please provide credentials for: https://ci.fay.local/octopusdeploy/nuget/packages

[10:53:15][Exec] UserName: Password: Object reference not set to an instance of an object.

[10:53:15][Exec] Unauthorized https://ci.fay.local/octopusdeploy/nuget/packages/ 4025ms

[10:53:15][Exec] Response status code does not indicate success: 401 (Unauthorized).

[10:53:15][Exec] E:\JetBrains\ApplicationData\TeamCity\buildAgent\work\fad7e772eebfde9a\src\packages\OctoPack.3.6.4\build\OctoPack.targets(109, 5): error MSB3073: The command "“E:\JetBrains\ApplicationData\TeamCity\buildAgent\work\fad7e772eebfde9a\src\packages\OctoPack.3.6.4\build\nuget.exe” push “E:\JetBrains\ApplicationData\TeamCity\buildAgent\work\fad7e772eebfde9a\src\AMQueue02\obj\octopacked\AMQueue02.4.1.0.651.nupkg” API-V3AKMCA6KL6UXNS1OTL9TDAEYA -Source https://ci.fay.local/octopusdeploy/nuget/packages " exited with code 1.

[10:53:15][Step 2/3] Process exited with code 1

[10:53:15][Step 2/3] MSBuild output

[10:53:18][Step 2/3] Process exited with code 1

[10:53:15][Step 2/3] Step Visual Studio (sln) failed

[10:53:15]Step 3/3: OctopusDeploy: Create release

[10:53:15]Publishing artifacts

[10:53:15]File content replacer

[10:53:15]Publishing internal artifacts

[10:53:23]Build finished

(Tina) #4

Hi Rakhtar,
Thanks for getting in touch. Sorry to hear your running into this error when building your packages.

The task log error “Response status code does not indicate success: 401 (Unauthorized)”, suggests that Octopus is not accepting the API key. If possible, verify that the Ocotups API key is current or Create a new API key, update and run the TeamCity package Step once more.

I hope this helps, but don’t hesitate to let me know if you have further questions or concerns.

Kind Regards,
Tina