{"id":22065841,"url":"https://github.com/karenpayneoregon/copy-db-postbuild-vb","last_synced_at":"2025-03-23T18:17:36.620Z","repository":{"id":110840412,"uuid":"267944689","full_name":"karenpayneoregon/copy-db-postbuild-vb","owner":"karenpayneoregon","description":"Learn an alternate method to provide a new local database available within the application folder rather than dynamically creating a new database at runtime.","archived":false,"fork":false,"pushed_at":"2020-05-29T21:00:56.000Z","size":159,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-29T00:30:14.159Z","etag":null,"topics":["database","post-build","technet-article","vb-net"],"latest_commit_sha":null,"homepage":"","language":"Visual Basic .NET","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/karenpayneoregon.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-05-29T20:02:47.000Z","updated_at":"2020-08-26T11:20:55.000Z","dependencies_parsed_at":null,"dependency_job_id":"329b9827-e7c4-443a-aa93-e1aeed551847","html_url":"https://github.com/karenpayneoregon/copy-db-postbuild-vb","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/karenpayneoregon%2Fcopy-db-postbuild-vb","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/karenpayneoregon%2Fcopy-db-postbuild-vb/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/karenpayneoregon%2Fcopy-db-postbuild-vb/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/karenpayneoregon%2Fcopy-db-postbuild-vb/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/karenpayneoregon","download_url":"https://codeload.github.com/karenpayneoregon/copy-db-postbuild-vb/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245144978,"owners_count":20568056,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["database","post-build","technet-article","vb-net"],"created_at":"2024-11-30T19:22:14.998Z","updated_at":"2025-03-23T18:17:36.590Z","avatar_url":"https://github.com/karenpayneoregon.png","language":"Visual Basic .NET","funding_links":[],"categories":[],"sub_categories":[],"readme":"# About\nWhen a VB.NET project (same can be easily done in C# also) requires a file or database to replace when missing, or never existed, the common idea is to create the database at runtime. Creating a database means extra libraries will be needed along with the possibility of failure. Rather than do this at runtime this repository offers an alternate method which is to place a safe copy of a database in a sub folder of the application, when needed copy to the application folder. A key aspect of this method involves several items to be in place which are discussed in an upcoming TechNet article.\n\n[Microsoft TechNet article](https://social.technet.microsoft.com/wiki/contents/articles/53901.copy-files-post-build-in-visual-studio.aspx)\n\n- Will work with any file type\n- Leaves off where copy to output folder ends\n\n![screenshot](assets/PB1.png)\n\n```\nFileHelper.CopyDatabase(True)\n\nIf Not FileHelper.IsSuccessFul Then\n    If FileHelper.DatbaseInuse Then\n        MessageBox.Show(\"Please close the database and try again\")\n    Else\n        MessageBox.Show(FileHelper.LastExceptionMessage)\n    End If\nElse\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkarenpayneoregon%2Fcopy-db-postbuild-vb","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkarenpayneoregon%2Fcopy-db-postbuild-vb","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkarenpayneoregon%2Fcopy-db-postbuild-vb/lists"}