Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update assembly version from hardcoded to MajorVersion #74157

Merged
merged 23 commits into from
Nov 2, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
b985a5d
Update assembly version from hardcoded to MajorVersion
carlossanlop Aug 18, 2022
371465c
Bump version to 8 in XsdDataContractExporterTests
carlossanlop Aug 24, 2022
6ef101c
Retrieve major version dynamically for expected message in TypesTest_…
carlossanlop Aug 24, 2022
0780ab4
Retrieve major version dynamically for expected message in SurrogateP…
carlossanlop Aug 24, 2022
b27254a
Manually generate the TestData.resources.
carlossanlop Aug 25, 2022
727f422
Avoid hardcoded 8 in additional SurrogateTests line
carlossanlop Oct 19, 2022
2ae65a5
Fix Diagnostics.EventLog supression message
carlossanlop Oct 24, 2022
cefdcea
Merge remote-tracking branch 'origin/main' into Net8Changes
radical Nov 1, 2022
4040569
Update assembly version from hardcoded to MajorVersion
carlossanlop Aug 18, 2022
c906e67
Bump version to 8 in XsdDataContractExporterTests
carlossanlop Aug 24, 2022
7085bbf
Retrieve major version dynamically for expected message in TypesTest_…
carlossanlop Aug 24, 2022
72a9121
Retrieve major version dynamically for expected message in SurrogateP…
carlossanlop Aug 24, 2022
9b7515e
Manually generate the TestData.resources.
carlossanlop Aug 25, 2022
38ef5be
Avoid hardcoded 8 in additional SurrogateTests line
carlossanlop Oct 19, 2022
d760fa5
Fix Diagnostics.EventLog supression message
carlossanlop Oct 24, 2022
d3bfb56
Extract the LocalEchoServer bits from the projects
radical Oct 28, 2022
63fe2dc
Build the LocalEchoServers specifically without using artifacts .
radical Oct 28, 2022
0ba793c
add missing files
radical Oct 28, 2022
8199b4b
[wasm] fixup extensions targets for LocalEchoServer
radical Nov 1, 2022
ad3c98a
[wasm] Use eng/targetingpacks.targets instead of wasm specific targets
radical Nov 1, 2022
5651091
[wasm] Avoid duplicate imports, and don't use the targetingpacks.targets
radical Nov 1, 2022
fcc492e
[wasm] Workaround for https://github.com/dotnet/runtime/issues/77707
radical Nov 1, 2022
889650f
Merge branch 'Net8Changes' of https://github.com/carlossanlop/runtime…
radical Nov 1, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion eng/Versions.props
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<PreReleaseVersionIteration>1</PreReleaseVersionIteration>
<!-- Set assembly version to align with major and minor version,
as for the patches and revisions should be manually updated per assembly if it is serviced. -->
<AssemblyVersion>7.$(MinorVersion).0.0</AssemblyVersion>
<AssemblyVersion>$(MajorVersion).$(MinorVersion).0.0</AssemblyVersion>
<!-- Enable to remove prerelease label. -->
<StabilizePackageVersion Condition="'$(StabilizePackageVersion)' == ''">false</StabilizePackageVersion>
<DotNetFinalVersionKind Condition="'$(StabilizePackageVersion)' == 'true'">release</DotNetFinalVersionKind>
Expand Down
10 changes: 10 additions & 0 deletions eng/testing/ForXHarness.Directory.Build.props
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<Project>
<!-- This is for use with projects that don't need to be built with artifacts. And
need to be loadable by xharness. For example, aspnetcore middleware -->
<PropertyGroup>
<RepositoryRoot>$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory)../, global.json))/</RepositoryRoot>
<BaseIntermediateOutputPath>$([MSBuild]::NormalizeDirectory($(RepositoryRoot), 'artifacts', 'obj', $(MSBuildProjectName)))</BaseIntermediateOutputPath>
<IntermediateOutputPath>$([MSBuild]::NormalizeDirectory($(BaseIntermediateOutputPath), $(Configuration)))</IntermediateOutputPath>
<OutputPath>$([MSBuild]::NormalizeDirectory($(RepositoryRoot), 'artifacts', 'bin', $(MSBuildProjectName), $(Configuration)))</OutputPath>
</PropertyGroup>
</Project>
4 changes: 4 additions & 0 deletions eng/testing/ForXHarness.Directory.Build.targets
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<Project>
<!-- This is for use with projects that don't need to be built with artifacts. And
need to be loadable by xharness. For example, aspnetcore middleware -->
</Project>
2 changes: 1 addition & 1 deletion eng/testing/linker/SupportFiles/Directory.Build.targets
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<Project>
<Import Project="$(RepositoryEngineeringDir)testing\tests.mobile.targets" Condition="'$(RuntimeIdentifier)' == 'browser-wasm'" />
<Import Project="$(RepositoryEngineeringDir)targetingpacks.targets" />
<Import Project="$(RepositoryEngineeringDir)targetingpacks.targets" Condition="'$(TargetingpacksTargetsImported)' != 'true'" />

