Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/monodevelop.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/main
diff options
context:
space:
mode:
authorMatt Ward <matt.ward@xamarin.com>2017-07-27 13:16:14 +0300
committerMatt Ward <ward.matt@gmail.com>2017-07-27 14:43:21 +0300
commitf9bc1c19f80f12b0ff5a81b02de2ab811e8e5e9f (patch)
treedde3c411f07fff1c2a1c8aab051e8286aac1243e /main
parent633578ba76f176178a9a4e0bbb022ca052dd04a7 (diff)
[F#] Fix Android project template compile tests
The tests that create Android projects and compile them were failing with 'The OutputPath property is not set for project'. This was because the projects were saved after NuGet packages were installed. The new Android projects use the Xamarin.Build.Download NuGet package which adds a .props Import at the start of the project file. Saving the Android project after this NuGet package was added would result in the Xamarin.Android.FSharp.targets Import being added at the top of the project file, since similar elements are grouped together. The Xamarin.Android.FSharp.targets Import needs to be at the end of the project file. Saving the project before adding the NuGet packages fixes this problem.
Diffstat (limited to 'main')
-rw-r--r--main/external/fsharpbinding/MonoDevelop.FSharp.Tests/TemplateTests.fs10
1 files changed, 8 insertions, 2 deletions
diff --git a/main/external/fsharpbinding/MonoDevelop.FSharp.Tests/TemplateTests.fs b/main/external/fsharpbinding/MonoDevelop.FSharp.Tests/TemplateTests.fs
index b4e8820784..5b10ccab5f 100644
--- a/main/external/fsharpbinding/MonoDevelop.FSharp.Tests/TemplateTests.fs
+++ b/main/external/fsharpbinding/MonoDevelop.FSharp.Tests/TemplateTests.fs
@@ -99,9 +99,15 @@ type ``Template tests``() =
let projects = sln.Items |> Seq.filter(fun i -> i :? DotNetProject) |> Seq.cast<DotNetProject> |> List.ofSeq
-
- do! NuGetPackageInstaller.InstallPackages (sln, projectTemplate.PackageReferencesForCreatedProjects)
+ // Save solution before installing NuGet packages to prevent any Imports from being added
+ // in the wrong place. Android projects now use the Xamarin.Build.Download NuGet package which
+ // will add its own .props Import at the top of the project file. Saving the project the first time
+ // after installing this NuGet package results in the Xamarin.Android.FSharp.targets Import being
+ // added at the top of the project which causes a compile error about the OutputType not being defined.
+ // This is because the Import is grouped with the Xamarin.Build.Download .props Import which is inserted
+ // at the top of the project file.
do! sln.SaveAsync(monitor)
+ do! NuGetPackageInstaller.InstallPackages (sln, projectTemplate.PackageReferencesForCreatedProjects)
let getErrorsForProject (projects: DotNetProject list) =
asyncSeq {