Skip to content

Commit 4f0653a

Browse files
committed
Merge branch 'main' into fix_console_write_on_ios
2 parents 47d8f01 + 7249ec4 commit 4f0653a

File tree

320 files changed

+1528
-9663
lines changed

Some content is hidden

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

320 files changed

+1528
-9663
lines changed

.vsconfig

100755100644
File mode changed.

Directory.Build.targets

Lines changed: 36 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<Project InitialTargets="ErrorForMissingPackageDescription;_OverridePackDependsOn">
1+
<Project InitialTargets="_OverridePackDependsOn">
22
<PropertyGroup>
33
<!--
44
For non-SDK projects that import this file and then import Microsoft.Common.targets,
@@ -54,12 +54,12 @@
5454
<PackageDescription Condition="'$(PackageDescription)' == '' and '$(UseRuntimePackageDisclaimer)' == 'true'">$(RuntimePackageDisclaimer)</PackageDescription>
5555
<!-- Keep in sync as required by the Packaging SDK in Arcade. -->
5656
<Description>$(PackageDescription)</Description>
57-
<GenerateNuspecDependsOn>AddNETStandardCompatErrorFileForPackaging;$(GenerateNuspecDependsOn)</GenerateNuspecDependsOn>
57+
<GenerateNuspecDependsOn>ErrorForMissingPackageDescription;$(GenerateNuspecDependsOn)</GenerateNuspecDependsOn>
5858
</PropertyGroup>
5959

6060
<!-- Remove when https://github.com/NuGet/Home/issues/10405 is implemented and consumed. -->
6161
<Target Name="ErrorForMissingPackageDescription"
62-
Condition="'$(IsPackable)' == 'true' and '$(PackageDescription)' == ''">
62+
Condition="'$(PackageDescription)' == ''">
6363
<Error Text="Required property 'PackageDescription' is missing for $(MSBuildProjectName)." />
6464
</Target>
6565

@@ -72,37 +72,41 @@
7272
</PropertyGroup>
7373
</Target>
7474

75-
<!-- Add targets file that marks a .NETStandard applicable tfm as unsupported. -->
76-
<Target Name="AddNETStandardCompatErrorFileForPackaging"
77-
Condition="'@(NETStandardCompatError)' != ''"
78-
Inputs="%(NETStandardCompatError.Identity)"
79-
Outputs="unused">
75+
<!--
76+
Arcade SDK versioning is defined by static properties in a targets file: work around this by
77+
moving properties based on versioning into a target.
78+
-->
79+
<Target Name="GetProductVersions">
8080
<PropertyGroup>
81-
<_NETStandardCompatErrorFilePath>$(BaseIntermediateOutputPath)netstandardcompaterrors\%(NETStandardCompatError.Identity)\$(PackageId).targets</_NETStandardCompatErrorFilePath>
82-
<_NETStandardCompatErrorFileTarget>NETStandardCompatError_$(PackageId.Replace('.', '_'))_$([System.String]::new('%(NETStandardCompatError.Supported)').Replace('.', '_'))</_NETStandardCompatErrorFileTarget>
83-
<_NETStandardCompatErrorFileContent>
84-
<![CDATA[<Project InitialTargets="$(_NETStandardCompatErrorFileTarget)">
85-
<Target Name="$(_NETStandardCompatErrorFileTarget)"
86-
Condition="'%24(SuppressTfmSupportBuildWarnings)' == ''">
87-
<Error Text="$(PackageId) doesn't support %24(TargetFramework). Consider updating your TargetFramework to %(NETStandardCompatError.Supported) or later." />
88-
</Target>
89-
</Project>]]>
90-
</_NETStandardCompatErrorFileContent>
91-
</PropertyGroup>
81+
<IncludePreReleaseLabelInPackageVersion Condition="'$(DotNetFinalVersionKind)' != 'release'">true</IncludePreReleaseLabelInPackageVersion>
82+
<IncludePreReleaseLabelInPackageVersion Condition="'$(SuppressFinalPackageVersion)' == 'true'">true</IncludePreReleaseLabelInPackageVersion>
83+
<IncludePreReleaseLabelInPackageVersion Condition="'$(IsShipping)' != 'true'">true</IncludePreReleaseLabelInPackageVersion>
84+
85+
<IncludeBuildNumberInPackageVersion Condition="'$(StabilizePackageVersion)' != 'true'">true</IncludeBuildNumberInPackageVersion>
86+
<IncludeBuildNumberInPackageVersion Condition="'$(SuppressFinalPackageVersion)' == 'true'">true</IncludeBuildNumberInPackageVersion>
87+
<IncludeBuildNumberInPackageVersion Condition="'$(IsShipping)' != 'true'">true</IncludeBuildNumberInPackageVersion>
9288

