How do I copy chunks of code from one project to another?
I just completed Level 3 assignment 1, and I’d like to reuse some code in Assignment 2.
I tried:
- “Save project as” is not a thing, so I can’t save with a new name, delete most of it, and carry on.
- You can’t have multiple projects open in one instance of Studio. I was going to open them both anc copy and paste between them, but that’s not possible.
- I opened a second instance of Studio, but can’t copy and paste the XAML file.
- I opened a second instance of studio, but can’t copy/paste the sequence with everything in it.
In the Udemy classes I took, there was an section about how to make a XAML file a library for reusable code. I don’t think that would work since I just want to copy a portion of it over to a new file.
I went with duplicating the project folder, then renaming the project folder along with the name in the project.json file.
But since you are talking about the assignment 1 and 2 reuse, create a new reframework.
- Create a new template because assignment 2 is based on queues
- Only copy the System 1 folder to your new project folder as thats what you will need to reuse only.
- Rest of the code you will have to be new as the implementation is different.
There’s nothing in this assignment that would benefit from queuing, so we must be looking at different assignments.
I didn’t use reframework for the last one, or even orchestrator. Seems like those would overcomplicate things. Of course, i wound up using a datatable as a way to batch process the work, which made things more complicated for me because of languages and documentation lol
1 Like
Well the assignment is based on queues to help understand how to use queues etc. nothing to over complicate the process.
If you use Reframework then you will get exposure to it and how to use and build on it. There is always an option not to use but its all part of the learning process.
1 Like