Skip to content

Commit d8ea7b2

Browse files
committed
Merge remote-tracking branch 'origin/master' into mono-2017-06
2 parents 83d9b74 + 8a703c6 commit d8ea7b2

File tree

23 files changed

+134
-68
lines changed

23 files changed

+134
-68
lines changed

build-tools/create-vsix/create-vsix.targets

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,16 +38,22 @@
3838
<MSBuild Remove="$(LibDir)xbuild\Xamarin\Android\lib\host-Linux\**\*.*" />
3939
<MSBuild Remove="$(LibDir)xbuild\Xamarin\Android\Darwin\**\*.*" />
4040
<MSBuild Remove="$(LibDir)xbuild\Xamarin\Android\Linux\**\*.*" />
41+
<MSBuild Remove="$(LibDir)xbuild\Xamarin\Android\**\*.dylib" />
4142
<MSBuild Include="..\..\src\Xamarin.Android.Build.Tasks\MSBuild\Xamarin\**\*.*" />
4243
<MSBuild>
4344
<VSIXSubPath Condition=" '%(VSIXSubPath)' == '' ">Xamarin/%(RecursiveDir)</VSIXSubPath>
4445
</MSBuild>
4546
<MSBuild>
4647
<VSIXSubPath Condition=" '%(VSIXSubPath)' == '' ">Xamarin/Android/%(RecursiveDir)</VSIXSubPath>
4748
</MSBuild>
49+
<MSBuild>
50+
<VSIXSubPath Condition=" '%(VSIXSubPath)' == 'Xamarin/Android/lib/host-mxe-Win64/' ">Xamarin/Android/</VSIXSubPath>
51+
</MSBuild>
4852
<MSBuild Remove="$(LibDir)xbuild\**\*.d.dll" />
4953
<MSBuild Remove="$(LibDir)xbuild\**\*.d.exe" />
5054
<ReferenceAssemblies Include="$(LibDir)xbuild-frameworks\**\*.*" />
55+
<ReferenceAssemblies Remove="**\*.dylib" />
56+
<ReferenceAssemblies Remove="**\libZipSharp*.*" />
5157
<ReferenceAssemblies>
5258
<VSIXSubPath Condition=" '%(VSIXSubPath)' == '' ">Microsoft/Framework/%(RecursiveDir)</VSIXSubPath>
5359
</ReferenceAssemblies>
@@ -102,7 +108,7 @@
102108
<_Branch>$(_Branch.Replace ('\', '-'))</_Branch>
103109
</PropertyGroup>
104110
<PropertyGroup>
105-
<VsixPath Condition=" '$(VsixPath)' == '' ">..\..\bin\Build$(Configuration)\$(AssemblyName)-OSS-$(ProductVersion).$(XAVersionCommitCount)_$(XAVersionBranch)_$(XAVersionHash).vsix</VsixPath>
111+
<VsixPath Condition=" '$(VsixPath)' == '' ">..\..\bin\Build$(Configuration)\$(AssemblyName)-OSS-$(ProductVersion).$(XAVersionCommitCount)_$(_Branch)_$(XAVersionHash).vsix</VsixPath>
106112
</PropertyGroup>
107113
</Target>
108114
<Target Name="_CopyToBuildConfiguration"

build-tools/mono-runtimes/mono-runtimes.targets

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -21,14 +21,6 @@
2121
/>
2222
<MonoDocCopyItem Include="monodoc.dll.config" />
2323
</ItemGroup>
24-
<ItemGroup>
25-
<FSharpItem Include="FSharp.Core.dll" />
26-
<FSharpItem Include="FSharp.Core.optdata" />
27-
<FSharpItem Include="FSharp.Core.sigdata" />
28-
</ItemGroup>
29-
<ItemGroup>
30-
<_FSharpInstalledItems Include="@(FSharpItem->'$(_BclFrameworkDir)%(Identity)')" />
31-
</ItemGroup>
3224
<UsingTask AssemblyFile="$(_SourceTopDir)\bin\Build$(Configuration)\Xamarin.Android.Tools.BootstrapTasks.dll" TaskName="Xamarin.Android.Tools.BootstrapTasks.GetNugetPackageBasePath" />
3325
<ItemGroup>
3426
<_MonoDocCopyItems Include="@(MonoDocCopyItem->'$(_MonoOutputDir)\%(Identity)')" />
@@ -447,11 +439,7 @@
447439
<ItemGroup>
448440
<_PackageConfigFiles Include="$(_SourceTopDir)\src\Xamarin.Android.Build.Tasks\packages.config" />
449441
</ItemGroup>
450-
<GetNugetPackageBasePath PackageConfigFiles="@(_PackageConfigFiles)" PackageName="FSharp.Core">
451-
<Output TaskParameter="BasePath" PropertyName="_FSharpCorePackagePath" />
452-
</GetNugetPackageBasePath>
453442
<ItemGroup>
454-
<_FSharp Include="$(_SourceTopDir)\$(_FSharpCorePackagePath)\lib\portable-net45+monoandroid10+monotouch10+xamarinios10\FSharp.Core*" />
455443
<_Facades Include="$(_MonoProfileDir)\Facades\*.dll" />
456444
</ItemGroup>
457445
<Copy
@@ -462,13 +450,6 @@
462450
SourceFiles="@(_Facades)"
463451
DestinationFolder="$(_BclFrameworkDir)Facades"
464452
/>
465-
<Copy
466-
SourceFiles="@(_FSharp)"
467-
DestinationFolder="$(_BclFrameworkDir)"
468-
/>
469-
<Touch
470-
Files="@(_FSharp->'$(_BclFrameworkDir)%(Filename)%(Extension)')"
471-
/>
472453
<Touch
473454
Files="@(_BclInstalledItem)"
474455
/>
@@ -577,7 +558,6 @@
577558
<BundleItem Include="@(_MonoDocInstalledItems)" />
578559
<BundleItem Include="@(_MonoCilStripDest)" />
579560
<BundleItem Include="@(_MonoUtilityDest)" />
580-
<BundleItem Include="@(_FSharpInstalledItems)" />
581561
<BundleItem Include="@(MonoFacadeAssembly->'$(_BclFrameworkDir)Facades\%(Identity)')" />
582562
<BundleItem Include="$(_BclFrameworkDir)RedistList\FrameworkList.xml" />
583563
<BundleItem Include="@(_InstallRuntimeOutput)" />

src/Mono.Android/Mono.Android.csproj

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,20 @@
7575
<Private>False</Private>
7676
</Reference>
7777
</ItemGroup>
78+
<Import Project="$(JavaInteropFullPath)\src\Java.Interop.Tools.TypeNameMappings\Java.Interop.Tools.TypeNameMappings.projitems" Label="Shared" Condition="Exists('$(JavaInteropFullPath)\src\Java.Interop.Tools.TypeNameMappings\Java.Interop.Tools.TypeNameMappings.projitems')" />
79+
<Import Project="..\Xamarin.Android.NamingCustomAttributes\Xamarin.Android.NamingCustomAttributes.projitems" Label="Shared" Condition="Exists('..\Xamarin.Android.NamingCustomAttributes\Xamarin.Android.NamingCustomAttributes.projitems')" />
80+
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
81+
<PropertyGroup>
82+
<ImplicitlyExpandDesignTimeFacades>False</ImplicitlyExpandDesignTimeFacades>
83+
<IntermediateOutputPath>$(IntermediateOutputPath)android-$(AndroidApiLevel)\</IntermediateOutputPath>
84+
</PropertyGroup>
85+
<Import Project="Mono.Android.targets" />
86+
<PropertyGroup>
87+
<JavaCallableWrapperAbsAssembly>$([System.IO.Path]::GetFullPath ('$(OutputPath)$(AssemblyName).dll'))</JavaCallableWrapperAbsAssembly>
88+
<JavaCallableWrapperAfterTargets>CoreBuild</JavaCallableWrapperAfterTargets>
89+
</PropertyGroup>
90+
<Import Project="..\..\build-tools\scripts\JavaCallableWrappers.targets" />
91+
<Import Project="$(IntermediateOutputPath)mcw\Mono.Android.projitems" Condition="Exists('$(IntermediateOutputPath)mcw\Mono.Android.projitems')" />
7892
<ItemGroup>
7993
<Compile Include="Android\IncludeAndroidResourcesFromAttribute.cs" />
8094
<Compile Include="Android\LinkerSafeAttribute.cs" />
@@ -311,20 +325,6 @@
311325
<Compile Include="Xamarin.Android.Net\AuthModuleDigest.cs" />
312326
<Compile Include="Xamarin.Android.Net\IAndroidAuthenticationModule.cs" />
313327
</ItemGroup>
314-
<Import Project="$(JavaInteropFullPath)\src\Java.Interop.Tools.TypeNameMappings\Java.Interop.Tools.TypeNameMappings.projitems" Label="Shared" Condition="Exists('$(JavaInteropFullPath)\src\Java.Interop.Tools.TypeNameMappings\Java.Interop.Tools.TypeNameMappings.projitems')" />
315-
<Import Project="..\Xamarin.Android.NamingCustomAttributes\Xamarin.Android.NamingCustomAttributes.projitems" Label="Shared" Condition="Exists('..\Xamarin.Android.NamingCustomAttributes\Xamarin.Android.NamingCustomAttributes.projitems')" />
316-
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
317-
<PropertyGroup>
318-
<ImplicitlyExpandDesignTimeFacades>False</ImplicitlyExpandDesignTimeFacades>
319-
<IntermediateOutputPath>$(IntermediateOutputPath)android-$(AndroidApiLevel)\</IntermediateOutputPath>
320-
</PropertyGroup>
321-
<Import Project="Mono.Android.targets" />
322-
<PropertyGroup>
323-
<JavaCallableWrapperAbsAssembly>$([System.IO.Path]::GetFullPath ('$(OutputPath)$(AssemblyName).dll'))</JavaCallableWrapperAbsAssembly>
324-
<JavaCallableWrapperAfterTargets>CoreBuild</JavaCallableWrapperAfterTargets>
325-
</PropertyGroup>
326-
<Import Project="..\..\build-tools\scripts\JavaCallableWrappers.targets" />
327-
<Import Project="$(IntermediateOutputPath)mcw\Mono.Android.projitems" Condition="Exists('$(IntermediateOutputPath)mcw\Mono.Android.projitems')" />
328328
<ItemGroup>
329329
<ProjectReference Include="..\..\build-tools\api-merge\api-merge.csproj">
330330
<Project>{3FC3E78B-F7D4-42EA-BBE8-4535DF42BFF8}</Project>

src/Xamarin.Android.Build.Tasks/MSBuild/Xamarin/Android/Xamarin.Android.Common/ImportAfter/Microsoft.Cpp.Android.targets

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ Copyright (C) 2014 Xamarin. All rights reserved.
5252
<Output TaskParameter="TargetOutputs" ItemName="_NativeAndroidRecipeFiles"/>
5353
</MSBuild>
5454

55-
<MergeApkRecipelists RecipeFiles="@(_NativeAndroidRecipeFiles)" Condition="'@(_NativeAndroidRecipeFiles)' != ''">
55+
<MergeApkRecipelists RecipeFiles="%(_NativeAndroidRecipeFiles.Identity)" Condition="'@(_NativeAndroidRecipeFiles)' != '' And Exists('%(_NativeAndroidRecipeFiles.Identity)')">
5656
<Output TaskParameter="SOLibPaths" ItemName="NativeLibraryPaths" />
5757
<Output TaskParameter="AndroidArchitecture" PropertyName="NativeLibraryAbi" />
5858
<Output TaskParameter="HasMismatchedConfigurations" PropertyName="NativeHasMismatchedConfigurations" />

src/Xamarin.Android.Build.Tasks/Tasks/ResolveLibraryProjectImports.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -200,6 +200,9 @@ void Extract (
200200
resolvedResourceDirectories.Add (resDir);
201201
if (Directory.Exists (assemblyDir))
202202
resolvedAssetDirectories.Add (assemblyDir);
203+
foreach (var env in Directory.EnumerateFiles (importsDir, "__AndroidEnvironment__*", SearchOption.TopDirectoryOnly)) {
204+
resolvedEnvironments.Add (env);
205+
}
203206
continue;
204207
}
205208

src/Xamarin.Android.Build.Tasks/Tests/Xamarin.Android.Build.Tests/AndroidUpdateResourcesTest.cs

Lines changed: 20 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -383,7 +383,7 @@ public void CheckResourceDesignerIsUpdatedWhenReadOnly (bool isRelease, ProjectL
383383
};
384384
using (var b = CreateApkBuilder ("temp/CheckResourceDesignerIsUpdatedWhenReadOnly")) {
385385
Assert.IsTrue (b.Build (proj), "Build should have succeeded.");
386-
var designerPath = Path.Combine (Root, b.ProjectDirectory, "Resources", "Resource.designer" + language.DefaultExtension);
386+
var designerPath = Path.Combine (Root, b.ProjectDirectory, "Resources", "Resource.designer" + language.DefaultDesignerExtension);
387387
var attr = File.GetAttributes (designerPath);
388388
File.SetAttributes (designerPath, FileAttributes.ReadOnly);
389389
Assert.IsTrue ((File.GetAttributes (designerPath) & FileAttributes.ReadOnly) == FileAttributes.ReadOnly,
@@ -400,25 +400,28 @@ public void CheckResourceDesignerIsUpdatedWhenReadOnly (bool isRelease, ProjectL
400400
[TestCaseSource("ReleaseLanguage")]
401401
public void CheckOldResourceDesignerIsNotUsed (bool isRelease, ProjectLanguage language)
402402
{
403+
if (language == XamarinAndroidProjectLanguage.FSharp)
404+
Assert.Ignore ("Skipping CheckOldResourceDesignerIsNotUsed for FSharp until Xamarin.Android.FSharp.ResourceProvider supports it.");
403405
var proj = new XamarinAndroidApplicationProject () {
404406
Language = language,
405407
IsRelease = isRelease,
406408
};
407409
proj.SetProperty ("AndroidUseIntermediateDesignerFile", "True");
408410
using (var b = CreateApkBuilder ("temp/CheckOldResourceDesignerIsNotUsed")) {
409-
var designer = proj.Sources.First (x => x.Include() == "Resources\\Resource.designer" + proj.Language.DefaultExtension);
410-
designer.Deleted = true;
411+
var designer = Path.Combine ("Resources", "Resource.designer" + proj.Language.DefaultDesignerExtension);
412+
if (File.Exists (designer))
413+
File.Delete (Path.Combine (Root, b.ProjectDirectory, designer));
411414
Assert.IsTrue (b.Build (proj), "Build should have succeeded.");
412415
Assert.IsFalse (File.Exists (Path.Combine (b.ProjectDirectory, "Resources",
413-
"Resource.designer" + proj.Language.DefaultExtension)),
414-
"{0} should not exists", designer.Include ());
416+
"Resource.designer" + proj.Language.DefaultDesignerExtension)),
417+
"{0} should not exists", designer);
415418
var outputFile = Path.Combine (Root, b.ProjectDirectory, proj.IntermediateOutputPath,
416-
"Resource.Designer" + proj.Language.DefaultExtension);
419+
"Resource.Designer" + proj.Language.DefaultDesignerExtension);
417420
Assert.IsTrue (File.Exists (outputFile), "Resource.Designer{1} should have been created in {0}",
418-
proj.IntermediateOutputPath, proj.Language.DefaultExtension);
421+
proj.IntermediateOutputPath, proj.Language.DefaultDesignerExtension);
419422
Assert.IsTrue (b.Clean (proj), "Clean should have succeeded.");
420423
Assert.IsFalse (File.Exists (outputFile), "Resource.Designer{1} should have been cleaned in {0}",
421-
proj.IntermediateOutputPath, proj.Language.DefaultExtension);
424+
proj.IntermediateOutputPath, proj.Language.DefaultDesignerExtension);
422425
}
423426
}
424427