93-
<WriteLinesToFile File="$(_NETStandardCompatErrorFilePath)"
94-
Lines="$(_NETStandardCompatErrorFileContent)"
95-
Overwrite="true"
96-
WriteOnlyWhenDifferent="true" />
89+
<ProductVersionSuffix Condition="'$(IncludePreReleaseLabelInPackageVersion)' == 'true'">-$(VersionSuffix)</ProductVersionSuffix>
90+
<ProductBandVersion Condition="'$(ProductBandVersion)' == ''">$(MajorVersion).$(MinorVersion)</ProductBandVersion>
91+
<ProductionVersion Condition="'$(ProductionVersion)' == ''">$(ProductBandVersion).$(PatchVersion)</ProductionVersion>
92+
<ProductVersion>$(ProductionVersion)$(ProductVersionSuffix)</ProductVersion>
9793

98-
<ItemGroup>
99-
<None Include="$(_NETStandardCompatErrorFilePath)"
100-
PackagePath="buildTransitive\%(NETStandardCompatError.Identity)"
101-
Pack="true" />
102-
<None Include="$(PlaceholderFile)"
103-
PackagePath="buildTransitive\%(NETStandardCompatError.Supported)"
104-
Pack="true" />
105-
<FileWrites Include="$(_NETStandardCompatErrorFilePath)" />
106-
</ItemGroup>
94+
<SharedFrameworkNugetVersion>$(ProductVersion)</SharedFrameworkNugetVersion>
95+
<NuGetVersion>$(SharedFrameworkNugetVersion)</NuGetVersion>
96+
<InstallersRelativePath>Runtime/$(SharedFrameworkNugetVersion)/</InstallersRelativePath>
97+
98+
<!--
99+
By default, we are always building the nuget packages for HostPolicy, HostFXR and
100+
Dotnet/AppHost. Thus, the properties (below) are always set to $(ProductVersion).
101+
However, there are scenarios when only some of these components will change (e.g. during
102+
servicing, we may only change HostPolicy but not HostFXR and Dotnet/AppHost). In such cases,
103+
pass the appropriate version value(s) as argument to the build command in order to override;
104+
e.g. 'build -p:HostPolicyVersion=x.y.z ...'
105+
-->
106+
<HostVersion Condition="'$(HostVersion)' == ''">$(ProductVersion)</HostVersion>
107+
<AppHostVersion Condition="'$(AppHostVersion)' == ''">$(ProductVersion)</AppHostVersion>
108+
<HostResolverVersion Condition="'$(HostResolverVersion)' == ''">$(ProductVersion)</HostResolverVersion>
109+
<HostPolicyVersion Condition="'$(HostPolicyVersion)' == ''">$(ProductVersion)</HostPolicyVersion>
110+
</PropertyGroup>
107111
</Target>
108112
</Project>

eng/Subsets.props

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -290,7 +290,7 @@
290290

291291
<!-- Host sets -->
292292
<ItemGroup Condition="$(_subset.Contains('+host.native+'))">
293-
<CorehostProjectToBuild Include="$(InstallerProjectRoot)corehost.proj" SignPhase="Binaries" BuildInParallel="false" />
293+
<CorehostProjectToBuild Include="$(SharedNativeRoot)corehost\corehost.proj" SignPhase="Binaries" BuildInParallel="false" />
294294
<ProjectToBuild Include="@(CorehostProjectToBuild)" Pack="true" Category="host" />
295295
</ItemGroup>
296296

