aws-lambda-dotnet icon indicating copy to clipboard operation
aws-lambda-dotnet copied to clipboard

Fixed issue with creating projects from Lambda templates with .NET 7 installed.

Open normj opened this issue 3 years ago • 0 comments

Issue #, if available: https://github.com/aws/aws-lambda-dotnet/issues/1317

Description of changes: The Lambda templates were using a "deprecated" feature to handle the things like namespaces and filenames allowed different characters. For example if you create a project like Test-Test that is a valid name for the files and directories but due to the - it is an invalid namespace name. The original work around was to use a safe-sourcename replacement parameter using safe_namespace and safe_name macros.

For quite some time the .NET templating engine now handles this safe name logic automatically and the safe_namespace and safe_name macros no longer due anything. There was an intended change in the .NET 7 RC that broke those macros triggering a NPE. It sounds like the .NET templating engine will revert that change in a future release but since there is no need for our templates to use those macros I have stripped their usages out to unblock users with .NET 7 RC installed.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

normj avatar Sep 23 '22 22:09 normj