@@ -427,26 +430,30 @@ public void CheckOldResourceDesignerIsNotUsed (bool isRelease, ProjectLanguage l
427430
[TestCaseSource("ReleaseLanguage")]
428431
public void CheckOldResourceDesignerWithWrongCasingIsRemoved (bool isRelease, ProjectLanguage language)
429432
{
433+
if (language == XamarinAndroidProjectLanguage.FSharp)
434+
Assert.Ignore ("Skipping CheckOldResourceDesignerIsNotUsed for FSharp until Xamarin.Android.FSharp.ResourceProvider supports it.");
430435
var proj = new XamarinAndroidApplicationProject () {
431436
Language = language,
432437
IsRelease = isRelease,
433438
};
434439
proj.SetProperty ("AndroidUseIntermediateDesignerFile", "True");
435440
proj.SetProperty ("AndroidResgenFile", "Resources\\Resource.Designer" + proj.Language.DefaultExtension);
436441
using (var b = CreateApkBuilder ("temp/CheckOldResourceDesignerWithWrongCasingIsRemoved")) {
437-
var designer = proj.Sources.First (x => x.Include() == "Resources\\Resource.designer" + proj.Language.DefaultExtension);
442+
var designer = proj.Sources.FirstOrDefault (x => x.Include() == "Resources\\Resource.designer" + proj.Language.DefaultDesignerExtension);
443+
designer = designer ?? proj.OtherBuildItems.FirstOrDefault (x => x.Include () == "Resources\\Resource.designer" + proj.Language.DefaultDesignerExtension);
444+
Assert.IsNotNull (designer, $"Failed to retrieve the Resource.designer.{proj.Language.DefaultDesignerExtension}");
438445
designer.Deleted = true;
439446
Assert.IsTrue (b.Build (proj), "Build should have succeeded.");
440447
Assert.IsFalse (File.Exists (Path.Combine (b.ProjectDirectory, "Resources",
441-
"Resource.designer" + proj.Language.DefaultExtension)),
448+
"Resource.designer" + proj.Language.DefaultDesignerExtension)),
442449
"{0} should not exists", designer.Include ());
443450
var outputFile = Path.Combine (Root, b.ProjectDirectory, proj.IntermediateOutputPath,
444-
"Resource.Designer" + proj.Language.DefaultExtension);
451+
"Resource.Designer" + proj.Language.DefaultDesignerExtension);
445452
Assert.IsTrue (File.Exists (outputFile), "Resource.Designer{1} should have been created in {0}",
446-
proj.IntermediateOutputPath, proj.Language.DefaultExtension);
453+
proj.IntermediateOutputPath, proj.Language.DefaultDesignerExtension);
447454
Assert.IsTrue (b.Clean (proj), "Clean should have succeeded.");
448455
Assert.IsFalse (File.Exists (outputFile), "Resource.Designer{1} should have been cleaned in {0}",
449-
proj.IntermediateOutputPath, proj.Language.DefaultExtension);
456+
proj.IntermediateOutputPath, proj.Language.DefaultDesignerExtension);
450457
}
451458
}
452459

