Skip to content
Permalink
Browse files

fix: Android DesignTimeBuild issue with MsBuild.Sdk.Extras (#2137)

* fix: Android DesignTimeBuild issue with MsBuild.Sdk.Extras

* Fixing Resource.Designer issue

* Fixing ReactiveUI.Testing.csproj

* Fixing all projects that target MonoAndroid
  • Loading branch information...
RLittlesII committed Aug 17, 2019
1 parent 33e9eda commit dbc33b8f7fdb3337cc526ab82174e4624e4be7a9
@@ -0,0 +1,7 @@
[Paths]
Tools=./tools
Addins=./tools/Addins
Modules=./tools/Modules

[NuGet]
UseInProcessClient=true
@@ -28,6 +28,7 @@
</PropertyGroup>
<PropertyGroup Condition="$(TargetFramework.StartsWith('MonoAndroid'))">
<DefineConstants>$(DefineConstants);MONO;ANDROID</DefineConstants>
<DesignTimeBuild>false</DesignTimeBuild>
</PropertyGroup>
<PropertyGroup Condition="$(TargetFramework.StartsWith('netcoreapp'))">
<DefineConstants>$(DefineConstants);NETCOREAPP</DefineConstants>
@@ -6,7 +6,13 @@
<PackageId>ReactiveUI.AndroidSupport</PackageId>
<LangVersion>latest</LangVersion>
</PropertyGroup>


<Target Name="_RemoveNonExistingResgenFile" BeforeTargets="CoreCompile" Condition="'$(_SdkSetAndroidResgenFile)' == 'true' And '$(AndroidResgenFile)' != '' And !Exists('$(AndroidResgenFile)')">
<ItemGroup>
<Compile Remove="$(AndroidResgenFile)"/>
</ItemGroup>
</Target>

<ItemGroup>
<PackageReference Include="Xamarin.Android.Support.Animated.Vector.Drawable" Version="27.0.*" />
<PackageReference Include="Xamarin.Android.Support.v4" Version="27.0.*" />
@@ -9,6 +9,12 @@
<NoWarn>$(NoWarn);CS1570;CA1812</NoWarn>
</PropertyGroup>

<Target Name="_RemoveNonExistingResgenFile" BeforeTargets="CoreCompile" Condition="'$(_SdkSetAndroidResgenFile)' == 'true' And '$(AndroidResgenFile)' != '' And !Exists('$(AndroidResgenFile)')">
<ItemGroup>
<Compile Remove="$(AndroidResgenFile)"/>
</ItemGroup>
</Target>

<ItemGroup>
<Compile Remove="*.cs" />
<None Include="*.cs" />
@@ -13,6 +13,12 @@
<IsPackable Condition=" '$(OS)' != 'Windows_NT' ">false</IsPackable>
<LangVersion>latest</LangVersion>
</PropertyGroup>

<Target Name="_RemoveNonExistingResgenFile" BeforeTargets="CoreCompile" Condition="'$(_SdkSetAndroidResgenFile)' == 'true' And '$(AndroidResgenFile)' != '' And !Exists('$(AndroidResgenFile)')">
<ItemGroup>
<Compile Remove="$(AndroidResgenFile)"/>
</ItemGroup>
</Target>

<ItemGroup>
<PackageReference Include="Fody" Version="5.1.1" PrivateAssets="None" />
@@ -53,5 +59,5 @@
<ItemGroup>
<ProjectReference Include="..\ReactiveUI\ReactiveUI.csproj" />
<ProjectReference Include="..\ReactiveUI.Fody\ReactiveUI.Fody.csproj" ReferenceOutputAssembly="False" />
</ItemGroup>
</ItemGroup>
</Project>
@@ -9,6 +9,12 @@
<LangVersion>latest</LangVersion>
</PropertyGroup>

<Target Name="_RemoveNonExistingResgenFile" BeforeTargets="CoreCompile" Condition="'$(_SdkSetAndroidResgenFile)' == 'true' And '$(AndroidResgenFile)' != '' And !Exists('$(AndroidResgenFile)')">
<ItemGroup>
<Compile Remove="$(AndroidResgenFile)"/>
</ItemGroup>
</Target>

<ItemGroup>
<PackageReference Include="Microsoft.Reactive.Testing" Version="4.1.6" />
<ProjectReference Include="..\ReactiveUI\ReactiveUI.csproj" />
@@ -13,6 +13,12 @@
<DefineConstants>HAS_UNO;WASM</DefineConstants>
</PropertyGroup>

<Target Name="_RemoveNonExistingResgenFile" BeforeTargets="CoreCompile" Condition="'$(_SdkSetAndroidResgenFile)' == 'true' And '$(AndroidResgenFile)' != '' And !Exists('$(AndroidResgenFile)')">
<ItemGroup>
<Compile Remove="$(AndroidResgenFile)"/>
</ItemGroup>
</Target>

<ItemGroup Condition=" !$(TargetFramework.StartsWith('uap')) ">
<PackageReference Include="Uno.UI" Version="1.*" />
</ItemGroup>
@@ -9,6 +9,12 @@
<LangVersion>latest</LangVersion>
</PropertyGroup>

<Target Name="_RemoveNonExistingResgenFile" BeforeTargets="CoreCompile" Condition="'$(_SdkSetAndroidResgenFile)' == 'true' And '$(AndroidResgenFile)' != '' And !Exists('$(AndroidResgenFile)')">
<ItemGroup>
<Compile Remove="$(AndroidResgenFile)"/>
</ItemGroup>
</Target>

<ItemGroup>
<Compile Remove="Platforms\**\*.cs" />
<None Include="Platforms\**\*.cs" />

0 comments on commit dbc33b8

Please sign in to comment.
You can’t perform that action at this time.