Skip to content

Commit d12827e

Browse files
author
Nate McMaster
committed
Merge branch 'release/2.2'
2 parents 19276ce + d53b556 commit d12827e

File tree

90 files changed

+622
-565
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

90 files changed

+622
-565
lines changed

build/buildorder.props

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
<ItemGroup>
1010
<RepositoryBuildOrder Include="Razor" Order="6" />
1111
<RepositoryBuildOrder Include="IISIntegration" Order="10" />
12-
<RepositoryBuildOrder Include="Session" Order="11" />
1312
<RepositoryBuildOrder Include="ServerTests" Order="11" />
1413
<RepositoryBuildOrder Include="Security" Order="13" />
1514
<RepositoryBuildOrder Include="MetaPackages" Order="13" />

build/repo.props

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,13 @@
6262

6363
<ProjectToExclude Include="@(SamplesProject)" Condition="'$(BuildSamples)' == 'false' "/>
6464

65+
<!-- These projects use 'legacy' csproj, which is not supported by dotnet-msbuild. -->
66+
<ProjectToExclude Include="
67+
$(RepositoryRoot)src\Servers\HttpSys\samples\TestClient\TestClient.csproj;
68+
$(RepositoryRoot)src\Middleware\WebSockets\samples\TestServer\TestServer.csproj;
69+
"
70+
Condition=" '$(MSBuildRuntimeType)' == 'Core' " />
71+
6572
<!-- Exclude the websockets samples for now because they use classic .csproj, which is not yet supported in our build. -->
6673
<ProjectToExclude Include="
6774
$(RepositoryRoot)src\Middleware\WebSockets\samples\**\*.csproj;

build/submodules.props

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,6 @@
4646
<Repository Include="Mvc" />
4747
<Repository Include="Razor" />
4848
<Repository Include="Security" />
49-
<Repository Include="Session" />
5049
<Repository Include="SignalR" />
5150
<Repository Include="Templating" PatchPolicy="AlwaysUpdateAndCascadeVersions" />
5251

docs/BuildFromSource.md

Lines changed: 25 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -57,11 +57,11 @@ Before opening our .sln files in Visual Studio or VS Code, you need to perform t
5757

