-
Notifications
You must be signed in to change notification settings - Fork 490
dotnet lambda package
does not allow custom parameters for the underlying dotnet publish
#210
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
Comments
Agreed, we need a parameter for passing in additional parameters to the underlying dotnet publish command. |
This might be of similar: I noticed that setting the C# version to 7.2 in
the csproj file is ignored by dotnet lambda publish... As far as I can
tell. I came across this when using the new async Main feature.
…On Tue, Jan 23, 2018, 8:21 PM Norm Johanson ***@***.***> wrote:
Agreed, we need a parameter for passing in additional parameters to the
underlying dotnet publish command.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#210 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ABBxJXXYy5IPtLnY3qGZPUhM1uU-Kb0kks5tNj9XgaJpZM4RqP2X>
.
|
FYI: before .net core 2, I didn't need to specify the option when doing a See https://github.com/dotnet/cli/issues/5331 for more information. |
I released version 2.1.0 of Amazon.Lambda.Tools today which has a new msbuild-parameters switch which pass the values down to the dotnet publish command. Also any commandline arguments that start with /p: are assumed to be msbuild parameters. So you can do |
I confirm that it works. I used version 2.1.0 of Amazon.Lambda.Tools + I added Thanks for the quick fix! |
When we build our .net core 2 assembly, we use the custom parameter
/p:Version=6.6.6
for thedotnet build
anddotnet publish
commands. This makes is possible to set the assembly version to 6.6.6.Unfortunately, when we do a
dotnet lambda package
, it callsdotnet publish
under the hood but it does not allow the/p:Version=6.6.6
parameter to be passed all the way todotnet publish
. As a result, the version of the assembly in the lambda ends-up at 1.0.0.Here's a powershell script that demonstrates the problem:
As you can see, after
dotnet build
my assembly version was properly set to 6.6.6.0. But unfortunately, afterdotnet lambda package
, it was set to 1.0.0.0 in the zip file that contains the lambda.Note that I am using Amazon.Lambda.Tools 2.0.1.
The text was updated successfully, but these errors were encountered: