question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[CLI] support adding cdk project to existing .net solution

See original GitHub issue

From StackOverflow question, add support to add a CDK project to an existing solution.

Currently, cdk init will fail if run in a directory that already contains a solution (or any files):

❯ cdk init app --language=csharp
`cdk init` cannot be run in a non-empty directory!

Use Case

Add cdk project to an existing solution.

Proposed Solution

Remove check that current directory is empty. Probably add a check that files won’t be overwrittne.

Other

  • 👋 I may be able to implement this feature request
  • ⚠️ This feature might incur a breaking change

This is a 🚀 Feature Request

Issue Analytics

  • State:open
  • Created 3 years ago
  • Reactions:43
  • Comments:12 (3 by maintainers)

github_iconTop GitHub Comments

14reactions
shivlakscommented, Aug 21, 2020

@ppittle that’s a good point. force is a little overloaded

I like the idea of --allow-non-empty. perhaps we could also make it a key we support in user/project settings (~/.cdk.json or cdk.json) so users would not have to keep specifying it every time.

4reactions
jhechtfcommented, Feb 28, 2021

Would be a great feature to have. It’s adding only a few specific directories, so I’m unsure why we’ve needed it to be done only on empty folders.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Working with the AWS CDK in C# - AWS Cloud Development ...
You create a new AWS CDK project by invoking cdk init in an empty directory. ... cdk init uses the name of the...
Read more >
How to add AWS CDK to an existing project
First, go ahead and move the file /cdk/cdk.json to the root directory and then update it to point to a different entry point...
Read more >
Generate an AWS CDK Deployment Project
NET CLI deployment experience to generate an AWS CDK deployment project. ... open the AppRunner solution context menu and select Add > Existing...
Read more >
AWS CDK Init for an existing project - Stack Overflow
You can run it in an empty directory, back up the files you will override, and then copy an actual cdk application/project (such...
Read more >
AWS Cloud Development Kit (CDK) with the .NET - YouTube
Learn how to use . NET /C# with AWS Cloud Development Kit ( CDK ). For more information on: AWS CDK : http://amzn.to/2Og59qrAWS...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found