5858
1. Executing the following on command-line:
5959
```
60-
.\build.cmd /p:SkipTests=true /p:_ProjectsOnly=true
60+
.\build.cmd /p:SkipTests=true /p:_ProjectsOnly=true /p:BuildNumberSuffix=t999
6161
```
6262
This will download required tools and build the entire repository once. At that point, you should be able to open .sln files to work on the projects you care about.
63-
64-
2. Update your `PATH` environment variable. (See [below for details](#path).)
63+
64+
2. Use the `startvs.cmd` script to open Visual Studio .sln files. This script first sets required environment variables.
6565

6666
> :bulb: Pro tip: you will also want to run this command after pulling large sets of changes. Visual Studio will only build projects in a solution file, and makes a best effort to use other files on disk. If you pull many changes, the files on disk may be stale and will need to re-build.
6767
@@ -84,20 +84,35 @@ Opening solution files may produce an error code NU1105 with a message such
8484
8585
This is a known issue in NuGet (<https://github.com/NuGet/Home/issues/5820>) and we are working with them for a solution. See also <https://github.com/aspnet/AspNetCore/issues/4183> to track progress on this.
8686

87-
**The workaround** for now is to disable NuGet restore in Visual Studio.
87+
**The workaround** for now is to add all projects to the solution.
88+
89+
dotnet sln add C:\src\AspNetCore\src\Hosting\Abstractions\src\Microsoft.AspNetCore.Hosting.Abstractions.csproj
8890

89-
![screenshot](https://i.imgur.com/cTKP381.png)
9091

9192
#### PATH
9293

93-
For VS Code and Visual Studio to work correctly, you must place the following location in your PATH.
94+
For VS Code and Visual Studio and `dotnet` commands to work correctly, you must place the following location in your PATH.
95+
Use the following commands to update the PATH variable in a command line window.
96+
97+
Windows (Command Prompt)
98+
99+
```batch
100+
set PATH=%USERPROFILE%\.dotnet\x64;%PATH%
94101
```
95-
Windows: %USERPROFILE%\.dotnet\x64
96-
Linux/macOS: $HOME/.dotnet
102+
103+
Windows (Powershell)
104+
105+
```ps1
106+
$env:PATH="$env:USERPROFILE\.dotnet\x64;$env:PATH"
107+
```
108+
109+
Linux/macOS:
110+
111+
```sh
112+
export PATH="$HOME/.dotnet:$PATH"
97113
```
98-
This must come **before** any other installation of `dotnet`. In Windows, we recommend removing `C:\Program Files\dotnet` from PATH in system variables and adding `%USERPROFILE%\.dotnet\x64` to PATH in user variables.
99114

100-
<img src="http://i.imgur.com/Tm2PAfy.png" width="400" />
115+
On Windows, we recommend using the `startvs.cmd` command to launch Visual Studio.
101116

102117
## Building on command-line
103118

eng/Baseline.Designer.props

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -509,6 +509,17 @@
509509
<BaselinePackageReference Include="Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets" Version="[2.2.0, )" />
510510
<BaselinePackageReference Include="Microsoft.AspNetCore.Hosting" Version="[2.2.0, )" />
511511
</ItemGroup>
512+
<!-- Package: Microsoft.AspNetCore.Session-->
513+
<PropertyGroup Condition=" '$(PackageId)' == 'Microsoft.AspNetCore.Session' ">
514+
<BaselinePackageVersion>2.2.0</BaselinePackageVersion>
515+
</PropertyGroup>
516+
<ItemGroup Condition=" '$(PackageId)' == 'Microsoft.AspNetCore.Session' AND '$(TargetFramework)' == 'netstandard2.0' ">
517+
<BaselinePackageReference Include="Microsoft.AspNetCore.DataProtection" Version="[2.2.0, )" />
518+
<BaselinePackageReference Include="Microsoft.AspNetCore.Http.Abstractions" Version="[2.2.0, )" />
519+
<BaselinePackageReference Include="Microsoft.Extensions.Caching.Abstractions" Version="[2.2.0, )" />
520+
<BaselinePackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="[2.2.0, )" />
521+
<BaselinePackageReference Include="Microsoft.Extensions.Options" Version="[2.2.0, )" />
522+
</ItemGroup>
512523
<!-- Package: Microsoft.AspNetCore.StaticFiles-->
513524
<PropertyGroup Condition=" '$(PackageId)' == 'Microsoft.AspNetCore.StaticFiles' ">
514525
<BaselinePackageVersion>2.2.0</BaselinePackageVersion>

eng/Baseline.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@
5252
<Package Id="Microsoft.AspNetCore.Server.Kestrel.Transport.Libuv" Version="2.2.0" />
5353
<Package Id="Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets" Version="2.2.0" />
5454
<Package Id="Microsoft.AspNetCore.Server.Kestrel" Version="2.2.0" />
55+
<Package Id="Microsoft.AspNetCore.Session" Version="2.2.0" />
5556
<Package Id="Microsoft.AspNetCore.StaticFiles" Version="2.2.0" />
5657
<Package Id="Microsoft.AspNetCore.TestHost" Version="2.2.0" />
5758
<Package Id="Microsoft.AspNetCore.WebSockets" Version="2.2.0" />

eng/Dependencies.props

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,10 @@
1818
<LatestPackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="$(MicrosoftEntityFrameworkCoreSqlServerPackageVersion)" />
1919
<LatestPackageReference Include="Microsoft.EntityFrameworkCore" Version="$(MicrosoftEntityFrameworkCorePackageVersion)" />
2020
<LatestPackageReference Include="Microsoft.Extensions.ActivatorUtilities.Sources" Version="$(MicrosoftExtensionsActivatorUtilitiesSourcesPackageVersion)" />
21+
<LatestPackageReference Include="Microsoft.Extensions.Caching.Abstractions" Version="$(MicrosoftExtensionsCachingAbstractionsPackageVersion)" />
2122
<LatestPackageReference Include="Microsoft.Extensions.Caching.Memory" Version="$(MicrosoftExtensionsCachingMemoryPackageVersion)" />
23+
<LatestPackageReference Include="Microsoft.Extensions.Caching.StackExchangeRedis" Version="$(MicrosoftExtensionsCachingStackExchangeRedisPackageVersion)" />
24+
<LatestPackageReference Include="Microsoft.Extensions.Caching.SqlServer" Version="$(MicrosoftExtensionsCachingSqlServerPackageVersion)" />
2225
<LatestPackageReference Include="Microsoft.Extensions.ClosedGenericMatcher.Sources" Version="$(MicrosoftExtensionsClosedGenericMatcherSourcesPackageVersion)" />
2326
<LatestPackageReference Include="Microsoft.Extensions.CommandLineUtils.Sources" Version="$(MicrosoftExtensionsCommandLineUtilsSourcesPackageVersion)" />
2427
<LatestPackageReference Include="Microsoft.Extensions.Configuration.Abstractions" Version="$(MicrosoftExtensionsConfigurationAbstractionsPackageVersion)" />

eng/ProjectReferences.props

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@
4040
<ProjectReferenceProvider Include="Microsoft.AspNetCore.Server.Kestrel.Transport.Abstractions" ProjectPath="$(RepositoryRoot)src\Servers\Kestrel\Transport.Abstractions\src\Microsoft.AspNetCore.Server.Kestrel.Transport.Abstractions.csproj" />
4141
<ProjectReferenceProvider Include="Microsoft.AspNetCore.Server.Kestrel.Transport.Libuv" ProjectPath="$(RepositoryRoot)src\Servers\Kestrel\Transport.Libuv\src\Microsoft.AspNetCore.Server.Kestrel.Transport.Libuv.csproj" />
4242
<ProjectReferenceProvider Include="Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets" ProjectPath="$(RepositoryRoot)src\Servers\Kestrel\Transport.Sockets\src\Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets.csproj" />
43+
<ProjectReferenceProvider Include="Microsoft.AspNetCore.Session" ProjectPath="$(RepositoryRoot)src\Middleware\Session\src\Microsoft.AspNetCore.Session.csproj" />
4344
<ProjectReferenceProvider Include="dotnet-dev-certs" ProjectPath="$(RepositoryRoot)src\Tools\dotnet-dev-certs\src\dotnet-dev-certs.csproj" />
4445
<ProjectReferenceProvider Include="dotnet-sql-cache" ProjectPath="$(RepositoryRoot)src\Tools\dotnet-sql-cache\src\dotnet-sql-cache.csproj" />
4546
<ProjectReferenceProvider Include="dotnet-user-secrets" ProjectPath="$(RepositoryRoot)src\Tools\dotnet-user-secrets\src\dotnet-user-secrets.csproj" />

eng/targets/CSharp.Common.targets

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
<Project>
22

3+
<!-- For 'legacy' .csproj files, set map TargetFrameworkVersion back to TargetFramework -->
4+
<PropertyGroup Condition=" '$(TargetFramework)' == '' AND '$(TargetFrameworks)' == '' ">
5+
<TargetFramework>net$(TargetFrameworkVersion.Substring(1).Replace('.',''))</TargetFramework>
6+
<TargetFrameworkIdentifier>.NETFramework</TargetFrameworkIdentifier>
7+
</PropertyGroup>
8+
39
<Import Project="Packaging.targets" />
410
<Import Project="ResolveReferences.targets" />
511
</Project>

eng/targets/ResolveReferences.targets

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,12 +46,18 @@
4646
<ProjectReference Include="@(_ProjectReferenceByAssemblyName->'%(ProjectPath)')" />
4747

4848
<Reference Remove="@(_ProjectReferenceByAssemblyName)" />
49+
50+
<!-- Use _ReferenceTemp to workaround issues in Visual Studio which causes a conflict between Reference, packages, and projects. -->
51+
<_ReferenceTemp Include="@(Reference)" />
52+
<Reference Remove="@(Reference)" />
4953
</ItemGroup>
5054

5155
<Target Name="ResolveCustomReferences" BeforeTargets="CollectPackageReferences;ResolveAssemblyReferencesDesignTime;ResolveAssemblyReferences" Condition=" '$(TargetFramework)' != '' ">
5256
<ItemGroup>
53-
<UnusedBaselinePackageReference Include="@(BaselinePackageReference)" Exclude="@(Reference);@(_ProjectReferenceByAssemblyName)" />
57+
<Reference Include="@(_ReferenceTemp)" />
58+
<_ReferenceTemp Remove="@(_ReferenceTemp)" />
5459

60+
<UnusedBaselinePackageReference Include="@(BaselinePackageReference)" Exclude="@(Reference);@(_ProjectReferenceByAssemblyName)" />
5561
<!--
5662
MSBuild does not provide a way to join on matching identities in a Condition,
5763
but you can do a cartesian product of two item groups and filter out mismatched id's in a second pass.

0 commit comments

Comments
 (0)