Run a NuGet package restore to generate project.assets.json file

xamarin
#1

Bitrise Build Issue Report template

Description of the issue

error NETSDK1004: Assets file ‘/Users/vagrant/git/Bitrise Sample/Bitrise Sample/obj/project.assets.json’ not found. Run a NuGet package restore to generate this file
The given error arise when building xamarin forms app.

Environment:

Where did the issue happen?

on Bitrise.io

Which build Step causes the issue and which version of the step?

E.g.: Git Clone v3.6.0

Reproducibility

  • _Does a “Rebuild” help? NO

  • Does the issue happen sporadically, or every time? : YES

  • Does upgrading the build Step to the latest version help? : NO

  • When did the issue start? : On First build

Build log

0 Likes

#2

Hi there @sensysindia!

Could you please send us a build log of the app? We’ll check it out :slight_smile:

0 Likes

#3

Remote Access: Connection successfully initiated
Agent version: 1.7.0
Start time: 2019-12-18T10:50:16Z
$ bitrise “run” “–config” “/var/folders/6q/wgy6jtp12w5gzgm9lzcglpqw0000gn/T/bitrise-agent960360181/bitrise.yml” “–inventory” “/var/folders/6q/wgy6jtp12w5gzgm9lzcglpqw0000gn/T/bitrise-agent960360181/bitrise.secrets.yml” “–json-params-base64” “eyJ3b3JrZmxvdyI6InByaW1hcnkifQ==”

██████╗ ██╗████████╗██████╗ ██╗███████╗███████╗
██╔══██╗██║╚══██╔══╝██╔══██╗██║██╔════╝██╔════╝
██████╔╝██║ ██║ ██████╔╝██║███████╗█████╗
██╔══██╗██║ ██║ ██╔══██╗██║╚════██║██╔══╝
██████╔╝██║ ██║ ██║ ██║██║███████║███████╗
╚═════╝ ╚═╝ ╚═╝ ╚═╝ ╚═╝╚═╝╚══════╝╚══════╝

