Skip to content

Change V4 .NET Framework target from 4.6.2 to 4.7.2 #3346

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

Merged
merged 4 commits into from
Jun 19, 2024

Conversation

normj
Copy link
Member

@normj normj commented Jun 18, 2024

Description

Change the .NET Framework target to 4.7.2. This was decided based on usage we see for 4.6.2 and wanting to have access to newer Crypto algorithms and fixes in the System.Uri class.

I also added the LangVersion in the generated project files. In PR 3293 LangVersion was set in the core project for .NET Standard so I decided since I was updated all the project files I might as well get LangVersion set consistently across the SDK.

Commit 8a215a - This is all of the manual changes needed to change the target to 4.7.2
Commit 453b01 - The files changes after running the generator.

I have confirmed the .NET Framework solution compiles and ran the unit tests for core solution. Internal build system will also need to be updated for the .NET Framework 4.7.2 for a full test pass.

@dscpinheiro dscpinheiro self-requested a review June 18, 2024 14:39
@dscpinheiro dscpinheiro added the v4 label Jun 18, 2024
@boblodgett boblodgett self-requested a review June 18, 2024 17:19
Copy link
Contributor

@boblodgett boblodgett left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Run a git clean -fxd then search the codebase for net462 there are a few changes in build.proj, CoreNuspec.tt, and Nuspec.tt that need to be updated. I also see a couple in AWSSDK.IntegrationTest*. Generator rerun will also be required.

@boblodgett
Copy link
Contributor

boblodgett commented Jun 18, 2024

There are also references to net45 still from doing a search. If we don't fix them in this PR we will need to do so in another. Possibly a tasks to update the API Docs, Generator, and Protocol tests.

@normj
Copy link
Member Author

normj commented Jun 18, 2024

Run a git clean -fxd then search the codebase for net462 there are a few changes in build.proj, CoreNuspec.tt, and Nuspec.tt that need to be updated. I also see a couple in AWSSDK.IntegrationTest*. Generator rerun will also be required.

Done. The generator changes are in the nuspec files which are not checked in. So after running the generator nothing was changed. Below is are examples of the generated nuspec files.

Core:

<?xml version="1.0" encoding="utf-8"?>
<package> 
  <metadata> 
    <id>AWSSDK.Core</id>
    <title>AWSSDK - Core Runtime</title>
    <version>4.0.0.0-preview</version> 
    <authors>Amazon Web Services</authors>
    <description>The Amazon Web Services SDK for .NET - Core Runtime</description>
    <language>en-US</language>
    <license type="expression">Apache-2.0</license>
    <projectUrl>https://github.com/aws/aws-sdk-net/</projectUrl>
    <tags>AWS Amazon cloud aws-sdk-v4</tags>
    <icon>images\AWSLogo.png</icon>
    <dependencies>
      <group targetFramework="net472">
        <dependency id="System.Buffers" version="4.5.1" />
        <dependency id="System.Memory" version="4.5.5" />
        <dependency id="System.Text.Json" version="8.0.3" />
      </group>
      <group targetFramework="netstandard2.0">
        <dependency id="Microsoft.Bcl.AsyncInterfaces" version="1.1.0" />
        <dependency id="System.Buffers" version="4.5.1" />
        <dependency id="System.Memory" version="4.5.5" />
        <dependency id="System.Text.Json" version="8.0.3" />
      </group>
      <group targetFramework="netcoreapp3.1">
      </group>
      <group targetFramework="net8.0">
      </group>        
    </dependencies>
  </metadata> 
  <files>
    <file src="..\..\nuget-content\AWSLogo.png" target="images\" />
    <file src="..\..\nuget-content\account-management.ps1" target="tools" />

    <file src=".\bin\Release\net472\AWSSDK.Core.dll" target="lib\net472" />
    <file src=".\bin\Release\net472\AWSSDK.Core.xml" target="lib\net472" />
    <file src=".\bin\Release\net472\AWSSDK.Core.pdb" target="lib\net472" />

    <file src=".\bin\Release\netstandard2.0\AWSSDK.Core.dll" target="lib\netstandard2.0"/>
    <file src=".\bin\Release\netstandard2.0\AWSSDK.Core.xml" target="lib\netstandard2.0"/>
    <file src=".\bin\Release\netstandard2.0\AWSSDK.Core.pdb" target="lib\netstandard2.0"/>

    <file src=".\bin\Release\netcoreapp3.1\AWSSDK.Core.dll" target="lib\netcoreapp3.1"/>
    <file src=".\bin\Release\netcoreapp3.1\AWSSDK.Core.xml" target="lib\netcoreapp3.1"/>
    <file src=".\bin\Release\netcoreapp3.1\AWSSDK.Core.pdb" target="lib\netcoreapp3.1"/>

    <file src=".\bin\Release\net8.0\AWSSDK.Core.dll" target="lib\net8.0"/>
    <file src=".\bin\Release\net8.0\AWSSDK.Core.xml" target="lib\net8.0"/>
    <file src=".\bin\Release\net8.0\AWSSDK.Core.pdb" target="lib\net8.0"/>
  </files>