src/Xamarin.Android.Build.Tasks/Tests/Xamarin.Android.Build.Tests/BuildTest.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -735,7 +735,7 @@ public void CheckJavaError ()
735735
using (var b = CreateApkBuilder ("temp/CheckJavaError")) {
736736
b.ThrowOnBuildFailure = false;
737737
Assert.IsFalse (b.Build (proj), "Build should have failed.");
738-
if (b.RunXBuild) {
738+
if (b.IsUnix) {
739739
var text = "TestMe.java(1,8): javacerror : error: class, interface, or enum expected";
740740
if (b.RunningMSBuild)
741741
text = "TestMe.java(1,8): javac error : error: class, interface, or enum expected";

src/Xamarin.Android.Build.Tasks/Tests/Xamarin.ProjectTools/Android/KnownPackages.cs

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -238,6 +238,27 @@ public static class KnownPackages
238238
},
239239
}
240240
};
241+
public static Package FSharp_Core_Latest = new Package {
242+
Id = "FSharp.Core",
243+
Version = "4.0.0.1",
244+
TargetFramework = "monoandroid71",
245+
References = {
246+
new BuildItem.Reference ("mscorlib"),
247+
new BuildItem.Reference ("FSharp.Core") {
248+
MetadataValues = "HintPath=..\\packages\\FSharp.Core.4.0.0.1\\lib\\portable-net45+monoandroid10+monotouch10+xamarinios10\\FSharp.Core.dll"
249+
},
250+
}
251+
};
252+
public static Package Xamarin_Android_FSharp_ResourceProvider_Runtime = new Package {
253+
Id = "Xamarin.Android.FSharp.ResourceProvider",
254+
Version = "1.0.0.13",
255+
TargetFramework = "monoandroid71",
256+
References = {
257+
new BuildItem.Reference ("FSharp.Core") {
258+
MetadataValues = "HintPath=..\\packages\\Xamarin.Android.FSharp.ResourceProvider.1.0.0.13\\lib\\Xamarin.Android.FSharp.ResourceProvider.Runtime.dll"
259+
},
260+
}
261+
};
241262
}
242263
}
243264