<PropertyGroup>
<BundleDir>$([MSBuild]::NormalizeDirectory('$(MSBuildProjectDirectory)', '$(OutputPath)', 'AppBundle'))</BundleDir>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<Project>
<PropertyGroup Condition="'$(IsRunningLibraryTests)' == 'true' and
('$(Scenario)' == '' or '$(Scenario)' == 'normal' or
'$(Scenario)' == 'WasmTestOnBrowser' or '$(Scenario)' == 'WasmTestOnNodeJS')">

<HelixExtensionTargets>$(HelixExtensionTargets);_AddMiddlewarePayload</HelixExtensionTargets>
<TestEchoMiddleware>$([MSBuild]::NormalizeDirectory('$(ArtifactsDir)', 'bin', 'NetCoreServer', '$(Configuration)', '$(AspNetCoreAppCurrent)'))</TestEchoMiddleware>
<RemoteLoopMiddleware>$([MSBuild]::NormalizeDirectory('$(ArtifactsDir)', 'bin', 'RemoteLoopServer', '$(Configuration)', '$(AspNetCoreAppCurrent)'))</RemoteLoopMiddleware>
</PropertyGroup>

<Target Name="_AddMiddlewarePayload">
<ItemGroup>
<HelixCorrelationPayload Include="$(TestEchoMiddleware)" Destination="xharness/TestEchoMiddleware" Condition="Exists('$(TestEchoMiddleware)')" />
<HelixCorrelationPayload Include="$(RemoteLoopMiddleware)" Destination="xharness/RemoteLoopMiddleware" Condition="Exists('$(RemoteLoopMiddleware)')" />
</ItemGroup>
</Target>
</Project>
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
<Project>
<PropertyGroup Condition="'$(TargetOS)' == 'Browser'">
<_TargetFrameworkForXHarness>$(AspNetCoreAppCurrent)</_TargetFrameworkForXHarness>
<HelixTargetsFile>$(MSBuildThisFileDirectory)LocalEchoServer.helix.targets</HelixTargetsFile>

<!-- handle different path to middleware in Helix -->
<_TestEchoMiddleware Condition="'$(ContinuousIntegrationBuild)' == 'true' and '$(OS)' == 'Windows_NT'">%HELIX_CORRELATION_PAYLOAD%/xharness/TestEchoMiddleware</_TestEchoMiddleware>
<_TestEchoMiddleware Condition="'$(ContinuousIntegrationBuild)' == 'true' and '$(OS)' != 'Windows_NT'">$HELIX_CORRELATION_PAYLOAD/xharness/TestEchoMiddleware</_TestEchoMiddleware>
Expand All @@ -15,6 +18,25 @@
<WasmXHarnessArgs>$(WasmXHarnessArgs) --web-server-middleware=$(_RemoteLoopMiddleware)/RemoteLoopServer.dll,RemoteLoopServer.GenericHandler</WasmXHarnessArgs>
<WasmXHarnessArgs>$(WasmXHarnessArgs) --web-server-middleware=$(_TestEchoMiddleware)/NetCoreServer.dll,NetCoreServer.GenericHandler</WasmXHarnessArgs>
</PropertyGroup>