</package>

DynamoDB:

<?xml version="1.0" encoding="utf-8"?>
<package> 
  <metadata> 
    <id>AWSSDK.DynamoDBv2</id>
    <title>AWSSDK - DynamoDBv2</title>
    <version>4.0.0.0-preview</version> 
    <authors>Amazon Web Services</authors>
    <description>Amazon DynamoDB is a fast and flexible NoSQL database service for all applications that need consistent, single-digit millisecond latency at any scale.</description>
    <language>en-US</language>
    <license type="expression">Apache-2.0</license>
    <projectUrl>https://github.com/aws/aws-sdk-net/</projectUrl>
    <tags>AWS Amazon cloud DynamoDB aws-sdk-v4</tags>
    <icon>images\AWSLogo.png</icon>
    <dependencies>
      <group>
        <dependency id="AWSSDK.Core" version="[4.0.0.0-preview, 5.0-preview)" />
      </group>
    </dependencies>
  </metadata> 
  <files>
    <file src="..\..\..\nuget-content\AWSLogo.png" target="images\" />
    <file src="..\..\..\code-analysis\ServiceAnalysis\DynamoDBv2\bin\Release\*.dll" target="analyzers\dotnet\cs" exclude="**\Microsoft.CodeAnalysis.*;**\System.Collections.Immutable.*;**\System.Reflection.Metadata.*;**\System.Composition.*" />
    <file src="..\..\..\code-analysis\NuGetInstallScripts\*.ps1" target="tools\" />

    <file src=".\bin\Release\net472\AWSSDK.DynamoDBv2.dll" target="lib\net472" />
    <file src=".\bin\Release\net472\AWSSDK.DynamoDBv2.xml" target="lib\net472" />
    <file src=".\bin\Release\net472\AWSSDK.DynamoDBv2.pdb" target="lib\net472" />

    <file src=".\bin\Release\netstandard2.0\AWSSDK.DynamoDBv2.dll" target="lib\netstandard2.0" />
    <file src=".\bin\Release\netstandard2.0\AWSSDK.DynamoDBv2.xml" target="lib\netstandard2.0" />
    <file src=".\bin\Release\netstandard2.0\AWSSDK.DynamoDBv2.pdb" target="lib\netstandard2.0" />

    <file src=".\bin\Release\netcoreapp3.1\AWSSDK.DynamoDBv2.dll" target="lib\netcoreapp3.1" />
    <file src=".\bin\Release\netcoreapp3.1\AWSSDK.DynamoDBv2.xml" target="lib\netcoreapp3.1" />
    <file src=".\bin\Release\netcoreapp3.1\AWSSDK.DynamoDBv2.pdb" target="lib\netcoreapp3.1" />

    <file src=".\bin\Release\net8.0\AWSSDK.DynamoDBv2.dll" target="lib\net8.0" />
    <file src=".\bin\Release\net8.0\AWSSDK.DynamoDBv2.xml" target="lib\net8.0" />
    <file src=".\bin\Release\net8.0\AWSSDK.DynamoDBv2.pdb" target="lib\net8.0" />

  </files>
