Skip to content

Commit b66d011

Browse files
authored
Revert publishing files (#8594)
1 parent 02e1a3b commit b66d011

File tree

2 files changed

+107
-29
lines changed

2 files changed

+107
-29
lines changed

src/Tools/dotnet-monitor/dotnet-monitor.csproj

Lines changed: 46 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -93,38 +93,55 @@
9393
<Import Project="$(RepoRoot)src\Microsoft.Diagnostics.Monitoring.StartupHook\ProjectsToPublish.props" />
9494
<Import Project="$(RepositoryEngineeringDir)PublishProjects.targets" />
9595

96-
<ItemGroup Label="Computed Publish Assets">
97-
<!-- Pack the profiler library for each platform. -->
98-
<AdditionalRIDSpecificPublishFile
99-
Include="@(MonitorProfilerLibraryFile);
100-
@(MutatingMonitorProfilerLibraryFile);
101-
@(MonitorProfilerSymbolsFile);
102-
@(MutatingMonitorProfilerSymbolsFile);
103-
@(CommonMonitorProfilerSymbolsFile);
104-
">
105-
<RelativePath>shared/%(TargetRid)/native/%(Filename)%(Extension)</RelativePath>
106-
</AdditionalRIDSpecificPublishFile>
107-
108-
<!-- Pack startup hook files -->
109-
<AdditionalRIDAgnosticPublishFile Include="$(StartupHookLibraryPath);$(StartupHookSymbolsPath)">
110-
<RelativePath>shared/any/$(StartupHookTargetFramework)/%(FileName)%(Extension)</RelativePath>
111-
</AdditionalRIDAgnosticPublishFile>
96+
<!-- Publish projects unless skipped -->
97+
<Target Name="PublishProjectsBeforePack"
98+
Condition="'$(SkipPublishProjects)' != 'true'">
99+
<CallTarget Targets="PublishProjects" />
100+
</Target>
112101

113-
<!-- Pack extension files -->
114-
<AdditionalRIDAgnosticPublishFile Include="$(AzureBlobStoragePublishRootPath)$(TargetFramework)\any\**">
115-
<RelativePath>extensions/$(AzureBlobStorageExtensionFolderName)/%(RecursiveDir)%(FileName)%(Extension)</RelativePath>
116-
</AdditionalRIDAgnosticPublishFile>
117-
<AdditionalRIDAgnosticPublishFile Include="$(S3StoragePublishRootPath)$(TargetFramework)\any\**">
118-
<RelativePath>extensions/$(S3StorageExtensionFolderName)/%(RecursiveDir)%(FileName)%(Extension)</RelativePath>
119-
</AdditionalRIDAgnosticPublishFile>
120-
</ItemGroup>
102+
<PropertyGroup>
103+
<TargetsForTfmSpecificContentInPackage>$(TargetsForTfmSpecificContentInPackage);CollectTfmSpecificPackageFiles</TargetsForTfmSpecificContentInPackage>
104+
</PropertyGroup>
121105

122-
<Target Name="AddNativeAssetsToPublishLayout"
123-
BeforeTargets="ComputeResolvedFilesToPublishList">
106+
<Target Name="CollectTfmSpecificPackageFiles"
107+
DependsOnTargets="PublishProjectsBeforePack">
108+
<ItemGroup>
109+
<!-- Pack the profiler library for each platform. -->
110+
<AdditionalPackageFile Include="@(MonitorProfilerLibraryFile)">
111+
<PackagePath>tools/$(TargetFramework)/any/shared/%(TargetRid)/native</PackagePath>
112+
</AdditionalPackageFile>
113+
<AdditionalPackageFile Include="@(MutatingMonitorProfilerLibraryFile)">
114+
<PackagePath>tools/$(TargetFramework)/any/shared/%(TargetRid)/native</PackagePath>
115+
</AdditionalPackageFile>
116+
<!-- Pack the profiler symbols for each platform. -->
117+
<AdditionalPackageFile Include="@(MonitorProfilerSymbolsFile)">
118+
<PackagePath>tools/$(TargetFramework)/any/shared/%(TargetRid)/native</PackagePath>
119+
</AdditionalPackageFile>
120+
<AdditionalPackageFile Include="@(MutatingMonitorProfilerSymbolsFile)">
121+
<PackagePath>tools/$(TargetFramework)/any/shared/%(TargetRid)/native</PackagePath>
122+
</AdditionalPackageFile>
123+
<AdditionalPackageFile Include="@(CommonMonitorProfilerSymbolsFile)">
124+
<PackagePath>tools/$(TargetFramework)/any/shared/%(TargetRid)/native</PackagePath>
125+
</AdditionalPackageFile>
126+
</ItemGroup>
124127
<ItemGroup>
125-
<ResolvedFileToPublish Include="@(AdditionalRIDSpecificPublishFile->Exists());@(AdditionalRIDAgnosticPublishFile)">
126-
<CopyFileToPublishDirectory>PreserveNewest</CopyFileToPublishDirectory>
127-
</ResolvedFileToPublish>
128+
<!-- Pack the file if it exists. -->
129+
<TfmSpecificPackageFile Include="@(AdditionalPackageFile->Exists())" />
130+
<!-- Pack startup hook files -->
131+
<TfmSpecificPackageFile Include="$(StartupHookLibraryPath)">
132+
<PackagePath>tools/$(TargetFramework)/any/shared/any/$(StartupHookTargetFramework)</PackagePath>
133+
</TfmSpecificPackageFile>
134+
<TfmSpecificPackageFile Include="$(StartupHookSymbolsPath)">
135+
<PackagePath>tools/$(TargetFramework)/any/shared/any/$(StartupHookTargetFramework)</PackagePath>
136+
</TfmSpecificPackageFile>
137+
138+
<!-- Pack extension files -->
139+
<TfmSpecificPackageFile Include="$(AzureBlobStoragePublishRootPath)$(TargetFramework)\any\**">
140+
<PackagePath>tools/$(TargetFramework)/any/extensions/$(AzureBlobStorageExtensionFolderName)</PackagePath>
141+
</TfmSpecificPackageFile>
142+
<TfmSpecificPackageFile Include="$(S3StoragePublishRootPath)$(TargetFramework)\any\**">
143+
<PackagePath>tools/$(TargetFramework)/any/extensions/$(S3StorageExtensionFolderName)</PackagePath>
144+
</TfmSpecificPackageFile>
128145
</ItemGroup>
129146
</Target>
130147

src/archives/dotnet-monitor-base/Package.props

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,73 @@
1111
<ItemGroup>
1212
<FileToArchive Include="$(RepoRoot)LICENSE.TXT" />
1313
<FileToArchive Include="$(ThirdPartyNoticesFilePath)" Condition="Exists('$(ThirdPartyNoticesFilePath)')" />
14+
<!-- Include the profiler for the current platform. -->
15+
<FileToArchive Include="@(MonitorProfilerLibraryFile->WithMetadataValue('TargetRid', '$(RuntimeIdentifier)'))">
16+
<PackagePath>shared\$(RuntimeIdentifier)\native\</PackagePath>
17+
</FileToArchive>
18+
<FileToArchive Include="@(MutatingMonitorProfilerLibraryFile->WithMetadataValue('TargetRid', '$(RuntimeIdentifier)'))">
19+
<PackagePath>shared\$(RuntimeIdentifier)\native\</PackagePath>
20+
</FileToArchive>
21+
<!-- For linux, include both musl and glib variants; thus include the profiler for the other variant. -->
22+
<FileToArchive Include="@(MonitorProfilerLibraryFile->WithMetadataValue('TargetRid', 'linux-arm64'))"
23+
Condition="'$(RuntimeIdentifier)' == 'linux-musl-arm64'">
24+
<PackagePath>shared\linux-arm64\native\</PackagePath>
25+
</FileToArchive>
26+
<FileToArchive Include="@(MutatingMonitorProfilerLibraryFile->WithMetadataValue('TargetRid', 'linux-arm64'))"
27+
Condition="'$(RuntimeIdentifier)' == 'linux-musl-arm64'">
28+
<PackagePath>shared\linux-arm64\native\</PackagePath>
29+
</FileToArchive>
30+
<FileToArchive Include="@(MonitorProfilerLibraryFile->WithMetadataValue('TargetRid', 'linux-x64'))"
31+
Condition="'$(RuntimeIdentifier)' == 'linux-musl-x64'">
32+
<PackagePath>shared\linux-x64\native\</PackagePath>
33+
</FileToArchive>
34+
<FileToArchive Include="@(MutatingMonitorProfilerLibraryFile->WithMetadataValue('TargetRid', 'linux-x64'))"
35+
Condition="'$(RuntimeIdentifier)' == 'linux-musl-x64'">
36+
<PackagePath>shared\linux-x64\native\</PackagePath>
37+
</FileToArchive>
38+
<FileToArchive Include="@(MonitorProfilerLibraryFile->WithMetadataValue('TargetRid', 'linux-musl-arm64'))"
39+
Condition="'$(RuntimeIdentifier)' == 'linux-arm64'">
40+
<PackagePath>shared\linux-musl-arm64\native\</PackagePath>
41+
</FileToArchive>
42+
<FileToArchive Include="@(MutatingMonitorProfilerLibraryFile->WithMetadataValue('TargetRid', 'linux-musl-arm64'))"
43+
Condition="'$(RuntimeIdentifier)' == 'linux-arm64'">
44+
<PackagePath>shared\linux-musl-arm64\native\</PackagePath>
45+
</FileToArchive>
46+
<FileToArchive Include="@(MonitorProfilerLibraryFile->WithMetadataValue('TargetRid', 'linux-musl-x64'))"
47+
Condition="'$(RuntimeIdentifier)' == 'linux-x64'">
48+
<PackagePath>shared\linux-musl-x64\native\</PackagePath>
49+
</FileToArchive>
50+
<FileToArchive Include="@(MutatingMonitorProfilerLibraryFile->WithMetadataValue('TargetRid', 'linux-musl-x64'))"
51+
Condition="'$(RuntimeIdentifier)' == 'linux-x64'">
52+
<PackagePath>shared\linux-musl-x64\native\</PackagePath>
53+
</FileToArchive>
54+
55+
<!-- Startup hook assemblies -->
56+
<FileToArchive Include="$(StartupHookLibraryPath)">
57+
<PackagePath>shared\any\$(StartupHookTargetFramework)\</PackagePath>
58+
</FileToArchive>
1459
<!-- Hosting startup assemblies -->
1560
<FileToArchive Include="$(HostingStartupLibraryPath)">
1661
<PackagePath>shared\any\$(HostingStartupTargetFramework)\</PackagePath>
1762
</FileToArchive>
1863
</ItemGroup>
1964
<ItemGroup>
65+
<!-- Do not include symbols for the extra native assemblies since they have their own symbols package. -->
66+
<SymbolFileToArchive Include="@(MonitorProfilerSymbolsFile->WithMetadataValue('TargetRid', '$(RuntimeIdentifier)'))">
67+
<PackagePath>shared\$(RuntimeIdentifier)\native\</PackagePath>
68+
</SymbolFileToArchive>
69+
<SymbolFileToArchive Include="@(MutatingMonitorProfilerSymbolsFile->WithMetadataValue('TargetRid', '$(RuntimeIdentifier)'))">
70+
<PackagePath>shared\$(RuntimeIdentifier)\native\</PackagePath>
71+
</SymbolFileToArchive>
72+
<!-- Symbols are not created for static libraries on non-Windows platforms -->
73+
<SymbolFileToArchive Include="@(CommonMonitorProfilerSymbolsFile->WithMetadataValue('TargetRid', '$(RuntimeIdentifier)'))"
74+
Condition="$(RuntimeIdentifier.Contains(win))">
75+
<PackagePath>shared\$(RuntimeIdentifier)\native\</PackagePath>
76+
</SymbolFileToArchive>
77+
<!-- Startup hook symbols -->
78+
<SymbolFileToArchive Include="$(StartupHookSymbolsPath)">
79+
<PackagePath>shared\any\$(StartupHookTargetFramework)\</PackagePath>
80+
</SymbolFileToArchive>
2081
<!-- Hosting startup symbols -->
2182
<SymbolFileToArchive Include="$(HostingStartupSymbolsPath)">
2283
<PackagePath>shared\any\$(HostingStartupTargetFramework)\</PackagePath>

0 commit comments

Comments
 (0)