eng/native/gen-buildsys.cmd

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ if /i "%__Ninja%" == "1" (
2828
set __CmakeGenerator=Ninja
2929
) else (
3030
if /i NOT "%__Arch%" == "wasm" (
31+
if /i "%__VSVersion%" == "vs2022" (set __CmakeGenerator=%__CmakeGenerator% 17 2022)
3132
if /i "%__VSVersion%" == "vs2019" (set __CmakeGenerator=%__CmakeGenerator% 16 2019)
3233
if /i "%__VSVersion%" == "vs2017" (set __CmakeGenerator=%__CmakeGenerator% 15 2017)
3334

eng/packaging.targets

Lines changed: 45 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
<!-- Don't include target platform specific dependencies, since we use the target platform to represent RIDs instead -->
1313
<SuppressDependenciesWhenPacking Condition="'$(ExcludeFromPackage)' == 'true' or ('$(TargetsAnyOS)' != 'true' and $([MSBuild]::IsTargetFrameworkCompatible('$(TargetFramework)', 'net5.0')))">true</SuppressDependenciesWhenPacking>
1414
<PackageDesignerMarkerFile>$(MSBuildThisFileDirectory)useSharedDesignerContext.txt</PackageDesignerMarkerFile>
15-
<GenerateNuspecDependsOn>IncludeAnalyzersInPackage;$(GenerateNuspecDependsOn)</GenerateNuspecDependsOn>
15+
<BeforePack>AddNETStandardCompatErrorFileForPackaging;IncludeAnalyzersInPackage;$(BeforePack)</BeforePack>
1616
<!-- Generate packages in the allconfigurations build. -->
1717
<GeneratePackageOnBuild Condition="'$(BuildAllConfigurations)' == 'true'">true</GeneratePackageOnBuild>
1818
<!-- Search for the documentation file in the intellisense package and otherwise pick up the generated one. -->
@@ -127,4 +127,48 @@
127127
</ItemGroup>
128128
</Target>
129129

130+
<!-- Include a netstandard compat error if the project targets both .NETStandard and
131+
.NETCoreApp. This prohibits users to consume packages on an older .NETCoreApp version
132+
than the minimum supported one. -->
133+
<ItemGroup Condition="'$(DisableNETStandardCompatErrorForNETCoreApp)' != 'true'">
134+
<NETStandardCompatError Include="netcoreapp2.0"
135+
Supported="$(NetCoreAppMinimum)"
136+
Condition="$(TargetFrameworks.Contains('netstandard2.')) and
137+
($(TargetFrameworks.Contains('$(NetCoreAppMinimum)')) or $(TargetFrameworks.Contains('$(NetCoreAppCurrent)')))" />
138+
</ItemGroup>
139+
140+
<!-- Add targets file that marks a .NETStandard applicable tfm as unsupported. -->
141+
<Target Name="AddNETStandardCompatErrorFileForPackaging"
142+
Condition="'@(NETStandardCompatError)' != ''"
143+
Inputs="%(NETStandardCompatError.Identity)"
144+
Outputs="unused">
145+
<PropertyGroup>
146+
<_NETStandardCompatErrorFilePath>$(BaseIntermediateOutputPath)netstandardcompaterrors\%(NETStandardCompatError.Identity)\$(PackageId).targets</_NETStandardCompatErrorFilePath>
147+
<_NETStandardCompatErrorFileTarget>NETStandardCompatError_$(PackageId.Replace('.', '_'))_$([System.String]::new('%(NETStandardCompatError.Supported)').Replace('.', '_'))</_NETStandardCompatErrorFileTarget>
148+
<_NETStandardCompatErrorFileContent>
149+
<![CDATA[<Project InitialTargets="$(_NETStandardCompatErrorFileTarget)">
150+
<Target Name="$(_NETStandardCompatErrorFileTarget)"
151+
Condition="'%24(SuppressTfmSupportBuildWarnings)' == ''">
152+
<Error Text="$(PackageId) doesn't support %24(TargetFramework). Consider updating your TargetFramework to %(NETStandardCompatError.Supported) or later." />
153+
</Target>
154+
</Project>]]>
155+
</_NETStandardCompatErrorFileContent>
156+
</PropertyGroup>
157+
158+
<WriteLinesToFile File="$(_NETStandardCompatErrorFilePath)"
159+
Lines="$(_NETStandardCompatErrorFileContent)"
160+
Overwrite="true"
161+
WriteOnlyWhenDifferent="true" />
162+
163+
<ItemGroup>
164+
<None Include="$(_NETStandardCompatErrorFilePath)"
165+
PackagePath="buildTransitive\%(NETStandardCompatError.Identity)"
166+
Pack="true" />
167+
<None Include="$(PlaceholderFile)"
168+
PackagePath="buildTransitive\%(NETStandardCompatError.Supported)"
169+
Pack="true" />
170+
<FileWrites Include="$(_NETStandardCompatErrorFilePath)" />
171+
</ItemGroup>
172+
</Target>
173+
130174
</Project>

eng/slngen.template.proj

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66
<ItemGroup>
77
<ProjectReference Include="$(MSBuildThisFileDirectory)ref\*.*proj" />
88
<ProjectReference Include="$(MSBuildThisFileDirectory)src\*.*proj" />
9+
<!-- Keep in sync with https://github.com/dotnet/runtime/blob/4d82932722b56924598708f991961a75e5a90b36/src/libraries/Directory.Build.props#L31. -->
910
<ProjectReference Include="$(MSBuildThisFileDirectory)tests\**\*.Tests.*proj" />
11+
<ProjectReference Include="$(MSBuildThisFileDirectory)tests\**\*.UnitTests.*proj" />
1012
</ItemGroup>
11-
</Project>
13+
</Project>

src/coreclr/System.Private.CoreLib/System.Private.CoreLib.csproj

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<Project Sdk="Microsoft.NET.Sdk">
1+
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
44
<EnableDefaultItems>false</EnableDefaultItems>
@@ -136,7 +136,6 @@
136136
<Compile Include="$(BclSourcesRoot)\System\Diagnostics\StackFrame.CoreCLR.cs" />
137137
<Compile Include="$(BclSourcesRoot)\System\Diagnostics\StackFrameHelper.cs" />
138138
<Compile Include="$(BclSourcesRoot)\System\Diagnostics\StackTrace.CoreCLR.cs" />
139-
<Compile Include="$(BclSourcesRoot)\System\Diagnostics\SymbolStore\ISymWriter.cs" />
140139
<Compile Include="$(BclSourcesRoot)\System\Diagnostics\SymbolStore\SymAddressKind.cs" />
141140
<Compile Include="$(BclSourcesRoot)\System\Diagnostics\SymbolStore\Token.cs" />
142141
<Compile Include="$(BclSourcesRoot)\System\Enum.CoreCLR.cs" />
@@ -166,7 +165,6 @@
166165
<Compile Include="$(BclSourcesRoot)\System\Reflection\Emit\FieldBuilder.cs" />
167166
<Compile Include="$(BclSourcesRoot)\System\Reflection\Emit\GenericTypeParameterBuilder.cs" />
168167
<Compile Include="$(BclSourcesRoot)\System\Reflection\Emit\ILGenerator.cs" />
169-
<Compile Include="$(BclSourcesRoot)\System\Reflection\Emit\ISymWrapperCore.cs" />
170168
<Compile Include="$(BclSourcesRoot)\System\Reflection\Emit\LocalBuilder.cs" />
171169
<Compile Include="$(BclSourcesRoot)\System\Reflection\Emit\MethodBuilder.cs" />
172170
<Compile Include="$(BclSourcesRoot)\System\Reflection\Emit\MethodBuilderInstantiation.cs" />

src/coreclr/System.Private.CoreLib/src/System/Diagnostics/SymbolStore/ISymWriter.cs

Lines changed: 0 additions & 106 deletions
This file was deleted.

src/coreclr/System.Private.CoreLib/src/System/Reflection/Emit/AssemblyBuilder.cs

Lines changed: 3 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -304,18 +304,15 @@ internal static AssemblyBuilder InternalDefineDynamicAssembly(
304304
/// a transient module.
305305
/// </summary>
306306
[DynamicSecurityMethod] // Methods containing StackCrawlMark local var has to be marked DynamicSecurityMethod.
307-
public ModuleBuilder DefineDynamicModule(string name) =>
308-
DefineDynamicModuleInternal(name, emitSymbolInfo: false);
309-
310-
private ModuleBuilder DefineDynamicModuleInternal(string name, bool emitSymbolInfo)
307+
public ModuleBuilder DefineDynamicModule(string name)
311308
{
312309
lock (SyncRoot)
313310
{
314-
return DefineDynamicModuleInternalNoLock(name, emitSymbolInfo);
311+
return DefineDynamicModuleInternalNoLock(name);
315312
}
316313
}
317314

318-
private ModuleBuilder DefineDynamicModuleInternalNoLock(string name, bool emitSymbolInfo)
315+
private ModuleBuilder DefineDynamicModuleInternalNoLock(string name)
319316
{
320317
if (name == null)
321318
{
@@ -341,19 +338,6 @@ private ModuleBuilder DefineDynamicModuleInternalNoLock(string name, bool emitSy
341338
// Init(...) has already been called on _manifestModuleBuilder in InitManifestModule()
342339
ModuleBuilder dynModule = _manifestModuleBuilder;
343340

344-
// Create the symbol writer
345-
ISymbolWriter? writer = null;
346-
if (emitSymbolInfo)
347-
{
348-
writer = SymWrapperCore.SymWriter.CreateSymWriter();
349-
350-
// Pass the "real" module to the VM.
351-
// This symfile is never written to disk so filename does not matter.
352-
IntPtr pInternalSymWriter = ModuleBuilder.nCreateISymWriterForDynamicModule(dynModule.InternalModule, "Unused");
353-
((SymWrapperCore.SymWriter)writer).InternalSetUnderlyingWriter(pInternalSymWriter);
354-
}
355-
356-
dynModule.SetSymWriter(writer);
357341
_assemblyData._moduleBuilderList.Add(dynModule);
358342

359343
if (dynModule == _manifestModuleBuilder)

src/coreclr/System.Private.CoreLib/src/System/Reflection/Emit/DynamicILGenerator.cs

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -406,15 +406,6 @@ public override void UsingNamespace(string ns)
406406
throw new NotSupportedException(SR.InvalidOperation_NotAllowedInDynamicMethod);
407407
}
408408

409-
public override void MarkSequencePoint(ISymbolDocumentWriter document,
410-
int startLine,
411-
int startColumn,
412-
int endLine,
413-
int endColumn)
414-
{
415-
throw new NotSupportedException(SR.InvalidOperation_NotAllowedInDynamicMethod);
416-
}
417-
418409
public override void BeginScope()
419410
{
420411
throw new NotSupportedException(SR.InvalidOperation_NotAllowedInDynamicMethod);

0 commit comments

Comments
 (0)