<ItemGroup Condition="'$(TargetOS)' == 'Browser'">
<!-- The middleware doesn't need to be built for browser-wasm, so remove the relevant properties.
Also, due to https://github.com/dotnet/runtime/issues/77707 RunAOTCompilation needs to be removed
as a workaround. -->
<ProjectReference
Include="$(CommonTestPath)System/Net/Prerequisites/NetCoreServer/NetCoreServer.csproj"
GlobalPropertiesToRemove="TargetOS;TargetArchitecture;RuntimeIdentifier;RunAOTCompilation"
AdditionalProperties="_TargetFrameworkForXHarness=$(_TargetFrameworkForXHarness);NewtonsoftJsonVersion=$(NewtonsoftJsonVersion)"
ReferenceOutputAssembly="false"/>
<ProjectReference
Include="$(CommonTestPath)System/Net/Prerequisites/RemoteLoopServer/RemoteLoopServer.csproj"
GlobalPropertiesToRemove="TargetOS;TargetArchitecture;RuntimeIdentifier;RunAOTCompilation"
AdditionalProperties="_TargetFrameworkForXHarness=$(_TargetFrameworkForXHarness)"
ReferenceOutputAssembly="false"/>
<Compile Include="$(CommonTestPath)System\Net\WebSockets\WebSocketStream.cs"
Link="Common\System\Net\WebSockets\WebSocketStream.cs" />
</ItemGroup>


<!-- Tests use self-signed certificates that are refused by NodeJS -->
<Target Name="AcceptUnauthorizedOnNodeJS" BeforeTargets="GenerateRunScript">
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<Project>
<PropertyGroup>
<RepositoryRoot>$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory)../, global.json))/</RepositoryRoot>
</PropertyGroup>

<Import Project="$([MSBuild]::NormalizePath($(RepositoryRoot), 'eng', 'testing', 'ForXHarness.Directory.Build.props'))" />
</Project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<Project>
<PropertyGroup>
<RepositoryRoot Condition="'$(RepositoryRoot)' == ''">$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory)../, global.json))/</RepositoryRoot>
</PropertyGroup>

<Import Project="$([MSBuild]::NormalizePath($(RepositoryRoot), 'eng', 'testing', 'ForXHarness.Directory.Build.targets'))" />
</Project>
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
<Project Sdk="Microsoft.NET.Sdk.Web">

<PropertyGroup>
<TargetFramework>$(AspNetCoreAppCurrent)</TargetFramework>
<TargetFramework>$(_TargetFrameworkForXHarness)</TargetFramework>
<TargetFramework Condition="'$(TargetFramework)' == ''">$(AspNetCoreAppCurrent)</TargetFramework>
<AspNetCoreHostingModel>InProcess</AspNetCoreHostingModel>
<OutputType>Exe</OutputType>
<EnableDefaultCompileItems>false</EnableDefaultCompileItems>
<EnableDefaultContentItems>false</EnableDefaultContentItems>

<DefineConstants Condition="'$(GenevaTelemetry)' == 'true'">$(DefineConstants);GENEVA_TELEMETRY</DefineConstants>
</PropertyGroup>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<Project>
<PropertyGroup>
<RepositoryRoot>$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory)../, global.json))/</RepositoryRoot>
</PropertyGroup>

<Import Project="$([MSBuild]::NormalizePath($(RepositoryRoot), 'eng', 'testing', 'ForXHarness.Directory.Build.props'))" />
</Project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<Project>
<PropertyGroup>
<RepositoryRoot Condition="'$(RepositoryRoot)' == ''">$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory)../, global.json))/</RepositoryRoot>
</PropertyGroup>

<Import Project="$([MSBuild]::NormalizePath($(RepositoryRoot), 'eng', 'testing', 'ForXHarness.Directory.Build.targets'))" />
</Project>
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
<Project Sdk="Microsoft.NET.Sdk.Web">