src/Xamarin.Android.Build.Tasks/Tests/Xamarin.ProjectTools/Android/XamarinAndroidApplicationProject.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,10 +39,12 @@ public XamarinAndroidApplicationProject (string debugConfigurationName = "Debug"
3939
SetProperty ("AndroidApplication", "True");
4040

4141
SetProperty ("AndroidResgenClass", "Resource");
42-
SetProperty ("AndroidResgenFile", () => "Resources\\Resource.designer" + Language.DefaultExtension);
42+
SetProperty ("AndroidResgenFile", () => "Resources\\Resource.designer" + Language.DefaultDesignerExtension);
4343
SetProperty ("AndroidManifest", "Properties\\AndroidManifest.xml");
4444
SetProperty (DebugProperties, "AndroidLinkMode", "None");
4545
SetProperty (ReleaseProperties, "AndroidLinkMode", "SdkOnly");
46+
SetProperty (DebugProperties, "EmbedAssembliesIntoApk", "False");
47+
SetProperty (ReleaseProperties, "EmbedAssembliesIntoApk", "True");
4648

4749
AndroidManifest = default_android_manifest;
4850
LayoutMain = default_layout_main;

src/Xamarin.Android.Build.Tasks/Tests/Xamarin.ProjectTools/Android/XamarinAndroidCommonProject.cs

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@ public abstract class XamarinAndroidCommonProject : XamarinAndroidProject
1717
public static readonly byte[] icon_binary_xxhdpi;
1818
public static readonly byte[] icon_binary_xxxhdpi;
1919

20+
BuildItem.Source resourceDesigner;
21+
2022
static byte[] ScaleIcon (Image image, int width, int height)
2123
{
2224
float scale = Math.Min (width / image.Width, height / image.Height);
@@ -56,8 +58,8 @@ protected XamarinAndroidCommonProject (string debugConfigurationName = "Debug",
5658
{
5759
AndroidResources = new List<BuildItem> ();
5860
ItemGroupList.Add (AndroidResources);
59-
60-
Sources.Add (new BuildItem.Source (() => "Resources\\Resource.designer" + Language.DefaultExtension) { TextContent = () => string.Empty });
61+
resourceDesigner = new BuildItem.Source (() => "Resources\\Resource.designer" + Language.DefaultDesignerExtension) { TextContent = () => string.Empty };
62+
Sources.Add (resourceDesigner);
6163
AndroidResources.Add (new AndroidItem.AndroidResource ("Resources\\drawable-mdpi\\Icon.png") { BinaryContent = () => icon_binary_mdpi });
6264
AndroidResources.Add (new AndroidItem.AndroidResource ("Resources\\drawable-hdpi\\Icon.png") { BinaryContent = () => icon_binary_hdpi });
6365
AndroidResources.Add (new AndroidItem.AndroidResource ("Resources\\drawable-xhdpi\\Icon.png") { BinaryContent = () => icon_binary_xhdpi });
@@ -78,5 +80,21 @@ public override ProjectRootElement Construct ()
7880
root.AddImport (import.Project ());
7981
return root;
8082
}
83+
84+
public override ProjectLanguage Language {
85+
get {
86+
return base.Language;
87+
}
88+
set {
89+
base.Language = value;
90+
if (value == XamarinAndroidProjectLanguage.FSharp) {
91+
// add the stuff needed for FSharp
92+
Packages.Add (KnownPackages.FSharp_Core_Latest);
93+
Packages.Add (KnownPackages.Xamarin_Android_FSharp_ResourceProvider_Runtime);
94+
Sources.Remove (resourceDesigner);
95+
OtherBuildItems.Add (new BuildItem.NoActionResource (() => "Resources\\Resource.designer" + Language.DefaultDesignerExtension) { TextContent = () => string.Empty });
96+
}
97+
}
98+
}
8199
}
82100
}

0 commit comments

Comments
 (0)