Skip to content

Commit

Permalink
[Xamarin.Android.Build.Tasks] remove pdb2mdb
Browse files Browse the repository at this point in the history
Remove where we `ILRepack` `pdb2mdb.exe` into
`Xamarin.Android.Build.Tasks.dll` and the `<ConvertDebuggingFiles/>`
MSBuild task. These are not used in .NET 6+, and can be removed in
xamarin-android/main.

In future PRs, I think we can remove:

* `ILRepack` completely
* `Xamarin.Android.Legacy.targets`
* Other unused MSBuild tasks
  • Loading branch information
jonathanpeppers committed Apr 11, 2023
1 parent 0b1fb83 commit 8c1cefc
Show file tree
Hide file tree
Showing 5 changed files with 1 addition and 84 deletions.
44 changes: 0 additions & 44 deletions src/Xamarin.Android.Build.Tasks/Tasks/ConvertDebuggingFiles.cs

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,6 @@
</PropertyGroup>

<ItemGroup>
<Reference Include="pdb2mdb.exe">
<HintPath>$(MicrosoftAndroidSdkOutDir)pdb2mdb.exe</HintPath>
</Reference>
<Reference Include="Mono.CompilerServices.SymbolWriter.dll">
<HintPath>$(MicrosoftAndroidSdkOutDir)Mono.CompilerServices.SymbolWriter.dll</HintPath>
</Reference>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,6 @@
<InputAssemblies Include="$(OutputPath)NuGet.Versioning.dll" />
<InputAssemblies Include="$(OutputPath)System.Collections.Immutable.dll" />
<InputAssemblies Include="$(OutputPath)System.Reflection.Metadata.dll" />
<InputAssemblies Include="$(OutputPath)pdb2mdb.exe" />
</ItemGroup>

<Target Name="ILRepacker"
Expand Down
10 changes: 0 additions & 10 deletions src/Xamarin.Android.Build.Tasks/Xamarin.Android.Common.targets
Original file line number Diff line number Diff line change
Expand Up @@ -356,7 +356,6 @@ Copyright (C) 2011-2012 Xamarin. All rights reserved.
.pdb;
.xml;
.dll.config;
.dll.mdb;
</AllowedReferenceRelatedFileExtensions>
</PropertyGroup>

Expand Down Expand Up @@ -405,15 +404,6 @@ Copyright (C) 2011-2012 Xamarin. All rights reserved.
/>
</Target>

<!-- When looking for related files to copy, look for Mono debugging files as well -->
<PropertyGroup>
<AllowedReferenceRelatedFileExtensions>
$(AllowedReferenceRelatedFileExtensions);
.dll.mdb;
.exe.mdb
</AllowedReferenceRelatedFileExtensions>
</PropertyGroup>

<ItemGroup>
<AndroidCustomMetaDataForReferences Include="@(_AndroidAssemblySkipCases)" />
</ItemGroup>
Expand Down
27 changes: 1 addition & 26 deletions src/Xamarin.Android.Build.Tasks/Xamarin.Android.Legacy.targets
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,6 @@ projects. .NET 5 projects will not import this file.
</PropertyGroup>

<UsingTask TaskName="Xamarin.Android.Tasks.CheckGoogleSdkRequirements" AssemblyFile="Xamarin.Android.Build.Tasks.dll" />
<UsingTask TaskName="Xamarin.Android.Tasks.ConvertDebuggingFiles" AssemblyFile="Xamarin.Android.Build.Tasks.dll" />
<UsingTask TaskName="Xamarin.Android.Tasks.CreateLibraryResourceArchive" AssemblyFile="Xamarin.Android.Build.Tasks.dll" />
<UsingTask TaskName="Xamarin.Android.Tasks.CreateManagedLibraryResourceArchive" AssemblyFile="Xamarin.Android.Build.Tasks.dll" />
<UsingTask TaskName="Xamarin.Android.Tasks.CreateNativeLibraryArchive" AssemblyFile="Xamarin.Android.Build.Tasks.dll" />
Expand Down Expand Up @@ -388,17 +387,10 @@ projects. .NET 5 projects will not import this file.
<Output TaskParameter="PdbFiles" ItemName="_ResolvedPdbFiles" />
<Output TaskParameter="PortablePdbFiles" ItemName="_ResolvedPortablePdbFiles" />
</CollectPdbFiles>
<ItemGroup>
<_ConvertedMdbFiles Include="@(_ResolvedPdbFiles->'%(RootDir)%(Directory)%(Filename).dll.mdb')" />
</ItemGroup>
</Target>

<Target Name="_ConvertPdbFiles"
Inputs="@(_ResolvedPdbFiles)"
Outputs="@(_ConvertedMdbFiles)"
DependsOnTargets="_CollectPdbFiles">
<ConvertDebuggingFiles Files="@(_ResolvedPdbFiles)" />
<Touch Files="@(_ConvertedMdbFiles)" ContinueOnError="true" />
<ItemGroup>
<!-- NOTE: @(_ResolvedPortablePdbFiles) are valid -->
<_DeprecatedSymbols Include="@(_ResolvedMdbFiles);@(_ResolvedPdbFiles)" />
Expand All @@ -408,26 +400,9 @@ projects. .NET 5 projects will not import this file.
FormatArguments="%(_DeprecatedSymbols.FileName)%(_DeprecatedSymbols.Extension)"
Condition=" '%(_DeprecatedSymbols.Identity)' != '' "
/>
<ItemGroup>
<FileWrites Include="@(_ConvertedMdbFiles)" />
</ItemGroup>
</Target>

<Target Name="ConvertDebuggingFiles"
Condition=" '$(AndroidIncludeDebugSymbols)' == 'true' And Exists ('$(_IntermediatePdbFile)') And '$(OS)' == 'Windows_NT'"
DependsOnTargets="_ConvertDebuggingFiles"
/>

<Target Name="_ConvertDebuggingFiles"
Inputs="$(OutDir)$(TargetFileName);$(_IntermediatePdbFile)"
Outputs="$(OutDir)$(TargetFileName).mdb"
DependsOnTargets="_ValidateAndroidPackageProperties">
<ConvertDebuggingFiles Files="$(OutDir)$(TargetFileName)" />
<Touch Files="$(OutDir)$(TargetFileName).mdb" />
<ItemGroup>
<FileWrites Include="$(OutDir)$(TargetFileName).mdb" />
</ItemGroup>
</Target>
<Target Name="ConvertDebuggingFiles" />

<Target Name="_AddAndroidEnvironmentToCompile">
<ItemGroup>
Expand Down

0 comments on commit 8c1cefc

Please sign in to comment.