<PropertyGroup>
<TargetFramework>$(AspNetCoreAppCurrent)</TargetFramework>
<TargetFramework>$(_TargetFrameworkForXHarness)</TargetFramework>
<TargetFramework Condition="'$(TargetFramework)' == ''">$(AspNetCoreAppCurrent)</TargetFramework>
<AspNetCoreHostingModel>InProcess</AspNetCoreHostingModel>
<OutputType>Exe</OutputType>
<EnableDefaultCompileItems>false</EnableDefaultCompileItems>
<EnableDefaultContentItems>false</EnableDefaultContentItems>
</PropertyGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@
<!-- We need to set MajorVersion so that FileVersion is set correctly and is
greater than the one in the previous release -->
<MajorVersion>$([MSBuild]::Add($(MajorVersion), 5))</MajorVersion>
<!-- TODO: Change back to $(MajorVersion) when assembly versions are updated. -->
<AssemblyVersion>12.$(MinorVersion).0.0</AssemblyVersion>
<AssemblyVersion>$(MajorVersion).$(MinorVersion).0.0</AssemblyVersion>
<StrongNameKeyId>Microsoft</StrongNameKeyId>
<IncludePlatformAttributes>true</IncludePlatformAttributes>
</PropertyGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,8 @@
<Suppressions xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<Suppression>
<DiagnosticId>CP0004</DiagnosticId>
<Target>System.Diagnostics.EventLog.Messages, Version=7.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51</Target>
<Left>left</Left>
<Right>runtimes/win/lib/net6.0/System.Diagnostics.EventLog.Messages.dll</Right>
</Suppression>
<Suppression>
<DiagnosticId>CP0004</DiagnosticId>
<Target>System.Diagnostics.EventLog.Messages, Version=7.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51</Target>
<Left>left</Left>
<Right>runtimes/win/lib/net7.0/System.Diagnostics.EventLog.Messages.dll</Right>
</Suppression>
<Target>System.Diagnostics.EventLog.Messages, Version=8.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51</Target>
</Suppression>
<Suppression>
<DiagnosticId>CP0015</DiagnosticId>
<Target>F:System.Diagnostics.Eventing.Reader.StandardEventKeywords.CorrelationHint:[T:System.ObsoleteAttribute]</Target>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<Import Condition="'$(TargetOS)' == 'Browser'" Project="$(CommonTestPath)System/Net/Prerequisites/LocalEchoServer.props" />

<PropertyGroup>
<StringResourcesPath>../../src/Resources/Strings.resx</StringResourcesPath>
<DefineConstants>$(DefineConstants);SYSNETHTTP_NO_OPENSSL;HTTP3</DefineConstants>
Expand Down Expand Up @@ -38,16 +40,6 @@
<TrimmerRootDescriptor Include="$(MSBuildThisFileDirectory)ILLink.Descriptor.xml" Condition="'$(TargetOS)' == 'Browser'" />
</ItemGroup>

<Import Condition="'$(TargetOS)' == 'Browser'" Project="$(CommonTestPath)System/Net/Prerequisites/LocalEchoServer.props" />

<!-- Browser specific files -->
<ItemGroup Condition="'$(TargetOS)' == 'Browser'">
<ProjectReference Include="$(CommonTestPath)System/Net/Prerequisites/NetCoreServer/NetCoreServer.csproj" ReferenceOutputAssembly="false"/>
<ProjectReference Include="$(CommonTestPath)System/Net/Prerequisites/RemoteLoopServer/RemoteLoopServer.csproj" ReferenceOutputAssembly="false"/>
<Compile Include="$(CommonTestPath)System\Net\WebSockets\WebSocketStream.cs"
Link="Common\System\Net\WebSockets\WebSocketStream.cs" />
</ItemGroup>

<ItemGroup>
<Compile Include="$(CommonPath)DisableRuntimeMarshalling.cs"
Link="Common\DisableRuntimeMarshalling.cs" />
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<Import Condition="'$(TargetOS)' == 'Browser'" Project="$(CommonTestPath)System/Net/Prerequisites/LocalEchoServer.props" />

