Skip to content

Commit

Permalink
Update build scripts to enable Microsoft.Extensions projects incremen…
Browse files Browse the repository at this point in the history
…tally

- BinPlacing for Extensions projects
- Ignore building Microsoft.Extensions. projects
- Use correct StringNameKeyId for Extensions projects
- Separate packaging path for extensions projects
- Add PreReleaseVersionIteration
  • Loading branch information
maryamariyan committed Mar 2, 2020
1 parent 1650655 commit 3df8292
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 0 deletions.
1 change: 1 addition & 0 deletions eng/Versions.props
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
<PatchVersion>0</PatchVersion>
<PreReleaseVersionLabel>preview</PreReleaseVersionLabel>
<PreReleaseVersionIteration>2</PreReleaseVersionIteration>
<PreReleaseVersionIteration Condition="$(MSBuildProjectName.StartsWith('Microsoft.Extensions.'))">$(PreReleaseVersionIteration)-runtime</PreReleaseVersionIteration>
<!-- Set assembly version to align with major and minor version,
as for the patches and revisions should be manually updated per assembly if it is serviced. -->
<AssemblyVersion>$(MajorVersion).$(MinorVersion).0.0</AssemblyVersion>
Expand Down
14 changes: 14 additions & 0 deletions src/libraries/Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,17 @@
</PropertyGroup>
<Import Project="..\..\Directory.Build.props" />

<ItemGroup>
<ProjectExclusions Include="$(MSBuildThisFileDirectory)*\ref\**\Microsoft.Extensions.*proj" Exclude="@(PortedExtensionsProject)" />
<ProjectExclusions Include="$(MSBuildThisFileDirectory)*\src\**\Microsoft.Extensions.*proj" Exclude="@(PortedExtensionsProject)" />
<ProjectExclusions Include="$(MSBuildThisFileDirectory)*\tests\**\Microsoft.Extensions.*.Tests.csproj" Exclude="@(PortedExtensionsProject)" />
</ItemGroup>

<PropertyGroup Condition="$(MSBuildProjectName.StartsWith('Microsoft.Extensions.')) and !$(MSBuildProjectName.EndsWith('.Tests'))">
<StrongNameKeyId>MicrosoftAspNetCore</StrongNameKeyId>
<IsAspNetCoreApp>true</IsAspNetCoreApp>
</PropertyGroup>

<PropertyGroup>
<ToolSetCommonDirectory>$(RepoRoot)artifacts\toolset\Common\</ToolSetCommonDirectory>
<IsSourceProject>$([System.Text.RegularExpressions.Regex]::IsMatch($(MSBuildProjectDirectory), 'src%24'))</IsSourceProject>
Expand Down Expand Up @@ -311,6 +322,9 @@
<!-- Paths to binplace package content -->
<NETCoreAppPackageRefPath>$(ArtifactsBinDir)pkg\$(NetCoreAppCurrent)\ref</NETCoreAppPackageRefPath>
<NETCoreAppPackageRuntimePath>$(ArtifactsBinDir)pkg\$(NetCoreAppCurrent)\lib</NETCoreAppPackageRuntimePath>

<ASPNETCoreAppPackageRefPath>$(ArtifactsBinDir)pkg\aspnetcoreapp\ref</ASPNETCoreAppPackageRefPath>
<ASPNETCoreAppPackageRuntimePath>$(ArtifactsBinDir)pkg\aspnetcoreapp\lib</ASPNETCoreAppPackageRuntimePath>

<TestHostRootPath>$([MSBuild]::NormalizeDirectory('$(ArtifactsBinDir)', 'testhost', '$(BuildSettings)'))</TestHostRootPath>

Expand Down
4 changes: 4 additions & 0 deletions src/libraries/Directory.Build.targets
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,10 @@
<!-- enable trimming for any runtime project that's part of the shared framework and hasn't already set ILLinkTrimAssembly -->
<SetProperties Condition="'$(BinPlaceRuntime)' == 'true' and '$(ILLinkTrimAssembly)' == ''">ILLinkTrimAssembly=true</SetProperties>
</BinPlaceTargetFrameworks>
<BinPlaceTargetFrameworks Condition="'$(IsAspNetCoreApp)' == 'true'" Include="$(NetCoreAppCurrent)">
<RuntimePath>$(ASPNETCoreAppPackageRuntimePath)</RuntimePath>
<RefPath>$(ASPNETCoreAppPackageRefPath)</RefPath>
</BinPlaceTargetFrameworks>

<!-- Setup the shared framework directory for testing -->
<BinPlaceTargetFrameworks Condition="'$(BinPlaceTestSharedFramework)' == 'true'" Include="$(NetCoreAppCurrent)-$(OSGroup)">
Expand Down

0 comments on commit 3df8292

Please sign in to comment.