Skip to content

Commit 354d859

Browse files
author
John Luo
authored
Manually add TypeForwardedTo in ref assemblies (#14538)
* Manually add TypeForwardedTo in ref assemblies * Pin ref assembly version to Major.Minor.0.0 * Disable MSB3243 warning * Pin pinning implementation assembly version * Use nuget.exe v5.3.0 which support icon metadata * Fixup nuspec packing
1 parent f05087b commit 354d859

28 files changed

+167
-20
lines changed

Directory.Build.targets

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,12 @@
105105
<Compile Include="$(SharedSourceRoot)ReferenceAssemblyInfo.cs" LinkBase="Properties" />
106106
</ItemGroup>
107107

108+
<PropertyGroup Condition="'$(Language)' == 'C#'">
109+
<!-- Reference assemblies should always use Major.Minor.0.0 for assembly versions even during servicing. Only the package version should be updated. -->
110+
<!-- Pinning the implementation assemblies at Major.Minor.0.0 as we figure out compiling against ref assemblies. -->
111+
<AssemblyVersion>$(AspNetCoreMajorVersion).$(AspNetCoreMinorVersion).0.0</AssemblyVersion>
112+
</PropertyGroup>
113+
108114
<ItemGroup>
109115
<KnownFrameworkReference Update="Microsoft.NETCore.App">
110116
<!-- Always update the 'latest version', whether the repo is servicing or not. -->

eng/targets/ReferenceAssembly.targets

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@
4747
<PropertyGroup>
4848
<_RefSourceOutputPath>$([System.IO.Directory]::GetParent('$(MSBuildProjectDirectory)'))/ref/</_RefSourceOutputPath>
4949
<_RefSourceFileName>$(AssemblyName).$(TargetFramework).cs</_RefSourceFileName>
50+
<_ManualRefSourceFileName>$(AssemblyName).Manual.cs</_ManualRefSourceFileName>
5051
<_RefSourceFileOutputPath>$(_RefSourceOutputPath)$(_RefSourceFileName)</_RefSourceFileOutputPath>
5152
</PropertyGroup>
5253

@@ -76,10 +77,16 @@
7677
</ItemGroup>
7778

7879
<PropertyGroup>
80+
<_ManualReferenceAssemblyContent />
81+
<_ManualReferenceAssemblyContent Condition="Exists('$(_RefSourceOutputPath)$(_ManualRefSourceFileName)')">
82+
<![CDATA[
83+
<Compile Include="$(_ManualRefSourceFileName)" />]]>
84+
</_ManualReferenceAssemblyContent>
85+
7986
<ReferencesContent>
8087
<![CDATA[
8188
<ItemGroup Condition="'%24(TargetFramework)' == '$(TargetFramework)'">
82-
<Compile Include="$(_RefSourceFileName)" />
89+
<Compile Include="$(_RefSourceFileName)" />]]>$(_ManualReferenceAssemblyContent)<![CDATA[
8390
@(FilteredOriginalReferences->'<Reference Include="%(Identity)" />', '%0A ')
8491
</ItemGroup>
8592
]]>

src/Components/Components/src/Microsoft.AspNetCore.Components.csproj

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,9 +53,8 @@
5353
<ItemGroup>
5454
<NuspecProperty Include="jsInteropPackageVersion=$(MicrosoftJSInteropPackageVersion)" />
5555
<NuspecProperty Condition="'$(DotNetBuildFromSource)' != 'true'" Include="systemComponentModelAnnotationsPackageVersion=$(SystemComponentModelAnnotationsPackageVersion)" />
56-
<NuspecProperty Include="OutputBinary=$(MSBuildProjectDirectory)\$(OutputPath)**\$(AssemblyName).dll" />
57-
<NuspecProperty Include="OutputSymbol=$(MSBuildProjectDirectory)\$(OutputPath)**\$(AssemblyName).pdb" />
58-
<NuspecProperty Include="OutputDocumentation=$(MSBuildProjectDirectory)\$(OutputPath)**\$(AssemblyName).xml" />
56+
<NuspecProperty Include="AssemblyName=$(AssemblyName)" />
57+
<NuspecProperty Include="OutputPath=$(OutputPath)" />
5958
<NuspecProperty Include="PackageIcon=$(PackageIconFullPath)" />
6059
</ItemGroup>
6160

src/Components/Components/src/Microsoft.AspNetCore.Components.multitarget.nuspec

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,9 @@
1818
<icon>packageIcon.png</icon>
1919
</metadata>
2020
<files>
21-
<file src="$OutputBinary$" target="lib\" />
22-
<file src="$OutputDocumentation$" target="lib\" />
23-
<file src="$OutputSymbol$" target="lib\" />
21+
<file src="$OutputPath$**\$AssemblyName$.dll" target="lib\" />
22+
<file src="$OutputPath$**\$AssemblyName$.pdb" target="lib\" />
23+
<file src="$OutputPath$**\$AssemblyName$.xml" target="lib\" />
2424
<file src="$PackageIcon$" target="" />
2525
<file src="..\..\THIRD-PARTY-NOTICES.txt" target=".\THIRD-PARTY-NOTICES.txt" />
2626
</files>

src/Components/Components/src/Microsoft.AspNetCore.Components.netcoreapp3.0.nuspec

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,9 @@
1212
<icon>packageIcon.png</icon>
1313
</metadata>
1414
<files>
15-
<file src="$OutputBinary$" target="lib\" />
16-
<file src="$OutputDocumentation$" target="lib\" />
17-
<file src="$OutputSymbol$" target="lib\" />
15+
<file src="$OutputPath$**\$AssemblyName$.dll" target="lib\" />
16+
<file src="$OutputPath$**\$AssemblyName$.pdb" target="lib\" />
17+
<file src="$OutputPath$**\$AssemblyName$.xml" target="lib\" />
1818
<file src="$PackageIcon$" target="" />
1919
<file src="..\..\THIRD-PARTY-NOTICES.txt" target=".\THIRD-PARTY-NOTICES.txt" />
2020
</files>

src/Framework/ref/Microsoft.AspNetCore.App.Ref.csproj

Lines changed: 24 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,10 +36,17 @@ This package is an internal implementation of the .NET Core SDK and is not meant
3636

3737
<!-- Reference implementation assemblies in addition to ref assemblies to get xml docs -->
3838
<ReferenceImplementationAssemblies>true</ReferenceImplementationAssemblies>
39+
<!-- We are ignoring MSB3243 warnings since implemenation and reference assemblies are versioned differently. We need both to compose the targeting pack with reference assemblies and xml docs. -->
40+
<MSBuildWarningsAsMessages>MSB3243</MSBuildWarningsAsMessages >
3941

4042
<!-- Platform manifest data -->
4143
<FrameworkListFileName>FrameworkList.xml</FrameworkListFileName>
4244
<FrameworkListOutputPath>$(ArtifactsObjDir)$(FrameworkListFileName)</FrameworkListOutputPath>
45+
46+
<!-- Platform manifest and package override metatdata -->
47+
<ReferencePackSharedFxVersion>$(AspNetCoreMajorVersion).$(AspNetCoreMinorVersion).0</ReferencePackSharedFxVersion>
48+
<ReferencePackSharedFxVersion Condition="'$(VersionSuffix)' != ''">$(ReferencePackSharedFxVersion)-$(VersionSuffix)</ReferencePackSharedFxVersion>
49+
<ReferencePlatformManifestOutputPath>$(ArtifactsObjDir)ref\PlatformManifest.txt</ReferencePlatformManifestOutputPath>
4350
</PropertyGroup>
4451

4552
<ItemGroup>
@@ -93,6 +100,7 @@ This package is an internal implementation of the .NET Core SDK and is not meant
93100

94101
<!-- This target finds the reference assemblies. -->
95102
<Target Name="_ResolveTargetingPackContent"
103+
Returns="@(AspNetCoreReferenceAssemblyPath)"
96104
BeforeTargets="_GetPackageFiles"
97105
DependsOnTargets="ResolveReferences;FindReferenceAssembliesForReferences">
98106
<ItemGroup>
@@ -109,28 +117,42 @@ This package is an internal implementation of the .NET Core SDK and is not meant
109117
Exclude="
110118
@(_SelectedExtensionsRefAssemblies);
111119
@(ReferencePathWithRefAssemblies->WithMetadataValue('NuGetPackageId', 'Microsoft.NETCore.App.Ref'));
120+
@(ReferencePathWithRefAssemblies->WithMetadataValue('IsReferenceAssembly', 'false'));
112121
@(ReferencePathWithRefAssemblies->WithMetadataValue('ReferenceGrouping', 'Microsoft.NETCore.App'));" />
113122

114123
<AspNetCoreReferenceAssemblyPath
115124
Include="@(_SelectedExtensionsRefAssemblies->'$(MicrosoftInternalExtensionsRefsPath)%(FileName)%(Extension)')" />
116125

117126
<AspNetCoreReferenceDocXml Include="@(_ResolvedProjectReferencePaths->WithMetadataValue('IsReferenceAssembly', 'false')->'%(RootDir)%(Directory)%(FileName).xml')" />
118127
<AspNetCoreReferenceDocXml Include="@(_SelectedExtensionsRefAssemblies->'$(MicrosoftInternalExtensionsRefsPath)%(FileName).xml')" />
128+
</ItemGroup>
129+
130+
<RepoTasks.GenerateSharedFrameworkDepsFile
131+
DepsFilePath="$(ProjectDepsFilePath)"
132+
TargetFramework="$(TargetFramework)"
133+
FrameworkName="$(TargetingPackName)"
134+
FrameworkVersion="$(ReferencePackSharedFxVersion)"
135+
References="@(AspNetCoreReferenceAssemblyPath)"
136+
RuntimeIdentifier="$(TargetRuntimeIdentifier)"
137+
RuntimePackageName="$(PackageId)"
138+
PlatformManifestOutputPath="$(ReferencePlatformManifestOutputPath)" />
119139

140+
<ItemGroup>
120141
<RefPackContent Include="@(AspNetCoreReferenceAssemblyPath)" PackagePath="$(RefAssemblyPackagePath)" />
121142
<RefPackContent Include="@(AspNetCoreReferenceDocXml)" PackagePath="$(RefAssemblyPackagePath)" />
122143
<RefPackContent Include="$(TargetDir)$(PackageConflictManifestFileName)" PackagePath="$(ManifestsPackagePath)" />
123-
<RefPackContent Include="$(PlatformManifestOutputPath)" PackagePath="$(ManifestsPackagePath)" />
144+
<RefPackContent Include="$(ReferencePlatformManifestOutputPath)" PackagePath="$(ManifestsPackagePath)" />
124145
</ItemGroup>
125146
</Target>
126147

127148
<Target Name="GeneratePackageConflictManifest"
128149
DependsOnTargets="ResolveReferences"
129150
Inputs="$(MSBuildAllProjects)"
130151
Outputs="$(TargetDir)$(PackageConflictManifestFileName)">
152+
131153
<ItemGroup>
132154
<_AspNetCoreAppPackageOverrides Include="@(ReferencePath->'%(NuGetPackageId)|%(NuGetPackageVersion)')" Condition=" '%(ReferencePath.NuGetPackageId)' != 'Microsoft.NETCore.App' AND '%(ReferencePath.NuGetSourceType)' == 'Package' " />
133-
<_AspNetCoreAppPackageOverrides Include="@(ReferencePath->'%(FileName)|$(SharedFxVersion)')" Condition=" '%(ReferencePath.ReferenceSourceTarget)' == 'ProjectReference' " />
155+
<_AspNetCoreAppPackageOverrides Include="@(ReferencePath->'%(FileName)|$(ReferencePackSharedFxVersion)')" Condition=" '%(ReferencePath.ReferenceSourceTarget)' == 'ProjectReference' AND '%(ReferencePath.IsReferenceAssembly)' == 'true' " />
134156
</ItemGroup>
135157

136158
<WriteLinesToFile

src/Framework/test/Microsoft.AspNetCore.App.UnitTests.csproj

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,13 @@
5353
</ItemGroup>
5454

5555
<Target Name="GenerateTestData" BeforeTargets="GetAssemblyAttributes" DependsOnTargets="InitializeSourceControlInformation">
56+
<!-- Use the ref pack logic to compute the list of expected targeting pack content -->
57+
<MSBuild Projects="$(RepoRoot)src\Framework\ref\Microsoft.AspNetCore.App.Ref.csproj"
58+
Targets="_ResolveTargetingPackContent"
59+
SkipNonexistentProjects="false">
60+
<Output TaskParameter="TargetOutputs" ItemName="_TargetingPackDependencies" />
61+
</MSBuild>
62+
5663
<!-- This target is defined in eng/targets/Packaging.targets and included in every C# and F# project. -->
5764
<MSBuild Projects="$(RepoRoot)src\Framework\src\Microsoft.AspNetCore.App.Runtime.csproj"
5865
Targets="_GetPackageVersionInfo"
@@ -68,6 +75,11 @@
6875
</MSBuild>
6976

7077
<ItemGroup>
78+
<AssemblyAttribute Include="Microsoft.AspNetCore.TestData">
79+
<_Parameter1>TargetingPackDependencies</_Parameter1>
80+
<_Parameter2>@(_TargetingPackDependencies)</_Parameter2>
81+
</AssemblyAttribute>
82+
7183
<AssemblyAttribute Include="Microsoft.AspNetCore.TestData">
7284
<_Parameter1>RepositoryCommit</_Parameter1>
7385
<_Parameter2>$(SourceRevisionId)</_Parameter2>

src/Framework/test/TargetingPackTests.cs

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,8 +59,15 @@ public void AssembliesAreReferenceAssemblies()
5959
public void PlatformManifestListsAllFiles()
6060
{
6161
var platformManifestPath = Path.Combine(_targetingPackRoot, "data", "PlatformManifest.txt");
62-
var expectedAssemblies = TestData.GetSharedFxDependencies()
62+
var expectedAssemblies = TestData.GetTargetingPackDependencies()
6363
.Split(';', StringSplitOptions.RemoveEmptyEntries)
64+
.Select(i =>
65+
{
66+
var fileName = Path.GetFileName(i);
67+
return fileName.EndsWith(".dll", StringComparison.Ordinal)
68+
? fileName.Substring(0, fileName.Length - 4)
69+
: fileName;
70+
})
6471
.ToHashSet();
6572

6673
_output.WriteLine("==== file contents ====");

src/Framework/test/TestData.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@ public class TestData
1818

1919
public static string GetSharedFxDependencies() => GetTestDataValue("SharedFxDependencies");
2020

21+
public static string GetTargetingPackDependencies() => GetTestDataValue("TargetingPackDependencies");
22+
2123
public static string GetTestDataValue(string key)
2224
=> typeof(TestData).Assembly.GetCustomAttributes<TestDataAttribute>().Single(d => d.Key == key).Value;
2325
}
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
// Copyright (c) .NET Foundation. All rights reserved.
2+
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
3+
4+
using System.Runtime.CompilerServices;
5+
using Microsoft.AspNetCore.Routing;
6+
using Microsoft.AspNetCore.Http;
7+
using Microsoft.AspNetCore.Http.Features;
8+
9+
[assembly: TypeForwardedTo(typeof(IEndpointFeature))]
10+
[assembly: TypeForwardedTo(typeof(IRouteValuesFeature))]
11+
[assembly: TypeForwardedTo(typeof(Endpoint))]
12+
[assembly: TypeForwardedTo(typeof(EndpointMetadataCollection))]
13+
[assembly: TypeForwardedTo(typeof(RouteValueDictionary))]

src/Http/Routing.Abstractions/ref/Microsoft.AspNetCore.Routing.Abstractions.csproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
</PropertyGroup>
66
<ItemGroup Condition="'$(TargetFramework)' == 'netcoreapp3.0'">
77
<Compile Include="Microsoft.AspNetCore.Routing.Abstractions.netcoreapp3.0.cs" />
8+
<Compile Include="Microsoft.AspNetCore.Routing.Abstractions.Manual.cs" />
89
<Reference Include="Microsoft.AspNetCore.Http.Abstractions" />
910
</ItemGroup>
1011
</Project>

src/Installers/Windows/GenerateNugetPackageWithMsi.ps1

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,8 @@ param(
1111
[Parameter(Mandatory=$true)][string]$PackageVersion,
1212
[Parameter(Mandatory=$true)][string]$RepoRoot,
1313
[Parameter(Mandatory=$true)][string]$MajorVersion,
14-
[Parameter(Mandatory=$true)][string]$MinorVersion
14+
[Parameter(Mandatory=$true)][string]$MinorVersion,
15+
[Parameter(Mandatory=$true)][string]$PackageIconPath
1516
)
1617

1718
$NuGetDir = Join-Path $RepoRoot "artifacts\Tools\nuget\$Name\$Architecture"
@@ -24,8 +25,8 @@ if (-not (Test-Path $NuGetDir)) {
2425
if (-not (Test-Path $NuGetExe)) {
2526
# Using 3.5.0 to workaround https://github.com/NuGet/Home/issues/5016
2627
Write-Output "Downloading nuget.exe to $NuGetExe"
27-
wget https://dist.nuget.org/win-x86-commandline/latest/nuget.exe -OutFile $NuGetExe
28+
wget https://dist.nuget.org/win-x86-commandline/v5.3.0/nuget.exe -OutFile $NuGetExe
2829
}
2930

30-
& $NuGetExe pack $NuspecFile -Version $PackageVersion -OutputDirectory $OutputDirectory -NoDefaultExcludes -NoPackageAnalysis -Properties ASPNETCORE_RUNTIME_MSI=$MsiPath`;ASPNETCORE_CAB_FILE=$CabPath`;ARCH=$Architecture`;MAJOR=$MajorVersion`;MINOR=$MinorVersion`;
31+
& $NuGetExe pack $NuspecFile -Version $PackageVersion -OutputDirectory $OutputDirectory -NoDefaultExcludes -NoPackageAnalysis -Properties ASPNETCORE_RUNTIME_MSI=$MsiPath`;ASPNETCORE_CAB_FILE=$CabPath`;ARCH=$Architecture`;MAJOR=$MajorVersion`;MINOR=$MinorVersion`;PACKAGE_ICON_PATH=$PackageIconPath`;
3132
Exit $LastExitCode

src/Installers/Windows/SharedFramework/SharedFramework.wixproj

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,7 @@
106106
'$(_GeneratedPackageVersion)' ^
107107
'$(RepoRoot)' ^
108108
'$(AspNetCoreMajorVersion)' ^
109-
'$(AspNetCoreMinorVersion)'" />
109+
'$(AspNetCoreMinorVersion)' ^
110+
'$(PackageIconFullPath)'" />
110111
</Target>
111112
</Project>

src/Installers/Windows/SharedFramework/SharedFrameworkPackage.nuspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,6 @@
1616
<files>
1717
<file src="$ASPNETCORE_RUNTIME_MSI$" />
1818
<file src="$ASPNETCORE_CAB_FILE$" />
19-
<file src="$PackageIcon$" target="" />
19+
<file src="$PACKAGE_ICON_PATH$" target="" />
2020
</files>
2121
</package>

src/Installers/Windows/TargetingPack/TargetingPack.wixproj

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,7 @@
101101
'$(_GeneratedPackageVersion)' ^
102102
'$(RepoRoot)' ^
103103
'$(AspNetCoreMajorVersion)' ^
104-
'$(AspNetCoreMinorVersion)'" />
104+
'$(AspNetCoreMinorVersion)' ^
105+
'$(PackageIconFullPath)'" />
105106
</Target>
106107
</Project>

src/Installers/Windows/TargetingPack/TargetingPackPackage.nuspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,6 @@
1515
</metadata>
1616
<files>
1717
<file src="$ASPNETCORE_RUNTIME_MSI$" />
18-
<file src="$PackageIcon$" target="" />
18+
<file src="$PACKAGE_ICON_PATH$" target="" />
1919
</files>
2020
</package>
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
// Copyright (c) .NET Foundation. All rights reserved.
2+
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
3+
4+
using System.Runtime.CompilerServices;
5+
6+
[assembly: TypeForwardedTo(typeof(Microsoft.AspNetCore.Mvc.ApiExplorer.IApiDescriptionProvider))]
7+
[assembly: TypeForwardedTo(typeof(Microsoft.AspNetCore.Mvc.ApiExplorer.ApiDescription))]
8+
[assembly: TypeForwardedTo(typeof(Microsoft.AspNetCore.Mvc.ApiExplorer.ApiDescriptionProviderContext))]
9+
[assembly: TypeForwardedTo(typeof(Microsoft.AspNetCore.Mvc.ApiExplorer.ApiParameterDescription))]
10+
[assembly: TypeForwardedTo(typeof(Microsoft.AspNetCore.Mvc.ApiExplorer.ApiParameterRouteInfo))]
11+
[assembly: TypeForwardedTo(typeof(Microsoft.AspNetCore.Mvc.ApiExplorer.ApiRequestFormat))]
12+
[assembly: TypeForwardedTo(typeof(Microsoft.AspNetCore.Mvc.ApiExplorer.ApiResponseFormat))]
13+
[assembly: TypeForwardedTo(typeof(Microsoft.AspNetCore.Mvc.ApiExplorer.ApiResponseType))]

src/Mvc/Mvc.ApiExplorer/ref/Microsoft.AspNetCore.Mvc.ApiExplorer.csproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
</PropertyGroup>
66
<ItemGroup Condition="'$(TargetFramework)' == 'netcoreapp3.0'">
77
<Compile Include="Microsoft.AspNetCore.Mvc.ApiExplorer.netcoreapp3.0.cs" />
8+
<Compile Include="Microsoft.AspNetCore.Mvc.ApiExplorer.Manual.cs" />
89
<Reference Include="Microsoft.AspNetCore.Mvc.Core" />
910
</ItemGroup>
1011
</Project>
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
// Copyright (c) .NET Foundation. All rights reserved.
2+
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
3+
4+
using System.Runtime.CompilerServices;
5+
using Microsoft.AspNetCore.Mvc.Formatters;
6+
7+
[assembly: TypeForwardedTo(typeof(InputFormatterException))]

src/Mvc/Mvc.Core/ref/Microsoft.AspNetCore.Mvc.Core.csproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
</PropertyGroup>
66
<ItemGroup Condition="'$(TargetFramework)' == 'netcoreapp3.0'">
77
<Compile Include="Microsoft.AspNetCore.Mvc.Core.netcoreapp3.0.cs" />
8+
<Compile Include="Microsoft.AspNetCore.Mvc.Core.Manual.cs" />
89
<Reference Include="Microsoft.AspNetCore.Mvc.Abstractions" />
910
<Reference Include="Microsoft.AspNetCore.Authentication.Core" />
1011
<Reference Include="Microsoft.AspNetCore.Authorization.Policy" />
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
// Copyright (c) .NET Foundation. All rights reserved.
2+
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
3+
4+
using System.Runtime.CompilerServices;
5+
using Microsoft.AspNetCore.Mvc;
6+
7+
[assembly: TypeForwardedTo(typeof(JsonResult))]

src/Mvc/Mvc.Formatters.Json/ref/Microsoft.AspNetCore.Mvc.Formatters.Json.csproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
</PropertyGroup>
66
<ItemGroup Condition="'$(TargetFramework)' == 'netcoreapp3.0'">
77
<Compile Include="Microsoft.AspNetCore.Mvc.Formatters.Json.netcoreapp3.0.cs" />
8+
<Compile Include="Microsoft.AspNetCore.Mvc.Formatters.Json.Manual.cs" />
89
<Reference Include="Microsoft.AspNetCore.Mvc.Core" />
910
</ItemGroup>
1011
</Project>
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
// Copyright (c) .NET Foundation. All rights reserved.
2+
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
3+
4+
using System.Runtime.CompilerServices;
5+
using Microsoft.AspNetCore.Razor.TagHelpers;
6+
7+
[assembly: TypeForwardedTo(typeof(DefaultTagHelperContent))]
8+
[assembly: TypeForwardedTo(typeof(HtmlAttributeNameAttribute))]
9+
[assembly: TypeForwardedTo(typeof(HtmlAttributeNotBoundAttribute))]
10+
[assembly: TypeForwardedTo(typeof(HtmlTargetElementAttribute))]
11+
[assembly: TypeForwardedTo(typeof(ITagHelper))]
12+
[assembly: TypeForwardedTo(typeof(ITagHelperComponent))]
13+
[assembly: TypeForwardedTo(typeof(NullHtmlEncoder))]
14+
[assembly: TypeForwardedTo(typeof(OutputElementHintAttribute))]
15+
[assembly: TypeForwardedTo(typeof(ReadOnlyTagHelperAttributeList))]
16+
[assembly: TypeForwardedTo(typeof(RestrictChildrenAttribute))]
17+
[assembly: TypeForwardedTo(typeof(TagHelper))]
18+
[assembly: TypeForwardedTo(typeof(TagHelperAttribute))]
19+
[assembly: TypeForwardedTo(typeof(TagHelperAttributeList))]
20+
[assembly: TypeForwardedTo(typeof(TagHelperComponent))]
21+
[assembly: TypeForwardedTo(typeof(TagHelperContent))]
22+
[assembly: TypeForwardedTo(typeof(TagHelperContext))]
23+
[assembly: TypeForwardedTo(typeof(TagHelperOutput))]

src/Razor/Razor.Runtime/ref/Microsoft.AspNetCore.Razor.Runtime.csproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
</PropertyGroup>
66
<ItemGroup Condition="'$(TargetFramework)' == 'netcoreapp3.0'">
77
<Compile Include="Microsoft.AspNetCore.Razor.Runtime.netcoreapp3.0.cs" />
8+
<Compile Include="Microsoft.AspNetCore.Razor.Runtime.Manual.cs" />
89
<Reference Include="Microsoft.AspNetCore.Razor" />
910
<Reference Include="Microsoft.AspNetCore.Html.Abstractions" />
1011
</ItemGroup>
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
2+
// Copyright (c) .NET Foundation. All rights reserved.
3+
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
4+
5+
using System.Runtime.CompilerServices;
6+
using Microsoft.AspNetCore.Authorization;
7+
8+
// Microsoft.AspNetCore.Metadata
9+
[assembly: TypeForwardedTo(typeof(IAuthorizeData))]
10+
[assembly: TypeForwardedTo(typeof(IAllowAnonymous))]

0 commit comments

Comments
 (0)