Moving files between two projects
Copying a page between projects looks trivial and often breaks. The reason is that a page is more than one file.
What actually needs to travel
- The page markup file.
- Its code behind file, if it has one.
- Any image or stylesheet the page uses.
- Any configuration entry the page depends on.
The safe order
- Add the new page inside the target project using the editor, so it is registered.
- Copy the markup and the code behind into the new files.
- Copy the assets, then fix any paths that were relative to the old project.
- Build and run the target project before you delete anything from the source.
Watch the paths. Most broken copies are broken because an image or stylesheet was still pointing at a folder that only exists in the old project.
When a page is moved and renamed, renaming with the refactor tool keeps every reference consistent.