aws / aws-extensions-for-dotnet-cli

Extensions to the dotnet CLI to simplify the process of building and publishing .NET Core applications to AWS services
Apache License 2.0
369 stars 86 forks source link

Don't use container project path for file lookup outside container #275

Closed Beau-Gosse-dev closed 1 year ago

Beau-Gosse-dev commented 1 year ago

Issue #, if available: https://github.com/aws/aws-extensions-for-dotnet-cli/issues/274

Description of changes: Pass down both the path in the container and on the host so different parts of the code can do what they need to.

This should also affect this line: https://github.com/Beau-Gosse-dev/aws-extensions-for-dotnet-cli/blob/master/src/Amazon.Lambda.Tools/LambdaDotNetCLIWrapper.cs#L342

This wasn't caught in tests because all tests had msbuild parameters passed, so this part of the code was never hit. This also changes the tests so that it will be hit in 2 cases.

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

Beau-Gosse-dev commented 1 year ago

A workaround for SAM CLI is here: https://github.com/aws/aws-extensions-for-dotnet-cli/issues/274#issuecomment-1507431721