"sam build" for dotnetcore on Windows fails on first run
See original GitHub issueDescription
Briefly describe the bug you are facing.
Steps to reproduce
On Windows,
sam init --runtime dotnetcore2.0
sam build
Observed result
Please provide command output with --debug
flag set.
...
Created publish archive (C:\Users\Desktop\dev\myapp\src\HelloWorld\.aws-sam\build\HelloWorldFunction\HelloWorld.zip).
Lambda project successfully packaged: C:\Users\Desktop\dev\myapp\src\HelloWorld\.aws-sam\build\HelloWorldFunction\HelloWorld.zip
Build Failed
Error: DotnetCliPackageBuilder:RunPackageAction - [Errno 2] No such file or directory: '.aws-sam\\build\\HelloWorldFunction\\HelloWorld.zip'
...
Expected result
Build succeeds
Describe what you expected.
Additional environment details (Ex: Windows, Mac, Amazon Linux etc)
- OS: Windows
sam --version
: 0.14.2
Add --debug flag to command you are running
Issue Analytics
- State:
- Created 4 years ago
- Comments:6 (3 by maintainers)
Top Results From Across the Web
"sam build" for dotnetcore on Windows fails on first run #1101
Description Briefly describe the bug you are facing. Steps to reproduce On Windows, sam init --runtime dotnetcore2.0 sam build Observed ...
Read more >.net - sam build error - Command 'dotnet-lambda' conflicts with ...
So to rectify ( on windows ) go to your users folder/dotnet/tools/ and delete the 'dotnet-lambda' folder. Try the install again and see...
Read more >sam build - AWS Serverless Application Model
The sam build command processes your AWS SAM template file, application code, and any applicable language-specific files and dependencies. The command also ...
Read more >CoreWCF 1.0 has been Released, WCF for .NET Core and ...
The CoreWCF Project team has released the 1.0 version of CoreWCF, a port of WCF to the .NET Core platform. It provides a...
Read more >How to run ASP.NET Core & SQL Server from Docker
We will use EF Core to interact with the SQL Server Docker container. The full working solution can be found in this Github...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I know this is an old thread but make sure that you have dotnet-lambda in your path. On MacOSX I used:
export PATH=$PATH:~/.dotnet/tools
“”" Actions for .NET dependency resolution with CLI Package “”"
import threading import os import logging
from aws_lambda_builders.actions import BaseAction, Purpose, ActionFailedError from aws_lambda_builders.workflow import BuildMode from .utils import OSUtils from .dotnetcli import DotnetCLIExecutionError
LOG = logging.getLogger(name)
class GlobalToolInstallAction(BaseAction): __lock = threading.Lock() __tools_installed = False
class RunPackageAction(BaseAction): “”" A Lambda Builder Action which builds the .NET Core project using the Amazon.Lambda.Tools .NET Core Global Tool “”"