Skip to content

Conversation

@jonpryor
Copy link
Contributor

Fixes: mono/mono#7511
Fixes: #1438

Context: #1289

PR #1289 bumps xamarin-android to use the mono/2018-02 branch, and is
encountering an error when executing the
Xamarin.Android.Build.Tests.AndroidUpdateResourcesTest.CheckResourceDesignerIsCreated()
test, with the following error:

/Users/builder/jenkins/workspace/xamarin-android-pr-builder/xamarin-android/bin/Debug/lib/xamarin.android/xbuild/Xamarin/Android/Xamarin.Android.Common.targets: error : Error executing task GenerateResourceDesigner: Could not load file or assembly 'FSharp.Core, Version=4.3.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies.
Error executing task GenerateResourceDesigner: System.IO.FileNotFoundException: Could not load file or assembly 'FSharp.Core, Version=4.3.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies.
File name: 'FSharp.Core, Version=4.3.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'
  at System.CodeDom.Compiler.CodeDomProvider.CreateGenerator (System.IO.TextWriter output) [0x00000] in /Users/builder/jenkins/workspace/build-package-osx-mono/2018-02/external/bockbuild/builds/mono-x64/external/corefx/src/System.CodeDom/src/System/CodeDom/Compiler/CodeDomProvider.cs:123
  at Xamarin.Android.Tasks.GenerateResourceDesigner.WriteFile (System.String file, System.CodeDom.CodeTypeDeclaration resources, System.String language, System.Boolean isFSharp, System.Boolean isCSharp) [0x0012a] in /Users/builder/jenkins/workspace/xamarin-android-pr-builder/xamarin-android/src/Xamarin.Android.Build.Tasks/Tasks/GenerateResourceDesigner.cs:217
  at Xamarin.Android.Tasks.GenerateResourceDesigner.Execute () [0x0065b] in /Users/builder/jenkins/workspace/xamarin-android-pr-builder/xamarin-android/src/Xamarin.Android.Build.Tasks/Tasks/GenerateResourceDesigner.cs:155
  at Microsoft.Build.BuildEngine.TaskEngine.Execute () [0x00000] in /Users/builder/jenkins/workspace/build-package-osx-mono/2018-02/external/bockbuild/builds/mono-x64/mcs/class/Microsoft.Build.Engine/Microsoft.Build.BuildEngine/TaskEngine.cs:134
  at Microsoft.Build.BuildEngine.BuildTask.Execute () [0x0008d] in /Users/builder/jenkins/workspace/build-package-osx-mono/2018-02/external/bockbuild/builds/mono-x64/mcs/class/Microsoft.Build.Engine/Microsoft.Build.BuildEngine/BuildTask.cs:101

The mono/2018-02 branch bumps the FSharp.Core.dll assembly that is
distributed with mono to have an assembly version of 4.4.1.

The FSharp.Compiler.CodeDom NuGet package that
Xamarin.Android.Build.Tasks.dll references requires FSharp.Core
4.3.1, hence the FileNotFoundException.

The (hopeful) fix? Install the required FSharp.Core.dll version, so
that FSharp.Compiler.CodeDom can work as desired.

Fixes: mono/mono#7511
Fixes: dotnet#1438

Context: dotnet#1289

PR dotnet#1289 bumps xamarin-android to use the mono/2018-02 branch, and is
encountering an error when executing the
`Xamarin.Android.Build.Tests.AndroidUpdateResourcesTest.CheckResourceDesignerIsCreated()`
test, with the following error:

	/Users/builder/jenkins/workspace/xamarin-android-pr-builder/xamarin-android/bin/Debug/lib/xamarin.android/xbuild/Xamarin/Android/Xamarin.Android.Common.targets: error : Error executing task GenerateResourceDesigner: Could not load file or assembly 'FSharp.Core, Version=4.3.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies.
	Error executing task GenerateResourceDesigner: System.IO.FileNotFoundException: Could not load file or assembly 'FSharp.Core, Version=4.3.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies.
	File name: 'FSharp.Core, Version=4.3.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'
	  at System.CodeDom.Compiler.CodeDomProvider.CreateGenerator (System.IO.TextWriter output) [0x00000] in /Users/builder/jenkins/workspace/build-package-osx-mono/2018-02/external/bockbuild/builds/mono-x64/external/corefx/src/System.CodeDom/src/System/CodeDom/Compiler/CodeDomProvider.cs:123
	  at Xamarin.Android.Tasks.GenerateResourceDesigner.WriteFile (System.String file, System.CodeDom.CodeTypeDeclaration resources, System.String language, System.Boolean isFSharp, System.Boolean isCSharp) [0x0012a] in /Users/builder/jenkins/workspace/xamarin-android-pr-builder/xamarin-android/src/Xamarin.Android.Build.Tasks/Tasks/GenerateResourceDesigner.cs:217
	  at Xamarin.Android.Tasks.GenerateResourceDesigner.Execute () [0x0065b] in /Users/builder/jenkins/workspace/xamarin-android-pr-builder/xamarin-android/src/Xamarin.Android.Build.Tasks/Tasks/GenerateResourceDesigner.cs:155
	  at Microsoft.Build.BuildEngine.TaskEngine.Execute () [0x00000] in /Users/builder/jenkins/workspace/build-package-osx-mono/2018-02/external/bockbuild/builds/mono-x64/mcs/class/Microsoft.Build.Engine/Microsoft.Build.BuildEngine/TaskEngine.cs:134
	  at Microsoft.Build.BuildEngine.BuildTask.Execute () [0x0008d] in /Users/builder/jenkins/workspace/build-package-osx-mono/2018-02/external/bockbuild/builds/mono-x64/mcs/class/Microsoft.Build.Engine/Microsoft.Build.BuildEngine/BuildTask.cs:101

The mono/2018-02 branch bumps the `FSharp.Core.dll` assembly that is
distributed with mono to have an assembly version of 4.4.1.

The `FSharp.Compiler.CodeDom` NuGet package that
`Xamarin.Android.Build.Tasks.dll` references requires FSharp.Core
4.3.1, hence the `FileNotFoundException`.

The (hopeful) fix? Install the required `FSharp.Core.dll` version, so
that `FSharp.Compiler.CodeDom` can work as desired.
@jonpryor jonpryor requested a review from dellis1972 March 17, 2018 18:36
<HintPath>..\..\packages\FSharp.Compiler.CodeDom.1.0.0.1\lib\net40\FSharp.Compiler.CodeDom.dll</HintPath>
</Reference>
<Reference Include="FSharp.Core">
<HintPath>..\..\packages\FSharp.Core.3.1.2.5\lib\net40\FSharp.Core.dll</HintPath>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is 3.1.2.5 the right version? 4.3.4 is the current on nuget.org

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I need assembly version 4.3.1, and NuGet package 3.1.2.5 is the last one to provide that; laster NuGet packages provide version 4.4.0.

So we either use this NuGet package, or I figure out how to do binding redirects. :-/

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Cannot find FSharp.Core or one of its dependencies during testing [XA] Cannot find FSharp.Core or one of its dependencies during testing

2 participants