</package>

@normj
Copy link
Member Author

normj commented Jun 18, 2024

There are also references to net45 still from doing a search. If we don't fix them in this PR we will need to do so in another. Possibly a tasks to update the API Docs, Generator, and Protocol tests.

The net45 references are either legitimate for the packages.config file for old .NET Framework projects or orphaned build scripts/tools that I would rather be taken care of separate then this PR.

@boblodgett
Copy link
Contributor

There are also references to net45 still from doing a search. If we don't fix them in this PR we will need to do so in another. Possibly a tasks to update the API Docs, Generator, and Protocol tests.

The net45 references are either legitimate for the packages.config file for old .NET Framework projects or orphaned build scripts/tools that I would rather be taken care of separate then this PR.

Fine shoring up net45 bcl35 in another task There are project files that references /net45/ csproj though so they are not all orphaned.

@boblodgett
Copy link
Contributor

.\aws-sdk-net\extensions\src\AWSSDK.Extensions.CrtIntegration\AWSSDK.Extensions.CrtIntegration.nuspec

Still have net462 references that need to be net472 since it is not a generated file.

...
    <dependencies>
      <group targetFramework="net462">
        <dependency id="AWSSDK.Core" version="3.7.300" />
        <dependency id="AWSCRT-AUTH" version="0.4.4" />
        <dependency id="AWSCRT-CHECKSUMS" version="0.4.4" />
      </group>
...
    </dependencies>

  </metadata> 
  <files>
...
    <file src=".\bin\Release\net462\AWSSDK.Extensions.CrtIntegration.dll" target="lib\net462" />
    <file src=".\bin\Release\net462\AWSSDK.Extensions.CrtIntegration.pdb" target="lib\net462" />

  ...
  </files>
</package>

@normj normj force-pushed the normj-framework472 branch from d1d0004 to 20a449f Compare June 18, 2024 20:37
@normj
Copy link
Member Author

normj commented Jun 18, 2024

Updated AWSSDK.Extensions.CrtIntegration.nuspec references to 4.7.2 also changed the reference of AWSSDK.Core to 4.0.0.0-preview

@boblodgett
Copy link
Contributor

I am approving this because it isn't directly related to net472 but is related to the nuspec dependency 4.0.0.0-preview added in AWSSDK.Extensions.CrtIntegration.nuspec. Do we need to make changes to:

extensions/src/AWSSDK.Extensions.NETCore.Setup/AWSSDK.Extensions.NETCore.Setup.csproj
extensions/src/AWSSDK.Extensions.NETCore.Setup/AWSSDK.Extensions.NETCore.Setup.nuspec

So that NetCore.Setup doesn't require a second pass build.

@normj
Copy link
Member Author

normj commented Jun 19, 2024

I am approving this because it isn't directly related to net472 but is related to the nuspec dependency 4.0.0.0-preview added in AWSSDK.Extensions.CrtIntegration.nuspec. Do we need to make changes to:

extensions/src/AWSSDK.Extensions.NETCore.Setup/AWSSDK.Extensions.NETCore.Setup.csproj
extensions/src/AWSSDK.Extensions.NETCore.Setup/AWSSDK.Extensions.NETCore.Setup.nuspec

So that NetCore.Setup doesn't require a second pass build.

PR to clean up AWSSDK.Extensions.NETCore.Setup #3348

@normj normj merged commit 66786fc into v4-development Jun 19, 2024
1 check passed
@normj normj deleted the normj-framework472 branch June 19, 2024 13:09
Copy link

@Soosay86 Soosay86 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sdk/src/Services/ACMPCA/AWSSDK.ACMPCA..csproj

@normj
Copy link
Member Author

normj commented Aug 20, 2024

@Soosay86 did you have a question with your comment?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants