You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Remove all ref/ projects
* Remove GenAPI infrastructure
* Remove notion of a reference assembly project
- remove `$(IsReferenceAssemblyProject)`, `$(ReferenceReferenceAssemblies)` and `$(ReferenceImplementationAssemblies)`
- remove unnecessary `$(NoWarn)` settings
nits:
- remove a few misleading comments
- wrap some long lines
* Move .0 package version workaround into Versions.props
- touch up SharedFramework.External.props
* Expose `%(LatestPackageReference.RTMVersion)` metadata
- automate use of properties in the `@(LatestPackageReference)` item group to make this maintainable
- add a couple of special cases at the bottom of eng/Dependencies.props
- add one more `$(...PackageVersion)` property to avoid yet-another special case
* Enable Roslyn reference assemblies
- exclude ref/ assembly from packages other than targeting pack
- update Microsoft.AspNetCore.App.Ref.csproj
- `%(IsReferenceAssembly)` and `%(ReferenceGrouping)` metadata no longer relevant
- only ref/ assemblies are in `@(ReferencePathWithRefAssemblies)` item group
nits:
- remove now-unnecessary workaround
- issues with TFM transition are behind us
- clean up Microsoft.AspNetCore.App.Runtime.csproj slightly
- use `GeneratePathProperty="true"`
- reorder item / property settings for meta-expansion
- correct spelling errors and phrasing in comments
* Update documentation to reflect recent changes
- remove CrossRepoBreakingChanges.md; was tied to old TeamCity infrastructure
- also much less relevant given repo merges
- adjust details and examples in ReferenceResolution.md
- reflect repo merges, Dependencies.props changes, and current Maestro++ channels
- add a few more details e.g. specific files where Version.Details.xml versions are used
* !fixup! Remove another irrelevant doc file
* !fixup! Address PR review suggestions
- convert a couple of warnings to errors
- use consistent casing for Microsoft.NETCore.App.Runtime.* packages
- reduce `%(LatestPackageReference.Version)` metadata special cases
- add and improve comments e.g.
- improve comments about `$(*V0PackageVersion)` properties
- improve placement of comments about item removal in ResolveReferences.targets
- confirmed `$(*V0PackageVersion)` property list is complete
nits:
- fix solution example in ReferenceResolution.md
- remove item group definition for `@(LatestPackageReference)`
- remove `%(LatestPackageReference.VersionName)` metadata after use; large item group
- similarly, remove `%(LatestPackageReference.RTMVersion)` when not needed; just complicates `Condition`s
When I squash, I must remember this fixes
- #14801
- dotnet/aspnetcore-internal#2693
* Actually use `%(LatestPackageReference.RTMVersion)` metadata
- gather RTM package references in a new project
- a (very) separate project to work around package conflict resolution
- empty `Test` target works around Arcade's testing approach
- new target in ResolveReferences.targets updates relevant assembly paths to use the RTM packages
- done as soon as possible after `ResolvePackageAssets` determines the paths
- done for all compilation inputs, not just ref/ assemblies
<IsBenchmarkProjectCondition="$(MSBuildProjectName.EndsWith('.Performance')) OR $(RepoRelativeProjectDir.Contains('perf')) OR $(RepoRelativeProjectDir.Contains('benchmarkapps'))">true</IsBenchmarkProject>
Copy file name to clipboardExpand all lines: Directory.Build.targets
+11-12Lines changed: 11 additions & 12 deletions
Original file line number
Diff line number
Diff line change
@@ -1,10 +1,10 @@
1
-
<Project>
1
+
<Project>
2
2
3
3
<PropertyGroup>
4
4
<!-- Only build Microsoft.AspNetCore.App and ref/ assemblies in source build. -->
5
5
<!-- Analyzer package are needed in source build for WebSDK -->
6
6
<ExcludeFromSourceBuild
7
-
Condition="'$(ExcludeFromSourceBuild)' == '' and '$(DotNetBuildFromSource)' == 'true' and '$(IsAspNetCoreApp)' != 'true' and '$(IsReferenceAssemblyProject)' != 'true' and '$(IsAnalyzersProject)' != 'true'">true</ExcludeFromSourceBuild>
7
+
Condition="'$(ExcludeFromSourceBuild)' == '' and '$(DotNetBuildFromSource)' == 'true' and '$(IsAspNetCoreApp)' != 'true' and '$(IsAnalyzersProject)' != 'true'">true</ExcludeFromSourceBuild>
8
8
9
9
<!-- If the user has specified that they want to skip building any test related projects with SkipTestBuild,
10
10
suppress all targets for TestProjects using ExcludeFromBuild. -->
<IsPackableCondition="'$(IsPackable)' == '' AND ( '$(IsTestProject)' == 'true' OR '$(IsTestAssetProject)' == 'true' OR '$(IsBenchmarkProject)' == 'true' OR '$(IsSampleProject)' == 'true' OR '$(IsReferenceAssemblyProject)' == 'true' ) ">false</IsPackable>
60
+
<IsPackable
61
+
Condition="'$(IsPackable)' == '' AND ( '$(IsTestProject)' == 'true' OR '$(IsTestAssetProject)' == 'true' OR '$(IsBenchmarkProject)' == 'true' OR '$(IsSampleProject)' == 'true' ) ">false</IsPackable>
61
62
</PropertyGroup>
62
63
63
64
<ImportProject="eng\Baseline.Designer.props" />
@@ -100,14 +101,19 @@
100
101
101
102
<PropertyGroup>
102
103
<!-- Implementation projects are the projects which produce nuget packages or shipping assemblies. -->
103
-
<IsImplementationProjectCondition=" '$(IsImplementationProject)' == '' AND '$(IsAnalyzersProject)' != 'true' AND '$(IsTestAssetProject)' != 'true' AND '$(IsTestProject)' != 'true' AND '$(IsBenchmarkProject)' != 'true' AND '$(IsSampleProject)' != 'true' AND '$(IsReferenceAssemblyProject)' != 'true' ">true</IsImplementationProject>
104
+
<IsImplementationProjectCondition=" '$(IsImplementationProject)' == '' AND '$(IsAnalyzersProject)' != 'true' AND '$(IsTestAssetProject)' != 'true' AND '$(IsTestProject)' != 'true' AND '$(IsBenchmarkProject)' != 'true' AND '$(IsSampleProject)' != 'true' ">true</IsImplementationProject>
104
105
105
106
<!-- This determines whether a project is available as a <Reference> to other projects in this repo. -->
106
107
<IsProjectReferenceProviderCondition=" '$(IsProjectReferenceProvider)' == '' AND '$(IsImplementationProject)' == 'true' AND '$(PackAsTool)' != 'true' ">true</IsProjectReferenceProvider>
107
108
108
109
<HasReferenceAssembly
109
-
Condition=" '$(HasReferenceAssembly)' == '' AND '$(IsProjectReferenceProvider)' == 'true' AND '$(IsAspNetCoreApp)' == 'true' ">true</HasReferenceAssembly>
110
+
Condition=" '$(TargetFramework)' == '$(DefaultNetCoreTargetFramework)' AND '$(IsAspNetCoreApp)' == 'true' ">true</HasReferenceAssembly>
<!-- Reference assemblies should always use Major.Minor.0.0 for assembly versions even during servicing. Only the package version should be updated. -->
133
-
<!-- Pinning the implementation assemblies at Major.Minor.0.0 as we figure out compiling against ref assemblies. -->
Copy file name to clipboardExpand all lines: docs/ReferenceResolution.md
+31-23Lines changed: 31 additions & 23 deletions
Original file line number
Diff line number
Diff line change
@@ -10,10 +10,12 @@ See [ResolveReferences.targets](/eng/targets/ResolveReferences.targets) for the
10
10
11
11
The requirements that led to this system are:
12
12
13
-
* Versions of external dependencies should be consistent.
14
-
* Servicing updates of ASP.NET Core should minimize the number of assemblies which need to re-build and re-ship.
13
+
* Versions of external dependencies should be consistent and easily discovered.
15
14
* Newer versions of packages should not have lower dependency versions than previous releases.
16
15
* Minimize the cascading effect of servicing updates where possible by keeping a consistent baseline of dependencies.
16
+
* Servicing releases should not add or remove dependencies in existing packages.
17
+
18
+
As a minor point, the current system also makes our project files somewhat less verbose.
17
19
18
20
## Recommendations for writing a .csproj
19
21
@@ -29,30 +31,31 @@ The requirements that led to this system are:
29
31
30
32
## Important files
31
33
32
-
*[eng/Baseline.xml](/eng/Baseline.xml) - this contains the 'baseline' of the latest servicing release for this branch. It should be modified and used to update the generated file, Baseline.Designer.props.
34
+
*[eng/Baseline.xml](/eng/Baseline.xml) - this contains the 'baseline' of the latest servicing release for this branch.
35
+
It should be modified and used to update the generated file, [eng/Baseline.Designer.props](eng/Baseline.Designer.props).
33
36
*[eng/Dependencies.props](/eng/Dependencies.props) - contains a list of all package references that might be used in the repo.
34
37
*[eng/ProjectReferences.props](/eng/ProjectReferences.props) - lists which assemblies or packages might be available to be referenced as a local project.
35
38
*[eng/Versions.props](/eng/Versions.props) - contains a list of versions which may be updated by automation. This is used by MSBuild to restore and build.
36
-
*[eng/Version.Details.xml](/eng/Version.Details.xml) - used by automation to update dependencies variables in other files.
39
+
*[eng/Version.Details.xml](/eng/Version.Details.xml) - used by automation to update dependency variables in
40
+
[eng/Versions.props](/eng/Versions.props) and, for SDKs and `msbuild` toolsets, [global.json](global.json).
37
41
38
42
## Example: adding a new project
39
43
40
44
Steps for adding a new project to this repo.
41
45
42
46
1. Create the .csproj
43
47
2. Run `eng/scripts/GenerateProjectList.ps1`
44
-
3. Add it to Extensions.sln
48
+
3. Add new project to AspNetCore.sln and any relevant `*.slnf` files
45
49
46
50
## Example: adding a new dependency
47
51
48
52
Steps for adding a new package dependency to an existing project. Let's say I'm adding a dependency on System.Banana.
49
53
50
54
1. Add the package to the .csproj file using `<Reference Include="System.Banana" />`
51
-
2. Add an entry to [eng/Dependencies.props](/eng/Dependencies.props), `<LatestPackageReference Include="System.Banana" Version="0.0.1-beta-1" />`
52
-
3. If this package comes from another dotnet team and should be updated automatically by our bot...
53
-
1. Change the LatestPackageReference entry to `Version="$(SystemBananaPackageVersion)"`.
54
-
2. Add an entry to [eng/Versions.props](/eng/Versions.props) like this `<SystemBananaPackageVersion>0.0.1-beta-1</SystemBananaPackageVersion>`.
55
-
3. Add an entry to [eng/Version.Details.xml](/eng/Version.Details.xml) like this:
55
+
2. Add an entry to [eng/Dependencies.props](/eng/Dependencies.props) e.g. `<LatestPackageReference Include="System.Banana" />`
56
+
3. If this package comes from another dotnet team and should be updated automatically by our bot…
57
+
1. Add an entry to [eng/Versions.props](/eng/Versions.props) like this `<SystemBananaPackageVersion>0.0.1-beta-1</SystemBananaPackageVersion>`.
58
+
2. Add an entry to [eng/Version.Details.xml](/eng/Version.Details.xml) like this:
56
59
57
60
```xml
58
61
<ProductDependencies>
@@ -65,27 +68,28 @@ Steps for adding a new package dependency to an existing project. Let's say I'm
65
68
</ProductDependencies>
66
69
```
67
70
68
-
If you don't know the commit hash of the source code used to produce "0.0.1-beta-1", you can use `000000` as a placeholder for `Sha`
69
-
as its value is unimportant and will be updated the next time the bot runs.
71
+
If you don't know the commit hash of the source code used to produce "0.0.1-beta-1", you can use `000000` as a
72
+
placeholder for `Sha` as its value will be updated the next time the bot runs.
70
73
71
-
If the new dependency comes from dotnet/CoreFx, dotnet/code-setup or dotnet/extensions, add a
74
+
If the new dependency comes from dotnet/runtime and you are updating dotnet/aspnetcore-tooling, add a
72
75
`CoherentParentDependency` attribute to the `<Dependency>` element as shown below. This example indicates the
73
-
dotnet/CoreFx dependency version should be determined based on the build that produced the chosen
74
-
Microsoft.NETCore.App. That is, the dotnet/CoreFx dependency and Microsoft.NETCore.App should be
75
-
coherent.
76
+
dotnet/runtime dependency version for System.Banana should be determined based on the dotnet/aspnetcore build
77
+
that produced the chosen Microsoft.CodeAnalysis.Razor. That is, the dotnet/runtime and dotnet/aspnetcore
The attribute value should be `"Microsoft.Extensions.Logging"` for dotnet/core-setup dependencies and
84
-
`"Microsoft.CodeAnalysis.Razor"` for dotnet/extensions dependencies.
86
+
The attribute value should be `"Microsoft.CodeAnalysis.Razor"` for dotnet/runtime dependencies in
87
+
dotnet/aspnetcore-tooling.
85
88
86
89
## Example: make a breaking change to references
87
90
88
-
If Microsoft.AspNetCore.Banana in 2.1 had a reference to `Microsoft.AspNetCore.Orange`, but in 3.0 this reference is changing to `Microsoft.AspNetCore.BetterThanOrange`, you would need to make these changes to the .csproj file
91
+
If Microsoft.AspNetCore.Banana in 2.1 had a reference to `Microsoft.AspNetCore.Orange`, but in 3.1 or 5.0 this reference
92
+
is changing to `Microsoft.AspNetCore.BetterThanOrange`, you would need to make these changes to the .csproj file
89
93
90
94
```diff
91
95
<!-- in Microsoft.AspNetCore.Banana.csproj -->
@@ -100,8 +104,12 @@ If Microsoft.AspNetCore.Banana in 2.1 had a reference to `Microsoft.AspNetCore.O
100
104
101
105
If the `dotnet-maestro` bot has not correctly updated the dependencies, it may be worthwhile running `darc` manually:
102
106
103
-
1. Install `darc` as described in https://github.com/dotnet/arcade/blob/master/Documentation/Darc.md#setting-up-your-darc-client
104
-
2. Run `darc update-dependencies --channel '.NET Core 3 Dev'`
105
-
* Use `'.NET Core 3 Release'` in a `release/3.0-*` branch
107
+
1. Install `darc` as described in <https://github.com/dotnet/arcade/blob/master/Documentation/Darc.md#setting-up-your-darc-client>
108
+
2. Run `darc update-dependencies --channel '.NET Core 3.1 Release'`
109
+
* Use `'trigger-subscriptions'` to prod the bot to create a PR if you do not want to make local changes
110
+
* Use `'.NET 3 Eng''` to update dependencies from dotnet/arcade
111
+
* Use `'.NET Eng - Latest'` to update dependencies from dotnet/arcade in the `master` branch
112
+
* Use `'VS Master'` to update dependencies from dotnet/roslyn in the `master` branch
113
+
* Use `'.NET 5 Dev'` to update dependencies from dotnet/efcore or dotnet/runtime in the `master` branch
0 commit comments