<PropertyGroup>
<StringResourcesPath>../src/Resources/Strings.resx</StringResourcesPath>
<TargetFrameworks>$(NetCoreAppCurrent);$(NetCoreAppCurrent)-Browser</TargetFrameworks>
Expand All @@ -17,22 +19,13 @@
<DefineConstants>$(DefineConstants);TARGET_BROWSER</DefineConstants>
</PropertyGroup>

<Import Condition="'$(TargetOS)' == 'Browser'" Project="$(CommonTestPath)System/Net/Prerequisites/LocalEchoServer.props" />

<ItemGroup>
<WasmExtraFilesToDeploy Include="package.json" />
<WasmExtraFilesToDeploy Include="package-lock.json" />

<NodeNpmModule Include="ws" Alias="WebSocket" />
</ItemGroup>

<!-- Browser specific files -->
<ItemGroup Condition="'$(TargetOS)' == 'Browser'">
<ProjectReference Include="$(CommonTestPath)System/Net/Prerequisites/NetCoreServer/NetCoreServer.csproj" ReferenceOutputAssembly="false" />
<ProjectReference Include="$(CommonTestPath)System/Net/Prerequisites/RemoteLoopServer/RemoteLoopServer.csproj" ReferenceOutputAssembly="false" />
<Compile Include="$(CommonTestPath)System\Net\WebSockets\WebSocketStream.cs" Link="Common\System\Net\WebSockets\WebSocketStream.cs" />
</ItemGroup>

<!-- Do not reference these assemblies from the TargetingPack since we are building part of the source code for tests. -->
<ItemGroup>
<DefaultReferenceExclusion Include="System.Configuration" />
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<Import Condition="'$(TargetOS)' == 'Browser'" Project="$(CommonTestPath)System/Net/Prerequisites/LocalEchoServer.props" />

<PropertyGroup>
<StringResourcesPath>../../src/Resources/Strings.resx</StringResourcesPath>
<TargetFramework>$(NetCoreAppCurrent)-Browser</TargetFramework>
Expand All @@ -13,16 +15,6 @@
<DefineConstants>$(DefineConstants);TARGET_BROWSER</DefineConstants>
</PropertyGroup>

<Import Condition="'$(TargetOS)' == 'Browser'" Project="$(CommonTestPath)System/Net/Prerequisites/LocalEchoServer.props" />

<!-- Browser specific files -->
<ItemGroup Condition="'$(TargetOS)' == 'Browser'">
<ProjectReference Include="$(CommonTestPath)System/Net/Prerequisites/NetCoreServer/NetCoreServer.csproj" ReferenceOutputAssembly="false"/>
<ProjectReference Include="$(CommonTestPath)System/Net/Prerequisites/RemoteLoopServer/RemoteLoopServer.csproj" ReferenceOutputAssembly="false"/>
<Compile Include="$(CommonTestPath)System\Net\WebSockets\WebSocketStream.cs"
Link="Common\System\Net\WebSockets\WebSocketStream.cs" />
</ItemGroup>

<!-- Do not reference these assemblies from the TargetingPack since we are building part of the source code for tests. -->
<ItemGroup>
<DefaultReferenceExclusion Include="System.Configuration" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,13 @@
<PackageReference Include="System.ValueTuple" Version="$(SystemValueTupleVersion)" />
</ItemGroup>

<!-- use the following target to regenerate the test resources file
<!-- Use the following target to regenerate the test resources file.
This is done from a test application and checked in so that we don't run
product code during the build.
Important: When invoking this target, pass the target framewok in as well,
i.e.: dotnet build -f net7.0-windows /t:GenerateTestResourcesFile. -->
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. -->
<Target Name="GenerateTestResourcesFile">
<PropertyGroup>
<_executor>Microsoft.DotNet.RemoteExecutor.dll</_executor>
Expand Down
Binary file not shown.
Loading