diff --git a/eng/Versions.props b/eng/Versions.props index 39226f308c2fb..532de001ecbad 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -14,7 +14,7 @@ 1 - 7.$(MinorVersion).0.0 + $(MajorVersion).$(MinorVersion).0.0 false release diff --git a/eng/testing/ForXHarness.Directory.Build.props b/eng/testing/ForXHarness.Directory.Build.props new file mode 100644 index 0000000000000..c835925772726 --- /dev/null +++ b/eng/testing/ForXHarness.Directory.Build.props @@ -0,0 +1,10 @@ + + + + $([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory)../, global.json))/ + $([MSBuild]::NormalizeDirectory($(RepositoryRoot), 'artifacts', 'obj', $(MSBuildProjectName))) + $([MSBuild]::NormalizeDirectory($(BaseIntermediateOutputPath), $(Configuration))) + $([MSBuild]::NormalizeDirectory($(RepositoryRoot), 'artifacts', 'bin', $(MSBuildProjectName), $(Configuration))) + + diff --git a/eng/testing/ForXHarness.Directory.Build.targets b/eng/testing/ForXHarness.Directory.Build.targets new file mode 100644 index 0000000000000..b0536128f9410 --- /dev/null +++ b/eng/testing/ForXHarness.Directory.Build.targets @@ -0,0 +1,4 @@ + + + diff --git a/eng/testing/linker/SupportFiles/Directory.Build.targets b/eng/testing/linker/SupportFiles/Directory.Build.targets index e735d71fa0f72..255b943ad3f8e 100644 --- a/eng/testing/linker/SupportFiles/Directory.Build.targets +++ b/eng/testing/linker/SupportFiles/Directory.Build.targets @@ -1,6 +1,6 @@ - + $([MSBuild]::NormalizeDirectory('$(MSBuildProjectDirectory)', '$(OutputPath)', 'AppBundle')) diff --git a/src/libraries/Common/tests/System/Net/Prerequisites/LocalEchoServer.helix.targets b/src/libraries/Common/tests/System/Net/Prerequisites/LocalEchoServer.helix.targets new file mode 100644 index 0000000000000..80f1eb750e10f --- /dev/null +++ b/src/libraries/Common/tests/System/Net/Prerequisites/LocalEchoServer.helix.targets @@ -0,0 +1,17 @@ + + + + $(HelixExtensionTargets);_AddMiddlewarePayload + $([MSBuild]::NormalizeDirectory('$(ArtifactsDir)', 'bin', 'NetCoreServer', '$(Configuration)', '$(AspNetCoreAppCurrent)')) + $([MSBuild]::NormalizeDirectory('$(ArtifactsDir)', 'bin', 'RemoteLoopServer', '$(Configuration)', '$(AspNetCoreAppCurrent)')) + + + + + + + + + diff --git a/src/libraries/Common/tests/System/Net/Prerequisites/LocalEchoServer.props b/src/libraries/Common/tests/System/Net/Prerequisites/LocalEchoServer.props index 9b7b8670f463a..8d6f6da581d0d 100644 --- a/src/libraries/Common/tests/System/Net/Prerequisites/LocalEchoServer.props +++ b/src/libraries/Common/tests/System/Net/Prerequisites/LocalEchoServer.props @@ -1,5 +1,8 @@ + <_TargetFrameworkForXHarness>$(AspNetCoreAppCurrent) + $(MSBuildThisFileDirectory)LocalEchoServer.helix.targets + <_TestEchoMiddleware Condition="'$(ContinuousIntegrationBuild)' == 'true' and '$(OS)' == 'Windows_NT'">%HELIX_CORRELATION_PAYLOAD%/xharness/TestEchoMiddleware <_TestEchoMiddleware Condition="'$(ContinuousIntegrationBuild)' == 'true' and '$(OS)' != 'Windows_NT'">$HELIX_CORRELATION_PAYLOAD/xharness/TestEchoMiddleware @@ -15,6 +18,25 @@ $(WasmXHarnessArgs) --web-server-middleware=$(_RemoteLoopMiddleware)/RemoteLoopServer.dll,RemoteLoopServer.GenericHandler $(WasmXHarnessArgs) --web-server-middleware=$(_TestEchoMiddleware)/NetCoreServer.dll,NetCoreServer.GenericHandler + + + + + + + + diff --git a/src/libraries/Common/tests/System/Net/Prerequisites/NetCoreServer/Directory.Build.props b/src/libraries/Common/tests/System/Net/Prerequisites/NetCoreServer/Directory.Build.props new file mode 100644 index 0000000000000..65a9a7c3bf478 --- /dev/null +++ b/src/libraries/Common/tests/System/Net/Prerequisites/NetCoreServer/Directory.Build.props @@ -0,0 +1,7 @@ + + + $([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory)../, global.json))/ + + + + diff --git a/src/libraries/Common/tests/System/Net/Prerequisites/NetCoreServer/Directory.Build.targets b/src/libraries/Common/tests/System/Net/Prerequisites/NetCoreServer/Directory.Build.targets new file mode 100644 index 0000000000000..242d10ebfa0fa --- /dev/null +++ b/src/libraries/Common/tests/System/Net/Prerequisites/NetCoreServer/Directory.Build.targets @@ -0,0 +1,7 @@ + + + $([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory)../, global.json))/ + + + + diff --git a/src/libraries/Common/tests/System/Net/Prerequisites/NetCoreServer/NetCoreServer.csproj b/src/libraries/Common/tests/System/Net/Prerequisites/NetCoreServer/NetCoreServer.csproj index b32c7b1153cad..a654a21e298c0 100644 --- a/src/libraries/Common/tests/System/Net/Prerequisites/NetCoreServer/NetCoreServer.csproj +++ b/src/libraries/Common/tests/System/Net/Prerequisites/NetCoreServer/NetCoreServer.csproj @@ -1,10 +1,12 @@ - $(AspNetCoreAppCurrent) + $(_TargetFrameworkForXHarness) + $(AspNetCoreAppCurrent) InProcess Exe false + false $(DefineConstants);GENEVA_TELEMETRY diff --git a/src/libraries/Common/tests/System/Net/Prerequisites/RemoteLoopServer/Directory.Build.props b/src/libraries/Common/tests/System/Net/Prerequisites/RemoteLoopServer/Directory.Build.props new file mode 100644 index 0000000000000..65a9a7c3bf478 --- /dev/null +++ b/src/libraries/Common/tests/System/Net/Prerequisites/RemoteLoopServer/Directory.Build.props @@ -0,0 +1,7 @@ + + + $([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory)../, global.json))/ + + + + diff --git a/src/libraries/Common/tests/System/Net/Prerequisites/RemoteLoopServer/Directory.Build.targets b/src/libraries/Common/tests/System/Net/Prerequisites/RemoteLoopServer/Directory.Build.targets new file mode 100644 index 0000000000000..242d10ebfa0fa --- /dev/null +++ b/src/libraries/Common/tests/System/Net/Prerequisites/RemoteLoopServer/Directory.Build.targets @@ -0,0 +1,7 @@ + + + $([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory)../, global.json))/ + + + + diff --git a/src/libraries/Common/tests/System/Net/Prerequisites/RemoteLoopServer/RemoteLoopServer.csproj b/src/libraries/Common/tests/System/Net/Prerequisites/RemoteLoopServer/RemoteLoopServer.csproj index ba8a85a059c54..7475870be37a2 100644 --- a/src/libraries/Common/tests/System/Net/Prerequisites/RemoteLoopServer/RemoteLoopServer.csproj +++ b/src/libraries/Common/tests/System/Net/Prerequisites/RemoteLoopServer/RemoteLoopServer.csproj @@ -1,9 +1,12 @@ - $(AspNetCoreAppCurrent) + $(_TargetFrameworkForXHarness) + $(AspNetCoreAppCurrent) InProcess Exe + false + false diff --git a/src/libraries/Microsoft.VisualBasic.Core/Directory.Build.props b/src/libraries/Microsoft.VisualBasic.Core/Directory.Build.props index 03812cb338676..e1dd239477f25 100644 --- a/src/libraries/Microsoft.VisualBasic.Core/Directory.Build.props +++ b/src/libraries/Microsoft.VisualBasic.Core/Directory.Build.props @@ -4,8 +4,7 @@ $([MSBuild]::Add($(MajorVersion), 5)) - - 12.$(MinorVersion).0.0 + $(MajorVersion).$(MinorVersion).0.0 Microsoft true diff --git a/src/libraries/System.Diagnostics.EventLog/src/CompatibilitySuppressions.xml b/src/libraries/System.Diagnostics.EventLog/src/CompatibilitySuppressions.xml index 1da76fc4ded03..03b9b4ff68aeb 100644 --- a/src/libraries/System.Diagnostics.EventLog/src/CompatibilitySuppressions.xml +++ b/src/libraries/System.Diagnostics.EventLog/src/CompatibilitySuppressions.xml @@ -2,16 +2,8 @@ CP0004 - System.Diagnostics.EventLog.Messages, Version=7.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51 - left - runtimes/win/lib/net6.0/System.Diagnostics.EventLog.Messages.dll - - - CP0004 - System.Diagnostics.EventLog.Messages, Version=7.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51 - left - runtimes/win/lib/net7.0/System.Diagnostics.EventLog.Messages.dll - + System.Diagnostics.EventLog.Messages, Version=8.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51 + CP0015 F:System.Diagnostics.Eventing.Reader.StandardEventKeywords.CorrelationHint:[T:System.ObsoleteAttribute] diff --git a/src/libraries/System.Net.Http/tests/FunctionalTests/System.Net.Http.Functional.Tests.csproj b/src/libraries/System.Net.Http/tests/FunctionalTests/System.Net.Http.Functional.Tests.csproj index 83b3bb8da2808..416a0fae6a17f 100644 --- a/src/libraries/System.Net.Http/tests/FunctionalTests/System.Net.Http.Functional.Tests.csproj +++ b/src/libraries/System.Net.Http/tests/FunctionalTests/System.Net.Http.Functional.Tests.csproj @@ -1,4 +1,6 @@ + + ../../src/Resources/Strings.resx $(DefineConstants);SYSNETHTTP_NO_OPENSSL;HTTP3 @@ -38,16 +40,6 @@ - - - - - - - - - diff --git a/src/libraries/System.Net.WebSockets.Client/tests/System.Net.WebSockets.Client.Tests.csproj b/src/libraries/System.Net.WebSockets.Client/tests/System.Net.WebSockets.Client.Tests.csproj index 7aff0244108ee..f0ba87aa3c6c5 100644 --- a/src/libraries/System.Net.WebSockets.Client/tests/System.Net.WebSockets.Client.Tests.csproj +++ b/src/libraries/System.Net.WebSockets.Client/tests/System.Net.WebSockets.Client.Tests.csproj @@ -1,4 +1,6 @@ + + ../src/Resources/Strings.resx $(NetCoreAppCurrent);$(NetCoreAppCurrent)-Browser @@ -17,8 +19,6 @@ $(DefineConstants);TARGET_BROWSER - - @@ -26,13 +26,6 @@ - - - - - - - diff --git a/src/libraries/System.Net.WebSockets.Client/tests/wasm/System.Net.WebSockets.Client.Wasm.Tests.csproj b/src/libraries/System.Net.WebSockets.Client/tests/wasm/System.Net.WebSockets.Client.Wasm.Tests.csproj index 32bdd962dfeb0..0a27428b1d7fb 100644 --- a/src/libraries/System.Net.WebSockets.Client/tests/wasm/System.Net.WebSockets.Client.Wasm.Tests.csproj +++ b/src/libraries/System.Net.WebSockets.Client/tests/wasm/System.Net.WebSockets.Client.Wasm.Tests.csproj @@ -1,4 +1,6 @@ + + ../../src/Resources/Strings.resx $(NetCoreAppCurrent)-Browser @@ -13,16 +15,6 @@ $(DefineConstants);TARGET_BROWSER - - - - - - - - - diff --git a/src/libraries/System.Resources.Extensions/tests/System.Resources.Extensions.Tests.csproj b/src/libraries/System.Resources.Extensions/tests/System.Resources.Extensions.Tests.csproj index ad289dc63190c..f8a1aed6152a1 100644 --- a/src/libraries/System.Resources.Extensions/tests/System.Resources.Extensions.Tests.csproj +++ b/src/libraries/System.Resources.Extensions/tests/System.Resources.Extensions.Tests.csproj @@ -26,11 +26,13 @@ - + Important: + When invoking this target, pass the target framework in as well, substituting + the X with the current major version: + dotnet build -f netX.0-windows /t:GenerateTestResourcesFile. --> <_executor>Microsoft.DotNet.RemoteExecutor.dll diff --git a/src/libraries/System.Resources.Extensions/tests/TestData.resources b/src/libraries/System.Resources.Extensions/tests/TestData.resources index 9b9413df94091..00f4f0b1aff01 100644 Binary files a/src/libraries/System.Resources.Extensions/tests/TestData.resources and b/src/libraries/System.Resources.Extensions/tests/TestData.resources differ diff --git a/src/libraries/System.Runtime.Serialization.Xml/tests/XsdDataContractExporterTests/ExporterTypesTests.cs b/src/libraries/System.Runtime.Serialization.Xml/tests/XsdDataContractExporterTests/ExporterTypesTests.cs index 211d201329659..6c9ac368fae3f 100644 --- a/src/libraries/System.Runtime.Serialization.Xml/tests/XsdDataContractExporterTests/ExporterTypesTests.cs +++ b/src/libraries/System.Runtime.Serialization.Xml/tests/XsdDataContractExporterTests/ExporterTypesTests.cs @@ -69,16 +69,26 @@ public void TypesTest() SchemaUtils.OrderedContains(@"", ref schemas); } + public static IEnumerable GetDynamicallyVersionedTypesTestNegativeData() + { + // Need this case in a member data because inline data only accepts constant expressions + yield return new object[] { + typeof(TypeWithReadWriteCollectionAndNoCtorOnCollection), + typeof(InvalidDataContractException), + $@"System.Runtime.Serialization.Xml.XsdDataContractExporterTests.ExporterTypesTests+CollectionWithoutParameterlessCtor`1[[System.Runtime.Serialization.Xml.XsdDataContractExporterTests.ExporterTypesTests+Person, System.Runtime.Serialization.Xml.Tests, Version={Reflection.Assembly.GetExecutingAssembly().GetName().Version.Major}.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51]] does not have a default constructor." + }; + } + [Theory] [SkipOnPlatform(TestPlatforms.Browser, "Inconsistent and unpredictable results.")] // TODO - Why does 'TypeWithReadWriteCollectionAndNoCtorOnCollection' only cause an exception sometimes, but not all the time? What's special about wasm here? [InlineData(typeof(NoDataContractWithoutParameterlessConstructor), typeof(InvalidDataContractException), @"Type 'System.Runtime.Serialization.Xml.XsdDataContractExporterTests.ExporterTypesTests+NoDataContractWithoutParameterlessConstructor' cannot be serialized. Consider marking it with the DataContractAttribute attribute, and marking all of its members you want serialized with the DataMemberAttribute attribute. Alternatively, you can ensure that the type is public and has a parameterless constructor - all public members of the type will then be serialized, and no attributes will be required.")] [InlineData(typeof(DataContractWithInvalidMember), typeof(InvalidDataContractException), @"Type 'System.Runtime.Serialization.Xml.XsdDataContractExporterTests.ExporterTypesTests+NoDataContractWithoutParameterlessConstructor' cannot be serialized. Consider marking it with the DataContractAttribute attribute, and marking all of its members you want serialized with the DataMemberAttribute attribute. Alternatively, you can ensure that the type is public and has a parameterless constructor - all public members of the type will then be serialized, and no attributes will be required.")] [InlineData(typeof(SerializableWithInvalidMember), typeof(InvalidDataContractException), @"Type 'System.Runtime.Serialization.Xml.XsdDataContractExporterTests.ExporterTypesTests+NoDataContractWithoutParameterlessConstructor' cannot be serialized. Consider marking it with the DataContractAttribute attribute, and marking all of its members you want serialized with the DataMemberAttribute attribute. Alternatively, you can ensure that the type is public and has a parameterless constructor - all public members of the type will then be serialized, and no attributes will be required.")] - [InlineData(typeof(TypeWithReadWriteCollectionAndNoCtorOnCollection), typeof(InvalidDataContractException), @"System.Runtime.Serialization.Xml.XsdDataContractExporterTests.ExporterTypesTests+CollectionWithoutParameterlessCtor`1[[System.Runtime.Serialization.Xml.XsdDataContractExporterTests.ExporterTypesTests+Person, System.Runtime.Serialization.Xml.Tests, Version=7.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51]] does not have a default constructor.")] // Yes, the exception type for this next one is different. It was different in NetFx as well. [InlineData(typeof(ArrayContainer), typeof(InvalidOperationException), @"DataContract for type 'System.Runtime.Serialization.Xml.XsdDataContractExporterTests.ExporterTypesTests+ArrayB' cannot be added to DataContractSet since type 'System.Runtime.Serialization.Xml.XsdDataContractExporterTests.ExporterTypesTests+ArrayA' with the same data contract name 'Array' in namespace 'http://schemas.datacontract.org/2004/07/System.Runtime.Serialization.Xml.XsdDataContractExporterTests' is already present and the contracts are not equivalent.")] [InlineData(typeof(KeyValueNameSame), typeof(InvalidDataContractException), @"The collection data contract type 'System.Runtime.Serialization.Xml.XsdDataContractExporterTests.ExporterTypesTests+KeyValueNameSame' specifies the same value 'MyName' for both the KeyName and the ValueName properties. This is not allowed. Consider changing either the KeyName or the ValueName property.")] [InlineData(typeof(AnyWithRoot), typeof(InvalidDataContractException), @"Type 'System.Runtime.Serialization.Xml.XsdDataContractExporterTests.ExporterTypesTests+AnyWithRoot' cannot specify an XmlRootAttribute attribute because its IsAny setting is 'true'. This type must write all its contents including the root element. Verify that the IXmlSerializable implementation is correct.")] + [MemberData(nameof(GetDynamicallyVersionedTypesTestNegativeData))] public void TypesTest_Negative(Type badType, Type exType, string exMsg = null) { XsdDataContractExporter exporter = new XsdDataContractExporter(); diff --git a/src/libraries/System.Runtime.Serialization.Xml/tests/XsdDataContractExporterTests/SurrogateTests.cs b/src/libraries/System.Runtime.Serialization.Xml/tests/XsdDataContractExporterTests/SurrogateTests.cs index 7a2c32aa527d9..8e17f7b375610 100644 --- a/src/libraries/System.Runtime.Serialization.Xml/tests/XsdDataContractExporterTests/SurrogateTests.cs +++ b/src/libraries/System.Runtime.Serialization.Xml/tests/XsdDataContractExporterTests/SurrogateTests.cs @@ -38,6 +38,7 @@ public void SurrogateProvider(Type type, ISerializationSurrogateProvider surroga } public static IEnumerable SurrogateProvider_MemberData() { + int majorVersion = Assembly.GetExecutingAssembly().GetName().Version.Major; yield return new object[] { typeof(SurrogateTests.CircleContainer), new NodeToSerializableNode(new CircleToSquare(new XmlSerializerToXmlFormatter(null))), (string s, XmlSchemaSet ss) => { SchemaUtils.OrderedContains(@"", ref s); @@ -55,7 +56,7 @@ public static IEnumerable SurrogateProvider_MemberData() SchemaUtils.OrderedContains(@"", ref s); SchemaUtils.OrderedContains(@"", ref s); SchemaUtils.OrderedContains(@"0", ref s); - SchemaUtils.OrderedContains(@"7", ref s); + SchemaUtils.OrderedContains($@"{majorVersion}", ref s); SchemaUtils.OrderedContains(@"0", ref s); SchemaUtils.OrderedContains(@"0", ref s); SchemaUtils.OrderedContains(@"", ref s); @@ -69,7 +70,7 @@ public static IEnumerable SurrogateProvider_MemberData() SchemaUtils.OrderedContains(@"", ref s); SchemaUtils.OrderedContains(@"", ref s); SchemaUtils.OrderedContains(@"0", ref s); - SchemaUtils.OrderedContains(@"7", ref s); + SchemaUtils.OrderedContains($@"{majorVersion}", ref s); SchemaUtils.OrderedContains(@"0", ref s); SchemaUtils.OrderedContains(@"0", ref s); SchemaUtils.OrderedContains(@"", ref s); diff --git a/src/libraries/sendtohelix-wasm.targets b/src/libraries/sendtohelix-wasm.targets index 12edd38bd0575..44b4968d1fc21 100644 --- a/src/libraries/sendtohelix-wasm.targets +++ b/src/libraries/sendtohelix-wasm.targets @@ -22,8 +22,6 @@ <_workItemTimeout Condition="'$(NeedsToBuildWasmAppsOnHelix)' == 'true'">01:00:00 $([MSBuild]::NormalizeDirectory('$(RepoRoot)', 'src', 'mono', 'wasm', 'build')) - $([MSBuild]::NormalizeDirectory('$(ArtifactsDir)', 'bin', 'NetCoreServer', '$(Configuration)', '$(AspNetCoreAppCurrent)')) - $([MSBuild]::NormalizeDirectory('$(ArtifactsDir)', 'bin', 'RemoteLoopServer', '$(Configuration)', '$(AspNetCoreAppCurrent)')) <_ShippingPackagesPath>$([MSBuild]::NormalizeDirectory($(ArtifactsDir), 'packages', $(Configuration), 'Shipping')) $(Scenario)- @@ -57,7 +55,7 @@ true - + <_HelixLocalNodePath Condition="'$(NeedsEMSDKNode)' == 'true' and '$(WindowsShell)' != 'true'">$HELIX_CORRELATION_PAYLOAD/build/emsdk-node @@ -186,11 +184,6 @@ - - - - - diff --git a/src/mono/wasm/build/WasmApp.InTree.props b/src/mono/wasm/build/WasmApp.InTree.props index 4949caa40e6ed..4889116746b3a 100644 --- a/src/mono/wasm/build/WasmApp.InTree.props +++ b/src/mono/wasm/build/WasmApp.InTree.props @@ -11,7 +11,16 @@ true partial false + + false + true + + false + false + false + true + <_MonoRuntimeComponentDontLink Include="libmono-component-debugger-stub-static.a" /> diff --git a/src/mono/wasm/build/WasmApp.InTree.targets b/src/mono/wasm/build/WasmApp.InTree.targets index c4d37a5a061e7..0a2f332c2a718 100644 --- a/src/mono/wasm/build/WasmApp.InTree.targets +++ b/src/mono/wasm/build/WasmApp.InTree.targets @@ -4,7 +4,7 @@ - + @@ -19,19 +19,6 @@ - - - - <_LocalMicrosoftNetCoreAppRuntimePackDir>$([MSBuild]::NormalizeDirectory($(ArtifactsBinDir), 'microsoft.netcore.app.runtime.browser-wasm', $(Configuration))) - - - - - - - diff --git a/src/tests/Common/wasm-test-runner/WasmTestRunner.proj b/src/tests/Common/wasm-test-runner/WasmTestRunner.proj index c653f98c47bff..4bf0bb896ef70 100644 --- a/src/tests/Common/wasm-test-runner/WasmTestRunner.proj +++ b/src/tests/Common/wasm-test-runner/WasmTestRunner.proj @@ -5,6 +5,7 @@ + false false $(CORE_ROOT)\runtimepack-non-existent $(CORE_ROOT)\runtimepack