Search code examples
amazon-web-servicesamazon-elastic-beanstalkasp.net-core-webapiaws-toolkit

AWS Toolkit in Visual Studio: "System.Exception: Unable to determine project FileName" when Publishing to Elastic Beanstalk


When publishing my ASP.NET Core Web API to AWS using the AWS Toolkit in Visual Studio, the process fails with a Timeout error.

After digging into the logs, I was able to find more detail:

2023-07-24 20:05:08,571 [9] DEBUG Amazon.AWSToolkit.Publish.Install.DeployCli - Finished initializing aws.deploy.tools
2023-07-24 20:05:18,534 [1] DEBUG Amazon.AWSToolkit.VisualStudio.Lambda.LambdaTesterEventListener - Registering Debugger events
2023-07-24 20:05:18,563 [1] DEBUG Amazon.AWSToolkit.VisualStudio.Lambda.LambdaTesterUtilities - Configuring Solution with Lambda Tester
2023-07-24 20:05:19,901 [1] ERROR Amazon.AWSToolkit.VisualStudio.Lambda.LambdaTesterUtilities - Error configuring Lambda Tester on project. FileName: , FullName: , UniqueName: <MiscFiles>
System.Exception: Unable to determine project FileName
   at Amazon.AWSToolkit.VisualStudio.Lambda.LambdaTesterUtilities.<EnsureLambdaTesterConfiguredAsync>d__2.MoveNext()

Is there ea workaround? Is this a known issue in the AWS Toolkit for Visual Studio?


Solution

  • This is a known issue in the AWS Tookit.

    The work-around is to delete the PublishSettings.json file located in Windows Explorer here:

    %localappdata%\AWSToolkit\PublishSettings.json
    

    Aside from that, to get out of this situation where you cannot access the more established publishing experience, delete the file and try opening the project's context menu again.