|
1 | 1 | <Project>
|
2 |
| - <Import |
3 |
| - Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), AspNetCoreSettings.props))\AspNetCoreSettings.props" |
4 |
| - Condition=" '$(CI)' != 'true' AND '$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), AspNetCoreSettings.props))' != '' " /> |
5 |
| - |
6 |
| - <Import Project="version.props" /> |
7 |
| - |
8 | 2 | <PropertyGroup>
|
9 |
| - <Product>Microsoft .NET Extensions</Product> |
| 3 | + <RepoRoot>$(MSBuildThisFileDirectory)</RepoRoot> |
10 | 4 | <RepositoryUrl>https://github.com/aspnet/Extensions</RepositoryUrl>
|
11 | 5 | <RepositoryType>git</RepositoryType>
|
12 |
| - <RepositoryRoot>$(MSBuildThisFileDirectory)</RepositoryRoot> |
13 |
| - <AssemblyOriginatorKeyFile>$(MSBuildThisFileDirectory)eng\AspNetCore.snk</AssemblyOriginatorKeyFile> |
14 |
| - <SignAssembly>true</SignAssembly> |
15 |
| - <TreatWarningsAsErrors>true</TreatWarningsAsErrors> |
16 |
| - |
17 |
| - <ArtifactsDir>$(MSBuildThisFileDirectory)artifacts\</ArtifactsDir> |
18 |
| - <PackageOutputPath>$(MSBuildThisFileDirectory)artifacts\build\</PackageOutputPath> |
19 |
| - <SharedSourceRoot>$(MSBuildThisFileDirectory)src\Shared\src\</SharedSourceRoot> |
20 |
| - <ArtifactsConfigurationDir>$(ArtifactsDir)$(Configuration)\</ArtifactsConfigurationDir> |
21 |
| - <BasePackageOutputPath>$(ArtifactsConfigurationDir)packages\</BasePackageOutputPath> |
22 |
| - <ProductPackageOutputPath>$(BasePackageOutputPath)product\</ProductPackageOutputPath> |
23 |
| - <InternalPackageOutputPath>$(BasePackageOutputPath)internal\</InternalPackageOutputPath> |
| 6 | + <RepoRelativeProjectDir>$([MSBuild]::MakeRelative($(RepoRoot), $(MSBuildProjectDirectory)))</RepoRelativeProjectDir> |
24 | 7 |
|
25 |
| - <RepoRelativeProjectDir>$([MSBuild]::MakeRelative($(RepositoryRoot), $(MSBuildProjectDirectory)))</RepoRelativeProjectDir> |
26 |
| - |
27 |
| - <!-- |
28 |
| - By default, all projects which produce packages are not intended to ship to NuGet.org as a product package. |
29 |
| - Packages which are intended to ship to NuGet.org must opt-in by setting this to true in their project file. |
30 |
| - --> |
31 |
| - <IsProductComponent>false</IsProductComponent> |
| 8 | + <!-- Set these before importing Arcade to override Arcade's defaults --> |
| 9 | + <IsUnitTestProject>false</IsUnitTestProject> |
| 10 | + <IsUnitTestProject Condition="$(MSBuildProjectName.EndsWith('.Tests')) OR $(MSBuildProjectName.EndsWith('.FunctionalTests'))">true</IsUnitTestProject> |
| 11 | + <IsUnitTestProject Condition="$(MSBuildProjectName.EndsWith('.Specification.Tests'))">false</IsUnitTestProject> |
32 | 12 |
|
33 | 13 | <IsBenchmarkProject Condition="$(MSBuildProjectName.EndsWith('.Performance'))">true</IsBenchmarkProject>
|
34 |
| - <IsTestProject Condition="$(MSBuildProjectName.EndsWith('Tests')) OR $(MSBuildProjectName.EndsWith('.Test'))">true</IsTestProject> |
35 | 14 | <IsTestAssetProject Condition="$(RepoRelativeProjectDir.Contains('testassets'))">true</IsTestAssetProject>
|
36 | 15 | <IsSampleProject Condition="$(RepoRelativeProjectDir.Contains('samples'))">true</IsSampleProject>
|
37 | 16 |
|
| 17 | + <IsReferenceAssemblyProject>false</IsReferenceAssemblyProject> |
| 18 | + <IsReferenceAssemblyProject Condition="$(MSBuildProjectDirectory.EndsWith('ref'))">true</IsReferenceAssemblyProject> |
| 19 | + <OutDirName Condition="'$(IsReferenceAssemblyProject)' == 'true'">$(MSBuildProjectName)-ref</OutDirName> |
| 20 | + |
| 21 | + <ExcludeFromSourceBuild Condition="'$(IsUnitTestProject)' == 'true' or '$(IsBenchmarkProject)' == 'true' or '$(IsTestAssetProject)' == 'true' or '$(IsSampleProject)' == 'true'">true</ExcludeFromSourceBuild> |
| 22 | + </PropertyGroup> |
| 23 | + |
| 24 | + <Import Project="eng\FlakyTests.BeforeArcade.props" /> |
| 25 | + <Import Project="Sdk.props" Sdk="Microsoft.DotNet.Arcade.Sdk" /> |
| 26 | + <Import Project="eng\FlakyTests.AfterArcade.props" /> |
| 27 | + |
| 28 | + <PropertyGroup> |
38 | 29 | <IncludeSymbols>true</IncludeSymbols>
|
| 30 | + <!-- Always pass portable to override arcade sdk which uses embedded for local builds --> |
| 31 | + <DebugType>portable</DebugType> |
| 32 | + <Serviceable Condition="'$(Configuration)' == 'Release'">true</Serviceable> |
| 33 | + <PackageLicenseExpression>Apache-2.0</PackageLicenseExpression> |
| 34 | + <PackageProjectUrl>https://asp.net</PackageProjectUrl> |
| 35 | + <NoPackageAnalysis>true</NoPackageAnalysis> |
| 36 | + <LangVersion>8.0</LangVersion> |
| 37 | + |
| 38 | + <DefaultNetCoreTargetFramework>netcoreapp$(MajorVersion).$(MinorVersion)</DefaultNetCoreTargetFramework> |
39 | 39 |
|
40 |
| - <SuppressNETCoreSdkPreviewMessage>true</SuppressNETCoreSdkPreviewMessage> |
| 40 | + <Product>Microsoft .NET Extensions</Product> |
| 41 | + <SignAssembly>true</SignAssembly> |
| 42 | + <TreatWarningsAsErrors>true</TreatWarningsAsErrors> |
| 43 | + <!-- Enables Strict mode for Roslyn compiler --> |
| 44 | + <Features>strict</Features> |
| 45 | + |
| 46 | + <!-- Automatically generate source for .resx files on-build. --> |
| 47 | + <GenerateResxSource>true</GenerateResxSource> |
| 48 | + <GenerateResxSourceEmitFormatMethods>true</GenerateResxSourceEmitFormatMethods> |
| 49 | + |
| 50 | + <StrongNameKeyId>MicrosoftAspNetCore</StrongNameKeyId> |
| 51 | + <SharedSourceRoot>$(MSBuildThisFileDirectory)src\Shared\src\</SharedSourceRoot> |
| 52 | + |
| 53 | + <NpmPackageDir>$(ArtifactsDir)npm\$(Configuration)\</NpmPackageDir> |
| 54 | + <ShippingNpmPackageOutputPath>$(NpmPackageDir)Shipping\</ShippingNpmPackageOutputPath> |
41 | 55 | </PropertyGroup>
|
42 | 56 |
|
43 |
| - <Import Project="eng\Dependencies.props" /> |
44 |
| - <Import Project="eng\PatchConfig.props" /> |
45 |
| - <Import Project="eng\ProjectReferences.props" /> |
46 |
| - <Import Project="eng\Sources.props" /> |
| 57 | + <ItemGroup Condition=" '$(IsUnitTestProject)' == 'true' "> |
| 58 | + <ProjectReference Include="$(MSBuildThisFileDirectory)src\TestingUtils\Microsoft.AspNetCore.Testing\src\Microsoft.AspNetCore.Testing.csproj" /> |
| 59 | + <Reference Include="Moq" /> |
| 60 | + </ItemGroup> |
| 61 | + |
| 62 | + <ItemDefinitionGroup Condition=" '$(IsUnitTestProject)' == 'true' "> |
| 63 | + <!-- Always copy content items in test projects into the build output directory. --> |
| 64 | + <Content> |
| 65 | + <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> |
| 66 | + <CopyToPublishDirectory>PreserveNewest</CopyToPublishDirectory> |
| 67 | + </Content> |
| 68 | + </ItemDefinitionGroup> |
47 | 69 |
|
48 |
| - <ItemGroup> |
49 |
| - <PackageReference Include="Internal.AspNetCore.Sdk" PrivateAssets="All" Version="$(InternalAspNetCoreSdkPackageVersion)" /> |
| 70 | + <ItemGroup Condition="'$(DotNetBuildFromSource)' != 'true'"> |
| 71 | + <Reference Include="Microsoft.DotNet.GenAPI" Version="$(MicrosoftDotNetGenApiPackageVersion)" PrivateAssets="All" /> |
50 | 72 | </ItemGroup>
|
| 73 | + |
| 74 | + <Import Project="eng\Dependencies.props" /> |
| 75 | + <Import Project="eng\ProjectReferences.props" /> |
| 76 | + <Import Project="eng\targets\Csharp.Refs.props" Condition="'$(IsReferenceAssemblyProject)' == 'true'" /> |
| 77 | + <Import Project="eng\targets\Npm.Common.props" Condition="'$(MSBuildProjectExtension)' == '.npmproj'" /> |
51 | 78 | </Project>
|
0 commit comments