Skip to content

Commit

Permalink
fix: Remove deprecated GenerateBuild for VS2022 compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
jeromelaban committed Nov 19, 2021
1 parent d813951 commit b8cf02a
Show file tree
Hide file tree
Showing 5 changed files with 2 additions and 10 deletions.
2 changes: 1 addition & 1 deletion build/ci/.azure-devops-android-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ jobs:
msbuildLocationMethod: version
msbuildVersion: latest
msbuildArchitecture: x86
msbuildArguments: /m /r /p:Configuration=Release /p:IsUiAutomationMappingEnabled=true
msbuildArguments: /m /r /p:Configuration=Release /p:IsUiAutomationMappingEnabled=true /p:AndroidBuildApplicationPackage=True
clean: false
maximumCpuCount: true
restoreNugetPackages: false
Expand Down
4 changes: 1 addition & 3 deletions doc/articles/get-started-rider.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,7 @@ You should now have a folder structure that looks like this:
![rider-folder-structure](Assets/quick-start/rider-folder-structure.JPG)

### Android
1. Remove the following line from the `YourProject.Droid.csproj` file:
`<Target Name="GenerateBuild" DependsOnTargets="SignAndroidPackage" AfterTargets="Build" Condition="'$(BuildingInsideVisualStudio)'==''" />`
2. Set Android as your startup project. Run.
1. Set Android as your startup project. Run.
![run-android-rider](Assets/quick-start/run-android-rider.JPG)

Note: Whether you're using a physical device or the emulator, the app will install but will not automatically open.
Expand Down
1 change: 0 additions & 1 deletion src/SamplesApp/SamplesApp.Droid/SamplesApp.Droid.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,6 @@
<Import Project="$(MSBuildExtensionsPath)\Xamarin\Android\Xamarin.Android.CSharp.targets" />
<Import Project="..\Benchmarks.Shared\Benchmarks.Shared.projitems" Label="Shared" />
<Import Project="..\SamplesApp.UnitTests.Shared\SamplesApp.UnitTests.targets" />
<Target Name="GenerateBuild" DependsOnTargets="SignAndroidPackage" AfterTargets="Build" Condition="'$(BuildingInsideVisualStudio)'=='' and '$(UnoSampleAppDisableAPKGeneration)'==''" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,4 @@
</ItemGroup>
<Import Project="..\BlankApp.Shared\BlankApp.Shared.projitems" Label="Shared" Condition="Exists('..\BlankApp.Shared\BlankApp.Shared.projitems')" />
<Import Project="$(MSBuildExtensionsPath)\Xamarin\Android\Xamarin.Android.CSharp.targets" />
<!-- This will force the generation of the APK when not building inside visual studio -->
<Target Name="GenerateBuild" DependsOnTargets="SignAndroidPackage" AfterTargets="Build" Condition="'$(BuildingInsideVisualStudio)'==''" />
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -97,9 +97,6 @@
<Import Project="..\$ext_safeprojectname$.Shared\$ext_safeprojectname$.Shared.projitems" Label="Shared" />
<Import Project="$(MSBuildExtensionsPath)\Xamarin\Android\Xamarin.Android.CSharp.targets" />

<!-- This will force the generation of the APK when not building inside visual studio -->
<Target Name="GenerateBuild" DependsOnTargets="SignAndroidPackage" AfterTargets="Build" Condition="'$(BuildingInsideVisualStudio)'==''" />

<Target Name="Issue3897Workaround"
Condition=" '$(ManagedDesignTimeBuild)' == 'True' "
AfterTargets="_RemoveLegacyDesigner">
Expand Down

0 comments on commit b8cf02a

Please sign in to comment.