aws-cdk-examples icon indicating copy to clipboard operation
aws-cdk-examples copied to clipboard

Error running cdk deploy on capitalize-string

Open kairs opened this issue 5 years ago • 2 comments
trafficstars

:bug: Bug Report

What is the problem?

Running the "capitalize-string" causes an error in "cdk deploy" https://github.com/aws-samples/aws-cdk-examples/tree/master/csharp/capitalize-string#this-project

Ref: MSBUILD : error MSB1008: Only one project can be specified.

This seems to be related to cdk.json (https://github.com/aws-samples/aws-cdk-examples/blob/master/csharp/capitalize-string/cdk.json) where 2 builds are specified

Reproduction Steps

Clone the repository and follow the readme here: https://github.com/aws-samples/aws-cdk-examples/tree/master/csharp/capitalize-string#build--deploy

Verbose Log

cdk deploy (node:24072) ExperimentalWarning: The fs.promises API is experimental ` Microsoft (R) Build Engine version 16.6.0+5ff7b0c9e for .NET Core Copyright (C) Microsoft Corporation. All rights reserved.

MSBUILD : error MSB1008: Only one project can be specified. Switch: dotnet

For switch syntax, type "MSBuild -help" Subprocess exited with error 1

Environment

  • CDK CLI Version: 1.41.0 (build 9e071d2)
  • Example: capitalize-string
  • Example Version:
  • OS: Windows 10
  • Language: csharp

kairs avatar May 22 '20 09:05 kairs

I ran into the same problem. Changed the cdk.json to this, and it worked:

{ "app": "dotnet run -p src/CapitalizeString/CapitalizeString.csproj" }

bcreedon avatar Jan 13 '21 16:01 bcreedon

Try changing ; to && like:

"app": "dotnet publish -c Release CapitalizeStringHandler/src/CapitalizeStringHandler && dotnet run -p src/CapitalizeString"

asoursos avatar Apr 20 '21 10:04 asoursos

⚠️COMMENT VISIBILITY WARNING⚠️

Comments on closed issues are hard for our team to see. If you need more assistance, please either tag a team member or open a new issue that references this one. If you wish to keep having a conversation with other community members under this issue feel free to do so.

github-actions[bot] avatar Dec 28 '24 22:12 github-actions[bot]