aws / aws-toolkit-visual-studio

AWS Toolkit for Visual Studio - a plugin to interact with AWS
https://aws.amazon.com/visualstudio/
Apache License 2.0
111 stars 29 forks source link

Deployment fails when publishing to elasticbeanstalk app #411

Closed chris-htd closed 8 months ago

chris-htd commented 8 months ago

Describe the bug Seems like the extension cant find the zip file that is generated during the build process. I can confirm that the file is not in the appdata/local/tmp directory.

I also had another user try it too and he received the same error message on different workstation

Publishing 'Cornerstone-main' to Amazon Web Services ...building deployment package 'C:\Users\neo\AppData\Local\Temp\AWSDeploymentArchive_Cornerstone-main_v20240328170433.zip' ...invoking 'C:\Program Files\IIS\Microsoft Web Deploy V3\msdeploy.exe -verb:sync -source:manifest="C:\Users\neo\AppData\Local\Temp\tmp1735.tmp" -dest:package="C:\Users\neo\AppData\Local\Temp\AWSDeploymentArchive_Cornerstone-main_v20240328170433.zip" -declareParam:name="IIS Web Application Name",kind="ProviderPath",scope="IisApp",match="^C:\\Users\\neo\\source\\repos\\cornerstone",defaultValue="Default Web Site/",tags=IisApp -declareParam:name="IIS Web Application Name",kind="ProviderPath",scope="setAcl",match="^C:\\Users\\neo\\source\\repos\\cornerstone",tags=IisApp', working folder 'C:\Users\neo\source\repos\cornerstone' ...error, package 'C:\Users\neo\AppData\Local\Temp\AWSDeploymentArchive_Cornerstone-main_v20240328170433.zip' could not be found ..build fail, unable to find expected deployment package. ..build of project archive failed, abandoning deployment To Reproduce

Expected behavior

Screenshots

Toolkit Logs

log_2024-03-28_12-04-12_5052.txt Development System (please complete the following information):

Additional context

chris-htd commented 8 months ago

Ok - so I was able to figure this out. Just in case some one else runs into it.

If you encounter this error do the following:

  1. Grab the invoke command "C:\Program Files\IIS\Microsoft Web Deploy V3\msdeploy.exe" -verb:sync -source:manifest="C:\Users\neo\AppData\Local\Temp\tmp3875.tmp" -dest:package="C:\Users\neo\AppData\Local\Temp\AWSDeploymentArchive_Cornerstone-main_v20240401151334.zip" -declareParam:name="IIS Web Application Name",kind="ProviderPath",scope="IisApp",match="^C:\\Users\\neo\\source\\repos\\cornerstone",defaultValue="Default Web Site/",tags=IisApp -declareParam:name="IIS Web Application Name",kind="ProviderPath",scope="setAcl",match="^C:\\Users\\neo\\source\\repos\\cornerstone",tags=IisApp', working folder 'C:\Users\neo\source\repos\cornerstone'
  2. Close out aws explorer / restart visual studio
  3. Open up developer command prompt and invoke the build - example below. "C:\Program Files\IIS\Microsoft Web Deploy V3\msdeploy.exe" -verb:sync -source:manifest="C:\Users\neo\AppData\Local\Temp\tmp3875.tmp" -dest:package="C:\Users\neo\AppData\Local\Temp\AWSDeploymentArchive_Cornerstone-main_v20240401151334.zip" -declareParam:name="IIS Web Application Name",kind="ProviderPath",scope="IisApp",match="^C:\\Users\\neo\\source\\repos\\cornerstone",defaultValue="Default Web Site/",tags=IisApp -declareParam:name="IIS Web Application Name",kind="ProviderPath",scope="setAcl",match="^C:\\Users\\neo\\source\\repos\\cornerstone",tags=IisApp', working folder 'C:\Users\neo\source\repos\cornerstone'
  4. Then use publish to AWS Elaststic Beanstalk
rbbarad commented 8 months ago

@chris-htd Ah glad you were able to figure this out. Thanks for posting your steps for resolving this!