e[32;1m version: 1.37.0e[0m

e[36mINFOe[0m[10:50:17] e[33;1mbitrise runs in Secret Filtering modee[0m
e[36mINFOe[0m[10:50:17] e[33;1mbitrise runs in CI modee[0m
e[36mINFOe[0m[10:50:17] Running workflow: e[32;1mprimarye[0m

e[34;1mSwitching to workflow:e[0m primary

±-----------------------------------------------------------------------------+
| (0) activate-ssh-key@4.0.3 |
±-----------------------------------------------------------------------------+
| id: activate-ssh-key |
| version: 4.0.3 |
| collection: https://github.com/bitrise-io/bitrise-steplib.git |
| toolkit: go |
| time: 2019-12-18T10:50:20Z |
±-----------------------------------------------------------------------------+
| |
e[34;1mConfig:e[0m

  • SSHRsaPrivateKey: *****
  • SSHKeySavePath: /Users/vagrant/.ssh/bitrise_step_activate_ssh_key
  • IsRemoveOtherIdentities: true
  • Verbose: false

$ ssh-add “-l”
ssh_agent_check_result: 1
running / accessible ssh-agent detected

$ ssh-add “-D”
All identities removed.

$ ssh-agent “-k”
SSH_AGENT_PID not set, cannot kill agent
Exit code: exit status 1

$ bash “-c” “/var/folders/6q/wgy6jtp12w5gzgm9lzcglpqw0000gn/T/spawn021530598/tmp_spawn.sh”
spawn ssh-add /Users/vagrant/.ssh/bitrise_step_activate_ssh_key
Identity added: /Users/vagrant/.ssh/bitrise_step_activate_ssh_key (/Users/vagrant/.ssh/bitrise_step_activate_ssh_key)

e[32;1mSuccesse[0m
The SSH key was saved to /Users/vagrant/.ssh/bitrise_step_activate_ssh_key
and was successfully added to ssh-agent.
| |
±–±--------------------------------------------------------------±---------+
| e[32;1m✓e[0m | e[32;1mactivate-ssh-key@4.0.3e[0m | 7.71 sec |
±–±--------------------------------------------------------------±---------+
| Update available: 4.0.3 -> 4.0.5 |
±–±--------------------------------------------------------------±---------+

±-----------------------------------------------------------------------------+
| (1) git-clone@4.0.17 |
±-----------------------------------------------------------------------------+
| id: git-clone |
| version: 4.0.17 |
| collection: https://github.com/bitrise-io/bitrise-steplib.git |
| toolkit: go |
| time: 2019-12-18T10:50:29Z |
±-----------------------------------------------------------------------------+
| |
e[34;1mconfig:
e[0m

  • RepositoryURL: git@github.com:sensysindia/Bitrise-Sample.git
  • CloneIntoDir: /Users/vagrant/git
  • Commit:
  • Tag:
  • Branch: master
  • BranchDest:
  • PRID: 0
  • PRRepositoryURL:
  • PRMergeBranch:
  • ResetRepository: false
  • CloneDepth: 0
  • BuildURL: https://app.bitrise.io/build/c478f8f32e21fb1e
  • BuildAPIToken: [REDACTED]
  • UpdateSubmodules: true
  • ManualMerge: true
    e[34;1mgit "init"e[0m
    Initialized empty Git repository in /Users/vagrant/git/.git/
    e[34;1mgit “remote” “add” “origin” "git@github.com:sensysindia/Bitrise-Sample.git"e[0m
    e[34;1mgit “fetch” “origin” "master"e[0m
    Warning: Permanently added ‘github.com,192.30.253.112’ (RSA) to the list of known hosts.
    From github.com:sensysindia/Bitrise-Sample
  • branch master -> FETCH_HEAD
  • [new branch] master -> origin/master
    e[34;1mgit “checkout” "master"e[0m
    Already on ‘master’
    Branch ‘master’ set up to track remote branch ‘master’ from ‘origin’.
    e[34;1mgit “merge” "origin/master"e[0m
    Already up to date.
    e[34;1mgit “submodule” “update” “–init” "–recursive"e[0m
    e[34;1m
    Exporting git logs
    e[0m
    => GIT_CLONE_COMMIT_COMMITER_NAME
    value: SensysBitrise

=> GIT_CLONE_COMMIT_COMMITER_EMAIL
value: mobile.app@sensysindia.com

=> GIT_CLONE_COMMIT_HASH
value: f1d2b9288f50060bd2e9affda65ce8908a8f5b09

=> GIT_CLONE_COMMIT_MESSAGE_SUBJECT
value: Initial commit

=> GIT_CLONE_COMMIT_MESSAGE_BODY
value:

=> GIT_CLONE_COMMIT_AUTHOR_NAME
value: SensysBitrise

=> GIT_CLONE_COMMIT_AUTHOR_EMAIL
value: mobile.app@sensysindia.com

=> GIT_CLONE_COMMIT_COUNT
value: 2

e[32;1m
Successe[0m
| |
±–±--------------------------------------------------------------±---------+
| e[32;1m✓e[0m | e[32;1mgit-clone@4.0.17e[0m | 10.45 sec|
±–±--------------------------------------------------------------±---------+

±-----------------------------------------------------------------------------+
| (2) Do anything with Script step |
±-----------------------------------------------------------------------------+
| id: script |
| version: 1.1.5 |
| collection: https://github.com/bitrise-io/bitrise-steplib.git |
| toolkit: bash |
| time: 2019-12-18T10:50:37Z |
±-----------------------------------------------------------------------------+
| |

  • echo ‘Hello World!’
    Hello World!
    | |
    ±–±--------------------------------------------------------------±---------+
    | e[32;1m✓e[0m | e[32;1mDo anything with Script stepe[0m | 3.42 sec |
    ±–±--------------------------------------------------------------±---------+

±-----------------------------------------------------------------------------+
| (3) certificate-and-profile-installer@1.10.1 |
±-----------------------------------------------------------------------------+
| id: certificate-and-profile-installer |
| version: 1.10.1 |
| collection: https://github.com/bitrise-io/bitrise-steplib.git |
| toolkit: go |
| time: 2019-12-18T10:50:41Z |
±-----------------------------------------------------------------------------+
| |
e[36mINFOe[0m[10:50:41] * e[32;1m[OK]e[0m Step dependency (go) installed, available.

e[34;1mConfigs:e[0m

  • CertificateURL:
  • CertificatePassphrase:
  • ProvisioningProfileURL:
  • InstallDefaults: yes
  • DefaultCertificateURL:
  • DefaultCertificatePassphrase:
  • DefaultProvisioningProfileURL:
  • KeychainPath: /Users/vagrant/Library/Keychains/login.keychain
  • KeychainPassword: ***

Provided Certificate count: 0
e[33;1mNo Certificate providede[0m
Provided Provisioning Profile count: 0
e[33;1mNo Provisioning Profile providede[0m

e[33;1mKeychain (/Users/vagrant/Library/Keychains/login.keychain) does not existe[0m
Checking (/Users/vagrant/Library/Keychains/login.keychain-db)

e[34;1mDownloading & installing Certificate(s)e[0m

Installing downloaded certificates

e[34;1mDownloading & installing Provisioning Profile(s)e[0m
| |
±–±--------------------------------------------------------------±---------+
| e[32;1m✓e[0m | e[32;1mcertificate-and-profile-installer@1.10.1e[0m | 6.51 sec |
±–±--------------------------------------------------------------±---------+
| Update available: 1.10.1 -> 1.10.2 |
±–±--------------------------------------------------------------±---------+

±-----------------------------------------------------------------------------+
| (4) xamarin-archive@1.5.1 |
±-----------------------------------------------------------------------------+
| id: xamarin-archive |
| version: 1.5.1 |
| collection: https://github.com/bitrise-io/bitrise-steplib.git |
| toolkit: go |
| time: 2019-12-18T10:50:47Z |
±-----------------------------------------------------------------------------+
| |

e[34;1mConfigs:e[0m

  • XamarinSolution: Bitrise Sample.sln
  • XamarinConfiguration: Debug
  • XamarinPlatform: Any CPU
  • ProjectTypeWhitelist: android,ios,macos,tvos
    e[34;1mExperimental Configs:e[0m
  • AndroidCustomOptions:
  • IOSCustomOptions:
  • TvOSCustomOptions:
  • MacOSCustomOptions:
  • BuildTool: msbuild
    e[34;1mOther Configs:e[0m
  • DeployDir: /Users/vagrant/deploy

e[34;1mBuilding all projects in solution: Bitrise Sample.slne[0m

e[34;1mBuilding project: Bitrise Sample.Androide[0m
e[32;1m$ “/Library/Frameworks/Mono.framework/Versions/Current/Commands/msbuild” “/Users/vagrant/git/Bitrise Sample/Bitrise Sample.Android/Bitrise Sample.Android.csproj” “/target:PackageForAndroid” “/p:SolutionDir=/Users/vagrant/git” "/p:Configuration=Debug"e[0m

Microsoft ® Build Engine version 16.3.0-ci for Mono
Copyright © Microsoft Corporation. All rights reserved.

Build started 12/18/2019 10:50:52 AM.
Project “/Users/vagrant/git/Bitrise Sample/Bitrise Sample.Android/Bitrise Sample.Android.csproj” on node 1 (PackageForAndroid target(s)).
_CleanIntermediateIfNuGetsChange:
Skipping target “_CleanIntermediateIfNuGetsChange” because it has no inputs.
_ResolveSdks:
Found Java SDK version 1.8.0.
Found Java SDK version 1.8.0.
_CreateAapt2VersionCache:
Creating directory “obj/Debug/”.
_CreatePropertiesCache:
Creating directory “obj/Debug/stamp/”.
_ValidateAndroidPackageProperties:
PackageName: com.companyname.bitrise_sample
PrepareForBuild:
Creating directory “bin/Debug/”.
Project “/Users/vagrant/git/Bitrise Sample/Bitrise Sample.Android/Bitrise Sample.Android.csproj” (1) is building “/Users/vagrant/git/Bitrise Sample/Bitrise Sample/Bitrise Sample.csproj” (2:2) on node 1 (default targets).
PrepareForBuild:
Creating directory “bin/Debug/netstandard2.0/”.
Creating directory “obj/Debug/netstandard2.0/”.
Creating directory “/Users/vagrant/git/Bitrise Sample/Bitrise Sample/obj/Debug/netstandard2.0/ref/”.
Creating directory “bin/Debug/netstandard2.0/ref”.
/usr/local/share/dotnet/sdk/3.0.101/Sdks/Microsoft.NET.Sdk/targets/Microsoft.PackageDependencyResolution.targets(234,5): error NETSDK1004: Assets file ‘/Users/vagrant/git/Bitrise Sample/Bitrise Sample/obj/project.assets.json’ not found. Run a NuGet package restore to generate this file. [/Users/vagrant/git/Bitrise Sample/Bitrise Sample/Bitrise Sample.csproj]
Done Building Project “/Users/vagrant/git/Bitrise Sample/Bitrise Sample/Bitrise Sample.csproj” (default targets) – FAILED.
Done Building Project “/Users/vagrant/git/Bitrise Sample/Bitrise Sample.Android/Bitrise Sample.Android.csproj” (PackageForAndroid target(s)) – FAILED.

Build FAILED.

“/Users/vagrant/git/Bitrise Sample/Bitrise Sample.Android/Bitrise Sample.Android.csproj” (PackageForAndroid target) (1) ->
“/Users/vagrant/git/Bitrise Sample/Bitrise Sample/Bitrise Sample.csproj” (default target) (2:2) ->
(ResolvePackageAssets target) ->
/usr/local/share/dotnet/sdk/3.0.101/Sdks/Microsoft.NET.Sdk/targets/Microsoft.PackageDependencyResolution.targets(234,5): error NETSDK1004: Assets file ‘/Users/vagrant/git/Bitrise Sample/Bitrise Sample/obj/project.assets.json’ not found. Run a NuGet package restore to generate this file. [/Users/vagrant/git/Bitrise Sample/Bitrise Sample/Bitrise Sample.csproj]

0 Warning(s)
1 Error(s)

Time Elapsed 00:00:03.72
e[31;1mBuild failed, error: exit status 1e[0m
| |
±–±--------------------------------------------------------------±---------+
| e[31;1mxe[0m | e[31;1mxamarin-archive@1.5.1 (exit code: 1)e[0m | 10.35 sec|
±–±--------------------------------------------------------------±---------+
| Update available: 1.5.1 -> 1.5.2 |
| Issue tracker: …://github.com/bitrise-steplib/steps-xamarin-archive/issues |
| Source: https://github.com/bitrise-steplib/steps-xamarin-archive |
±–±--------------------------------------------------------------±---------+

±-----------------------------------------------------------------------------+
| (5) deploy-to-bitrise-io@1.9.2 |
±-----------------------------------------------------------------------------+
| id: deploy-to-bitrise-io |
| version: 1.9.2 |
| collection: https://github.com/bitrise-io/bitrise-steplib.git |
| toolkit: go |
| time: 2019-12-18T10:50:57Z |
±-----------------------------------------------------------------------------+
| |
e[34;1mConfig:
e[0m- BuildURL: https://app.bitrise.io/build/c478f8f32e21fb1e

  • APIToken: [REDACTED]
  • IsCompress: false
  • ZipName:
  • DeployPath: /Users/vagrant/deploy
  • NotifyUserGroups: everyone
  • NotifyEmailList:
  • IsPublicPageEnabled: true
  • PublicInstallPageMapFormat: {{range $index, $element := .}}{{if $index}}|{{end}}{{$element.File}}=>{{$element.URL}}{{end}}
  • BuildSlug: c478f8f32e21fb1e
  • TestDeployDir: /var/folders/6q/wgy6jtp12w5gzgm9lzcglpqw0000gn/T/test_results881942915
  • AppSlug: b681172084a4b5e7
  • AddonAPIBaseURL: [REDACTED]
  • AddonAPIToken: [REDACTED]
  • DebugMode: false

e[34;1mDeploying the content of the Deploy directory separatelye[0m

e[34;1mList of files to deploye[0m

e[34;1mDeploying filese[0m

e[32;1mSuccesse[0m
You can find the Artifact on Bitrise, on the Build’s page: https://app.bitrise.io/build/c478f8f32e21fb1e

e[34;1mUpload test resultse[0m

  • uploading (0) test results
    e[32;1mSuccesse[0m
    | |
    ±–±--------------------------------------------------------------±---------+
    | e[32;1m✓e[0m | e[32;1mdeploy-to-bitrise-io@1.9.2e[0m | 7.23 sec |
    ±–±--------------------------------------------------------------±---------+
    | Update available: 1.9.2 -> 1.9.4 |
    ±–±--------------------------------------------------------------±---------+

±-----------------------------------------------------------------------------+
| bitrise summary |
±–±--------------------------------------------------------------±---------+
| | title | time (s) |
±–±--------------------------------------------------------------±---------+
| e[32;1m✓e[0m | e[32;1mactivate-ssh-key@4.0.3e[0m | 7.71 sec |
±–±--------------------------------------------------------------±---------+
| Update available: 4.0.3 -> 4.0.5 |
±–±--------------------------------------------------------------±---------+
| e[32;1m✓e[0m | e[32;1mgit-clone@4.0.17e[0m | 10.45 sec|
±–±--------------------------------------------------------------±---------+
| e[32;1m✓e[0m | e[32;1mDo anything with Script stepe[0m | 3.42 sec |
±–±--------------------------------------------------------------±---------+
| e[32;1m✓e[0m | e[32;1mcertificate-and-profile-installer@1.10.1e[0m | 6.51 sec |
±–±--------------------------------------------------------------±---------+
| Update available: 1.10.1 -> 1.10.2 |
±–±--------------------------------------------------------------±---------+
| e[31;1mxe[0m | e[31;1mxamarin-archive@1.5.1 (exit code: 1)e[0m | 10.35 sec|
±–±--------------------------------------------------------------±---------+
| Update available: 1.5.1 -> 1.5.2 |
| Issue tracker: …://github.com/bitrise-steplib/steps-xamarin-archive/issues |
| Source: https://github.com/bitrise-steplib/steps-xamarin-archive |
±–±--------------------------------------------------------------±---------+
| e[32;1m✓e[0m | e[32;1mdeploy-to-bitrise-io@1.9.2e[0m | 7.23 sec |
±–±--------------------------------------------------------------±---------+
| Update available: 1.9.2 -> 1.9.4 |
±–±--------------------------------------------------------------±---------+
| Total runtime: 45.67 sec |
±-----------------------------------------------------------------------------+

e[34;1me[0m
e[34;1mSubmitting anonymized usage informations…e[0m
e[34;1mFor more information visit:e[0m
e[34;1mhttps://github.com/bitrise-io/bitrise-plugins-analytics/blob/master/README.mde[0m
exit status 1

0 Likes