Skip to content

Commit

Permalink
[One .NET] Include symbol files in runtime packs (dotnet#6193)
Browse files Browse the repository at this point in the history
Adds the .pdb files associated with our framework assemblies to the .NET
runtime packs.  This will allow them to be fast deployed or included in
an .aab/.apk for Debug builds.  A couple of symbol related tests have
been updated to also check for Mono.Android.pdb.

* Don't skip net6.0 msbuild smoke tests
  • Loading branch information
pjcollins authored Aug 20, 2021
1 parent 3f052b5 commit 1aac4a0
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ jobs:
testRunTitle: MSBuildDeviceIntegration On Device - macOS - ${{ parameters.job_suffix }}
testAssembly: $(System.DefaultWorkingDirectory)/bin/Test$(XA.Build.Configuration)/MSBuildDeviceIntegration/${{ parameters.target_framework }}/MSBuildDeviceIntegration.dll
nunitConsoleExtraArgs: --where "cat != SystemApplication && cat != TimeZoneInfo && cat != SmokeTests ${{ parameters.nunit_categories }}"
dotNetTestExtraArgs: --filter "TestCategory != TimeZoneInfo & TestCategory != SmokeTests ${{ parameters.nunit_categories }}"
dotNetTestExtraArgs: --filter "TestCategory != TimeZoneInfo ${{ parameters.nunit_categories }}"
testResultsFile: TestResult-MSBuildDeviceIntegration-${{ parameters.job_name }}-$(XA.Build.Configuration).xml

- task: MSBuild@1
Expand Down
1 change: 1 addition & 0 deletions build-tools/create-packs/Microsoft.Android.Runtime.proj
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ projects that use the Microsoft.Android framework in .NET 5.

<ItemGroup>
<_PackageFiles Include="@(_AndroidRuntimePackAssemblies)" PackagePath="$(_AndroidRuntimePackAssemblyPath)" TargetPath="$(_AndroidRuntimePackAssemblyPath)" />
<_PackageFiles Include="@(_AndroidRuntimePackAssemblies->'%(RelativeDir)%(Filename).pdb')" PackagePath="$(_AndroidRuntimePackAssemblyPath)" />
<_PackageFiles Include="@(_AndroidRuntimePackAssets)" PackagePath="$(_AndroidRuntimePackNativePath)" TargetPath="$(_AndroidRuntimePackNativePath)" IsNative="true" />
</ItemGroup>
</Target>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1435,6 +1435,9 @@ public Class2 ()
var outputPath = Path.Combine (Root, b.ProjectDirectory, proj.OutputPath);
var assetsPdb = Path.Combine (intermediate, "android", "assets", "Library1.pdb");
var binSrc = Path.Combine (outputPath, "Library1.pdb");
Assert.IsTrue (
File.Exists (Path.Combine (intermediate, "android", "assets", "Mono.Android.pdb")),
"Mono.Android.pdb must be copied to Intermediate directory");
Assert.IsTrue (
File.Exists (assetsPdb),
"Library1.pdb must be copied to Intermediate directory");
Expand Down
4 changes: 3 additions & 1 deletion tests/MSBuildDeviceIntegration/Tests/DebuggingTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -361,11 +361,13 @@ public Foo ()
Assert.True (appBuilder.Install (app, parameters: parameters.ToArray ()), "App should have installed.");

if (!embedAssemblies) {
// Check that we deployed .pdb files
// Check that we deployed app and framework .pdb files
StringAssertEx.ContainsRegex ($@"NotifySync CopyFile.+{app.ProjectName}\.pdb", appBuilder.LastBuildOutput,
$"{app.ProjectName}.pdb should be deployed!");
StringAssertEx.ContainsRegex ($@"NotifySync CopyFile.+{lib.ProjectName}\.pdb", appBuilder.LastBuildOutput,
$"{lib.ProjectName}.pdb should be deployed!");
StringAssertEx.ContainsRegex ($@"NotifySync CopyFile.+Mono.Android\.pdb", appBuilder.LastBuildOutput,
$"Mono.Android.pdb should be deployed!");
}

int breakcountHitCount = 0;
Expand Down

0 comments on commit 1aac4a0

Please sign in to comment.