Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LocateBuildToolsConfigTask fails when buildtools.json does not exist #259

Closed
dansiegel opened this issue Jul 1, 2021 · 0 comments · Fixed by #261
Closed

LocateBuildToolsConfigTask fails when buildtools.json does not exist #259

dansiegel opened this issue Jul 1, 2021 · 0 comments · Fixed by #261
Labels
Milestone

Comments

@dansiegel
Copy link
Owner

Description

After installing the Mobile.BuildTools on a freshly created project, the LocateBuildToolsConfigTask fails unexpectedly with a FileNotFoundException.

Reproduction Steps

  1. Create new application
  2. Install the Mobile.BuildTools

Expected Behavior

The Mobile.BuildTools should create a buildtools.json

Actual Behavior

/Users/dansiegel/.nuget/packages/mobile.buildtools/2.0.199-pre-g9558771bca/build/Mobile.BuildTools.targets(5,5): Error MSB4018: The "LocateBuildToolsConfigTask" task failed unexpectedly.
System.IO.FileNotFoundException: Could not find file "/Users/dansiegel/repos/Temp/MBTTest1/buildtools.json"
File name: '/Users/dansiegel/repos/Temp/MBTTest1/buildtools.json'
  at System.IO.FileStream..ctor (System.String path, System.IO.FileMode mode, System.IO.FileAccess access, System.IO.FileShare share, System.Int32 bufferSize, System.Boolean anonymous, System.IO.FileOptions options) [0x00259] in /Users/builder/jenkins/workspace/build-package-osx-mono/2020-02/external/bockbuild/builds/mono-x64/mcs/class/corlib/System.IO/FileStream.cs:274 
  at System.IO.FileStream..ctor (System.String path, System.IO.FileMode mode, System.IO.FileAccess access, System.IO.FileShare share, System.Int32 bufferSize, System.IO.FileOptions options) [0x00000] in /Users/builder/jenkins/workspace/build-package-osx-mono/2020-02/external/bockbuild/builds/mono-x64/mcs/class/corlib/System.IO/FileStream.cs:106 
  at (wrapper remoting-invoke-with-check) System.IO.FileStream..ctor(string,System.IO.FileMode,System.IO.FileAccess,System.IO.FileShare,int,System.IO.FileOptions)
  at System.IO.StreamReader..ctor (System.String path, System.Text.Encoding encoding, System.Boolean detectEncodingFromByteOrderMarks, System.Int32 bufferSize) [0x00055] in /Users/builder/jenkins/workspace/build-package-osx-mono/2020-02/external/bockbuild/builds/mono-x64/external/corefx/src/Common/src/CoreLib/System/IO/StreamReader.cs:182 
  at System.IO.StreamReader..ctor (System.String path, System.Text.Encoding encoding, System.Boolean detectEncodingFromByteOrderMarks) [0x00000] in /Users/builder/jenkins/workspace/build-package-osx-mono/2020-02/external/bockbuild/builds/mono-x64/external/corefx/src/Common/src/CoreLib/System/IO/StreamReader.cs:167 
  at (wrapper remoting-invoke-with-check) System.IO.StreamReader..ctor(string,System.Text.Encoding,bool)
  at System.IO.File.InternalReadAllText (System.String path, System.Text.Encoding encoding) [0x00000] in /Users/builder/jenkins/workspace/build-package-osx-mono/2020-02/external/bockbuild/builds/mono-x64/external/corefx/src/System.IO.FileSystem/src/System/IO/File.cs:303 
  at System.IO.File.ReadAllText (System.String path) [0x00026] in /Users/builder/jenkins/workspace/build-package-osx-mono/2020-02/external/bockbuild/builds/mono-x64/external/corefx/src/System.IO.FileSystem/src/System/IO/File.cs:282 
  at Mobile.BuildTools.Utils.ConfigHelper.GetConfig (System.String path) [0x00044] in D:\a\1\s\src\Mobile.BuildTools.Reference\Utils\ConfigHelper.shared.cs:63 
  at Mobile.BuildTools.Tasks.LocateBuildToolsConfigTask.Execute () [0x00033] in D:\a\1\s\src\Mobile.BuildTools\Tasks\LocateBuildToolsConfigTask.cs:67 
  at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute () [0x00023] in /Users/builder/jenkins/workspace/build-package-osx-mono-pullrequest/pr/external/bockbuild/builds/msbuild-15/src/Build/BackEnd/TaskExecutionHost/TaskExecutionHost.cs:578 
  at Microsoft.Build.BackEnd.TaskBuilder.ExecuteInstantiatedTask (Microsoft.Build.BackEnd.ITaskExecutionHost taskExecutionHost, Microsoft.Build.BackEnd.Logging.TaskLoggingContext taskLoggingContext, Microsoft.Build.BackEnd.TaskHost taskHost, Microsoft.Build.BackEnd.ItemBucket bucket, Microsoft.Build.BackEnd.TaskExecutionMode howToExecuteTask) [0x002b9] in /Users/builder/jenkins/workspace/build-package-osx-mono-pullrequest/pr/external/bockbuild/builds/msbuild-15/src/Build/BackEnd/Components/RequestBuilder/TaskBuilder.cs:807  (MSB4018) (MBTTest1)

Environment

  • OS: [Windows 10|OSX]
  • IDE: [VS2017|VSMac|CLI]
  • BuildTools Version: [1.x.x]
  • IDE Version: [1.x.x]
  • Build Target Framework: [netstandard2.0|Xamarin.iOS|Xamarin.Android]

Reproduction App

n/a

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant