|
6 | 6 | <Product>Caliburn.Micro</Product> |
7 | 7 | <RootNamespace>Caliburn.Micro</RootNamespace> |
8 | 8 | <AssemblyOriginatorKeyFile>.\..\Caliburn.Micro.snk</AssemblyOriginatorKeyFile> |
| 9 | + <TargetsForTfmSpecificBuildOutput>$(TargetsForTfmSpecificBuildOutput);IncludeProjectReferencesWithPrivateAssetsAttributeInPackage</TargetsForTfmSpecificBuildOutput> |
| 10 | + <TargetsForTfmSpecificContentInPackage>$(TargetsForTfmSpecificContentInPackage);IncludeReferenceAssemblies</TargetsForTfmSpecificContentInPackage> |
9 | 11 | <SignAssembly>true</SignAssembly> |
10 | 12 | <LangVersion>latest</LangVersion> |
| 13 | + <BuildProjectReferences Condition="'$(NoBuild)' == 'true'">false</BuildProjectReferences> |
| 14 | + <!-- Removed the .xml from DefaultAllowedOutputExtensionsInPackageBuildOutputFolder --> |
| 15 | + <DefaultAllowedOutputExtensionsInPackageBuildOutputFolder>.dll; .exe; .winmd; .json; .pri</DefaultAllowedOutputExtensionsInPackageBuildOutputFolder> |
| 16 | + |
| 17 | + <!-- Generate documentation file --> |
| 18 | + <GenerateDocumentationFile>true</GenerateDocumentationFile> |
| 19 | + <!-- Generate symbols package --> |
| 20 | + <IncludeSymbols>false</IncludeSymbols> |
11 | 21 | </PropertyGroup> |
12 | 22 |
|
13 | 23 | <PropertyGroup> |
|
17 | 27 | <PackageReadmeFile>README.md</PackageReadmeFile> |
18 | 28 | </PropertyGroup> |
19 | 29 |
|
| 30 | + |
20 | 31 | <PropertyGroup Condition="'$(Configuration)|$(TargetFramework)|$(Platform)'=='Debug|net8.0|AnyCPU'" /> |
21 | 32 |
|
22 | 33 | <PropertyGroup Condition="'$(Configuration)|$(TargetFramework)|$(Platform)'=='Release|net8.0|AnyCPU'" /> |
|
33 | 44 |
|
34 | 45 | <ItemGroup> |
35 | 46 | <ProjectReference Include="..\Caliburn.Micro.Platform.Core\Caliburn.Micro.Platform.Core.csproj" PrivateAssets="all"> |
36 | | - <ReferenceOutputAssembly>true</ReferenceOutputAssembly> |
37 | | - <IncludeAssets>All</IncludeAssets> |
38 | 47 | </ProjectReference> |
39 | 48 | <ProjectReference Include="..\Caliburn.Micro.Core\Caliburn.Micro.Core.csproj" > |
40 | | - <ReferenceOutputAssembly>true</ReferenceOutputAssembly> |
41 | 49 | </ProjectReference> |
42 | 50 | </ItemGroup> |
43 | 51 | <ItemGroup> |
|
72 | 80 | <PackageReference Update="Nerdbank.GitVersioning" Version="3.7.112" /> |
73 | 81 | </ItemGroup> |
74 | 82 |
|
| 83 | + <Target Name="IncludeProjectReferencesWithPrivateAssetsAttributeInPackage" |
| 84 | + Condition="'@(ProjectReference)' != '' and @(ProjectReference->AnyHaveMetadataValue('PrivateAssets', 'all'))" |
| 85 | + DependsOnTargets="BuildOnlySettings;ResolveReferences"> |
| 86 | + <ItemGroup> |
| 87 | + <_projectReferenceCopyLocalPaths Include="@(ReferenceCopyLocalPaths->WithMetadataValue('ReferenceSourceTarget', 'ProjectReference')->WithMetadataValue('PrivateAssets', 'all'))" /> |
| 88 | + |
| 89 | + <BuildOutputInPackage Include="@(_projectReferenceCopyLocalPaths)" |
| 90 | + TargetPath="%(_projectReferenceCopyLocalPaths.DestinationSubDirectory)" /> |
| 91 | + <TfmSpecificDebugSymbolsFile Include="@(_projectReferenceCopyLocalPaths->WithMetadataValue('Extension', '.pdb'))" |
| 92 | + TargetPath="%(_projectReferenceCopyLocalPaths.DestinationSubDirectory)" |
| 93 | + TargetFramework="$(TargetFramework)" |
| 94 | + Condition="'$(IncludeSymbols)' == 'true'" /> |
| 95 | + |
| 96 | + <!-- Remove symbol from the non symbol package. --> |
| 97 | + <BuildOutputInPackage Remove="@(_projectReferenceCopyLocalPaths->WithMetadataValue('Extension', '.pdb'))" /> |
| 98 | + <BuildOutputInPackage Remove="@(_projectReferenceCopyLocalPaths->WithMetadataValue('Extension', '.xml'))" /> |
| 99 | + </ItemGroup> |
| 100 | + </Target> |
| 101 | + |
| 102 | + |
| 103 | + <Target Name="IncludeReferenceAssemblies"> |
| 104 | + <ItemGroup> |
| 105 | + <TfmSpecificPackageFile Include="$(TargetRefPath)" PackagePath="ref/$(TargetFramework)" /> |
| 106 | + <TfmSpecificPackageFile Include="$(DocumentationFile)" PackagePath="ref/$(TargetFramework)" Condition="'$(GenerateDocumentationFile)' == 'true'" /> |
| 107 | + </ItemGroup> |
| 108 | + </Target> |
75 | 109 | </Project> |
0 commit comments