-
Notifications
You must be signed in to change notification settings - Fork 32
Refactoring of build targets, common output #224
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
jviau
wants to merge
1
commit into
main
Choose a base branch
from
jviau/update-eng
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,30 @@ | ||
| <Project> | ||
|
|
||
| <!-- Common build settings --> | ||
| <PropertyGroup> | ||
| <LangVersion>latest</LangVersion> | ||
| </PropertyGroup> | ||
|
|
||
| <PropertyGroup> | ||
| <Configuration Condition="'$(Configuration)' == ''">Debug</Configuration> | ||
| <Platform Condition="'$(Platform)' == ''">AnyCPU</Platform> | ||
| <RepoRoot>$(MSBuildThisFileDirectory)</RepoRoot> | ||
| <OutRoot>$(RepoRoot)$([MSBuild]::EnsureTrailingSlash(out/$(SubOutRoot)))</OutRoot> | ||
| <EngRoot>$(RepoRoot)eng/</EngRoot> | ||
| <SrcRoot>$(RepoRoot)src/</SrcRoot> | ||
| <BaseOutputPath>$(OutRoot)bin/</BaseOutputPath> | ||
| <BaseIntermediateOutputPath>$(OutRoot)obj/$(MSBuildProjectName)/</BaseIntermediateOutputPath> | ||
| <IntermediateOutputPath>$(BaseIntermediateOutputPath)$(Configuration)/</IntermediateOutputPath> | ||
| <SubOutputPath Condition="'$(SubOutputPath)' == ''">$(MSBuildProjectName)/</SubOutputPath> | ||
| <OutputPath>$(BaseOutputPath)$(Configuration)/$([MSBuild]::EnsureTrailingSlash($(SubOutputPath)))</OutputPath> | ||
| <PackageOutputPath>$(OutRoot)pkg/</PackageOutputPath> | ||
| </PropertyGroup> | ||
|
|
||
| <!-- Signing --> | ||
| <PropertyGroup> | ||
| <SignAssembly>true</SignAssembly> | ||
| <AssemblyOriginatorKeyFile>$(EngRoot)key.snk</AssemblyOriginatorKeyFile> | ||
| <StrongNamePublicKey>0024000004800000940000000602000000240000525341310004000001000100e93024fd5f6737b5f408b39a97e746f673e7c62d690716c6022ee8871b2bc5efcbd8015dd02253302196ded0d9fc0c6bc0e84740f74ca828fed9aebf15272867019cf991484c06b00c7d7aacb34b40ed0ae633f0432df41db65caa4b03f9a0e6974c15aeaa7db2acd902914c0628f0b77d9b7839f530ba04584aed9287159ebd</StrongNamePublicKey> | ||
| </PropertyGroup> | ||
|
|
||
| </Project> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,19 @@ | ||
| <Project> | ||
|
|
||
| <ItemGroup> | ||
| <None Update="**/appsettings.json"> | ||
| <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> | ||
| </None> | ||
| <None Update="**/appsettings.*.json"> | ||
| <DependentUpon>appsettings.json</DependentUpon> | ||
| <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> | ||
| </None> | ||
| </ItemGroup> | ||
|
|
||
| <ItemGroup> | ||
| <AdditionalFiles Include="$(RepoRoot)stylecop.json" Visible="false" /> | ||
| </ItemGroup> | ||
|
|
||
| <Import Project="$(EngRoot)targets/InternalsVisibleTo.targets" /> | ||
|
|
||
| </Project> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes
File renamed without changes.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,45 @@ | ||
| <!-- Licensed to the .NET Foundation under one or more agreements. The .NET Foundation licenses this file to you under the MIT license. See the LICENSE file in the project root for more information. --> | ||
| <Project> | ||
|
|
||
| <PropertyGroup> | ||
| <GeneratedInternalsVisibleToFile>$(IntermediateOutputPath)$(MSBuildProjectName).InternalsVisibleTo$(DefaultLanguageSourceExtension)</GeneratedInternalsVisibleToFile> | ||
| </PropertyGroup> | ||
|
|
||
| <ItemDefinitionGroup> | ||
| <InternalsVisibleTo> | ||
| <Visible>false</Visible> | ||
| </InternalsVisibleTo> | ||
| </ItemDefinitionGroup> | ||
|
|
||
| <Target Name="PrepareGenerateInternalsVisibleToFile" Condition="'@(InternalsVisibleTo)' != ''"> | ||
|
|
||
| <ItemGroup> | ||
| <_InternalsVisibleToAttribute Include="System.Runtime.CompilerServices.InternalsVisibleToAttribute"> | ||
| <_Parameter1 Condition="'%(InternalsVisibleTo.Key)' != ''">%(InternalsVisibleTo.Identity), PublicKey=%(InternalsVisibleTo.Key)</_Parameter1> | ||
| <_Parameter1 Condition="'%(InternalsVisibleTo.Key)' == '' and '$(PublicKey)' != ''">%(InternalsVisibleTo.Identity), PublicKey=$(PublicKey)</_Parameter1> | ||
| <_Parameter1 Condition="'%(InternalsVisibleTo.Key)' == '' and '$(PublicKey)' == ''">%(InternalsVisibleTo.Identity)</_Parameter1> | ||
| </_InternalsVisibleToAttribute> | ||
| </ItemGroup> | ||
|
|
||
| </Target> | ||
|
|
||
| <!-- | ||
| Dependency on PrepareForBuild is necessary so that we don't accidentally get ordered before it. | ||
| We rely on PrepareForBuild to create the IntermediateOutputDirectory if it doesn't exist. | ||
| --> | ||
| <Target Name="GenerateInternalsVisibleToFile" | ||
| Inputs="$(MSBuildThisFileFullPath);$(MSBuildProjectFile)" | ||
| Outputs="$(GeneratedInternalsVisibleToFile)" | ||
| DependsOnTargets="PrepareGenerateInternalsVisibleToFile;PrepareForBuild" | ||
| Condition="'@(InternalsVisibleTo)' != ''" | ||
| BeforeTargets="BeforeCompile"> | ||
|
|
||
| <WriteCodeFragment AssemblyAttributes="@(_InternalsVisibleToAttribute)" Language="$(Language)" OutputFile="$(GeneratedInternalsVisibleToFile)"> | ||
| <Output TaskParameter="OutputFile" ItemName="CompileBefore" Condition="'$(Language)' == 'F#'" /> | ||
| <Output TaskParameter="OutputFile" ItemName="Compile" Condition="'$(Language)' != 'F#'" /> | ||
| <Output TaskParameter="OutputFile" ItemName="FileWrites" /> | ||
| </WriteCodeFragment> | ||
|
|
||
| </Target> | ||
|
|
||
| </Project> | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,19 @@ | ||
| <Project> | ||
|
|
||
| <Target Name="IncludeSharedItems" BeforeTargets="BeforeCompile" | ||
| Condition="'$(IncludeShared)' != 'false' And '$(SharedRoot)' != '' And '@(SharedSection)' != ''"> | ||
| <PropertyGroup> | ||
| <SharedRoot>$([MSBuild]::EnsureTrailingSlash($(SharedRoot)))</SharedRoot> | ||
| <_SharedSectionCompileIncludes>@(SharedSection->'$(SharedRoot)%(Identity)/**/*.cs')</_SharedSectionCompileIncludes> | ||
| <_SharedSectionEmbeddedResourceIncludes>@(SharedSection->'$(SharedRoot)%(Identity)/**/*.resx')</_SharedSectionEmbeddedResourceIncludes> | ||
| </PropertyGroup> | ||
| <ItemGroup> | ||
| <Compile Include="$(_SharedSectionCompileIncludes)" LinkBase="Shared" Visible="false" /> | ||
| <EmbeddedResource Include="$(_SharedSectionEmbeddedResourceIncludes)" LinkBase="Shared" Visible="false"> | ||
| <RecursiveNamespace>$([System.String]::Copy('%(RecursiveDir)').Replace($([System.IO.Path]::DirectorySeparatorChar.ToString()), '.'))</RecursiveNamespace> | ||
| <LogicalName>Shared.%(RecursiveNamespace)%(Filename).resources</LogicalName> | ||
| </EmbeddedResource> | ||
| </ItemGroup> | ||
| </Target> | ||
|
|
||
| </Project> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,10 @@ | ||
| { | ||
| "sdk": { | ||
| "version": "7.0.102", | ||
| "rollForward": "latestFeature" | ||
| }, | ||
| "msbuild-sdks": { | ||
| "Microsoft.Build.NoTargets": "3.5.6", | ||
| "Microsoft.Build.Traversal": "3.2.0" | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,17 @@ | ||
| <Project> | ||
|
|
||
| <PropertyGroup> | ||
| <SubOutRoot>samples/</SubOutRoot> | ||
| <TopLevelNamespace>Samples</TopLevelNamespace> | ||
| </PropertyGroup> | ||
|
|
||
| <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory)../, $(_DirectoryBuildPropsFile)))/$(_DirectoryBuildPropsFile)" | ||
| Condition=" '$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory)../, $(_DirectoryBuildPropsFile)))' != '' " /> | ||
|
|
||
| <PropertyGroup> | ||
| <IsPackable>false</IsPackable> | ||
| <WarnOnPackingNonPackableProject>false</WarnOnPackingNonPackableProject> | ||
| <RootNamespace>$(MSBuildProjectName)</RootNamespace> | ||
| </PropertyGroup> | ||
|
|
||
| </Project> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,48 @@ | ||
| <Project> | ||
|
|
||
| <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory)../, $(_DirectoryBuildPropsFile)))/$(_DirectoryBuildPropsFile)" | ||
| Condition=" '$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory)../, $(_DirectoryBuildPropsFile)))' != '' " /> | ||
|
|
||
| <!-- Common build settings --> | ||
| <PropertyGroup> | ||
| <Company>Microsoft Corporation</Company> | ||
| <PublishRepositoryUrl>true</PublishRepositoryUrl> | ||
| <EmbedUntrackedSources>true</EmbedUntrackedSources> | ||
| <RepositoryUrl>https://github.com/microsoft/durabletask-netherite</RepositoryUrl> | ||
| <SharedRoot>$(SrcRoot)Shared/</SharedRoot> | ||
| </PropertyGroup> | ||
|
|
||
| <!-- Analyzers and Documentation --> | ||
| <!-- Enable this when we have time to address all the warnings --> | ||
| <!-- <PropertyGroup> | ||
| <GenerateDocumentationFile>true</GenerateDocumentationFile> | ||
| <EnableNETAnalyzers>true</EnableNETAnalyzers> | ||
| <AnalysisLevel>latest</AnalysisLevel> | ||
| <AnalysisMode>recommended</AnalysisMode> | ||
| </PropertyGroup> --> | ||
|
|
||
| <!-- Common NuGet settings --> | ||
| <PropertyGroup> | ||
| <Authors>Microsoft</Authors> | ||
| <Copyright>© Microsoft Corporation. All rights reserved.</Copyright> | ||
| <PackageLicenseExpression>MIT</PackageLicenseExpression> | ||
| <PackageProjectUrl>$(RepositoryUrl)</PackageProjectUrl> | ||
| <PackageReleaseNotes>$(RepositoryUrl)/releases/</PackageReleaseNotes> | ||
| <PackageTags>Azure Task Durable Orchestration Workflow Activity Reliable EventHubs</PackageTags> | ||
| <PackageId>Microsoft.Azure.$(MSBuildProjectName)</PackageId> | ||
| <PackageIcon>icon.png</PackageIcon> | ||
| </PropertyGroup> | ||
|
|
||
| <!-- Embed the SBOM manifest, which is generated as part of the "official" build --> | ||
| <ItemGroup Condition="'$(Configuration)'=='Release'"> | ||
| <Content Include="..\..\_manifest\**"> | ||
| <Pack>true</Pack> | ||
| <PackagePath>content/SBOM</PackagePath> | ||
| </Content> | ||
| </ItemGroup> | ||
|
|
||
| <ItemGroup> | ||
| <None Include="$(EngRoot)icon.png" Pack="true" PackagePath="/" /> | ||
| </ItemGroup> | ||
|
|
||
| </Project> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,26 @@ | ||
| <Project> | ||
|
|
||
| <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory)../, $(_DirectoryBuildTargetsFile)))/$(_DirectoryBuildTargetsFile)" | ||
| Condition=" '$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory)../, $(_DirectoryBuildTargetsFile)))' != '' " /> | ||
|
|
||
| <PropertyGroup Condition="'$(IsRoslynComponent)' != 'true'"> | ||
| <SymbolPackageFormat>snupkg</SymbolPackageFormat> | ||
| <IncludeSymbols>true</IncludeSymbols> | ||
| </PropertyGroup> | ||
|
|
||
| <PropertyGroup> | ||
| <BuildSuffix Condition="'$(GITHUB_RUN_NUMBER)' != ''">.$(GITHUB_RUN_NUMBER)</BuildSuffix> | ||
| <FileVersion>$(VersionPrefix)$(BuildSuffix)</FileVersion> | ||
| </PropertyGroup> | ||
|
|
||
| <ItemGroup> | ||
| <PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.1.*" PrivateAssets="All" /> | ||
| </ItemGroup> | ||
|
|
||
| <ItemGroup> | ||
| <InternalsVisibleTo Include="$(AssemblyName).Tests" Key="$(StrongNamePublicKey)" /> | ||
| </ItemGroup> | ||
|
|
||
| <Import Project="$(EngRoot)targets/SharedFiles.targets" /> | ||
|
|
||
| </Project> |
43 changes: 5 additions & 38 deletions
43
src/DurableTask.Netherite.AzureFunctions/DurableTask.Netherite.AzureFunctions.csproj
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,62 +1,29 @@ | ||
| <Project Sdk="Microsoft.NET.Sdk"> | ||
|
|
||
| <PropertyGroup> | ||
| <!--The target netcoreapp2.2 is not functional, but just generates runtime error when used.--> | ||
| <!-- The target netcoreapp2.2 is not functional, but just generates runtime error when used. --> | ||
| <TargetFrameworks>netstandard2.1;netstandard2.0;netcoreapp2.2;netcoreapp3.1;net5.0</TargetFrameworks> | ||
| <LangVersion>latest</LangVersion> | ||
| <GeneratePackageOnBuild>true</GeneratePackageOnBuild> | ||
| <IncludeSymbols>true</IncludeSymbols> | ||
| <DebugType>embedded</DebugType> | ||
| <RepositoryUrl>https://github.com/microsoft/durabletask-netherite</RepositoryUrl> | ||
| <PublishRepositoryUrl>true</PublishRepositoryUrl> | ||
| <EmbedUntrackedSources>true</EmbedUntrackedSources> | ||
| <Authors>Microsoft</Authors> | ||
| <PackageProjectUrl>https://github.com/microsoft/durabletask-netherite</PackageProjectUrl> | ||
| <PackageLicenseExpression>MIT</PackageLicenseExpression> | ||
| <Copyright>© Microsoft Corporation. All rights reserved.</Copyright> | ||
| <SignAssembly>true</SignAssembly> | ||
| <AssemblyOriginatorKeyFile>..\..\sign.snk</AssemblyOriginatorKeyFile> | ||
| <Description>Netherite durability provider extension for Azure Durable Functions.</Description> | ||
| <PackageTags>Azure Task Durable Orchestration Workflow Activity Reliable EventHubs</PackageTags> | ||
| <PackageId>Microsoft.Azure.DurableTask.Netherite.AzureFunctions</PackageId> | ||
| <PackageIcon>icon.png</PackageIcon> | ||
| </PropertyGroup> | ||
|
|
||
| <!-- Version settings: https://andrewlock.net/version-vs-versionsuffix-vs-packageversion-what-do-they-all-mean/ --> | ||
| <PropertyGroup> | ||
| <MajorVersion>1</MajorVersion> | ||
| <MinorVersion>3</MinorVersion> | ||
| <PatchVersion>1</PatchVersion> | ||
| <VersionPrefix>$(MajorVersion).$(MinorVersion).$(PatchVersion)</VersionPrefix> | ||
| <VersionPrefix>1.3.1</VersionPrefix> | ||
| <VersionSuffix></VersionSuffix> | ||
| <AssemblyVersion>$(MajorVersion).0.0.0</AssemblyVersion> | ||
| <BuildSuffix Condition="'$(GITHUB_RUN_NUMBER)' != ''">.$(GITHUB_RUN_NUMBER)</BuildSuffix> | ||
| <FileVersion>$(VersionPrefix)$(BuildSuffix)</FileVersion> | ||
| </PropertyGroup> | ||
|
|
||
| <!-- Our netcoreapp2.2 target is a non-functional dummy target, so we don't need the warning --> | ||
| <PropertyGroup Condition=" '$(TargetFramework)' == 'netcoreapp2.2' "> | ||
| <NoWarn>NETSDK1138</NoWarn> | ||
| <NoWarn>NETSDK1138</NoWarn> | ||
| </PropertyGroup> | ||
|
|
||
| <ItemGroup> | ||
| <None Include="icon.png" Pack="true" PackagePath="\" /> | ||
| </ItemGroup> | ||
|
|
||
| <ItemGroup Condition="'$(Configuration)'=='Release'"> | ||
| <Content Include="..\..\_manifest\**"> | ||
| <Pack>true</Pack> | ||
| <PackagePath>content/SBOM</PackagePath> | ||
| </Content> | ||
| </ItemGroup> | ||
|
|
||
| <ItemGroup> | ||
| <PackageReference Include="Microsoft.Azure.DurableTask.Core" Version="2.11.1" /> | ||
| <PackageReference Include="Microsoft.Azure.WebJobs.Extensions.DurableTask" Version="2.8.1" /> | ||
| </ItemGroup> | ||
|
|
||
| <ItemGroup Condition=" '$(TargetFramework)' != 'netcoreapp2.2' "> | ||
| <ProjectReference Include="..\DurableTask.Netherite\DurableTask.Netherite.csproj" /> | ||
| <ProjectReference Include="..\DurableTask.Netherite\DurableTask.Netherite.csproj" /> | ||
| </ItemGroup> | ||
|
|
||
| </Project> |
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is there some check for F# language here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This file was borrowed from the dotnet team - so this is a remnant of that. I'll remove the F# check.