こんにちは 私はインクルードヘッダーとLIBSへのパスで は、今私はインクルードヘッダーとLIBS に同じパスを使用してでも、別の名前と一緒にこのプロジェクトを複製するよう、セットアップのVisual Studioは、C++プロジェクトを表現していて、私はない何をすべきか手動で.vcprojファイルに移動し、名前の変更を開始する 良い方法はありますか?ビジュアルスタジオプロジェクトを複製する最速の方法/スクリプトは何ですか?
4
A
答えて
9
これを行う最も簡単で速い方法は、Windowsエクスプローラを使用してプロジェクト全体のコピーを作成することです。ほとんどの場合、コピーされた.vcprojファイルに新しい一意のGUIDを割り当てる必要があります。これを行うには、メモ帳でファイルを開き、guidgen.exe
または同様のアプリケーションから新しいProjectGUID
を貼り付けます。これを済ませたら、Visual Studioで複製プロジェクトを開いて名前を変更するだけです。
また、CopyWizのようなものを試してみることもできます(私は一度も使ったことはありませんが、あなたに適しているかどうかは無料で試してみることができます)。
新しいプロジェクト用のテンプレートを作成しない限り、a better wayがあります。
1
powershell(Win 7などで提供)で動作している場合は、私のために動作します。 正しく動作しなくても、良いスタートポイントになる場合があります。
guidgen.exeの場所を不思議に思う人のために# set the initial values.
[System.Reflection.Assembly]::LoadWithPartialName(“System.Windows.Forms”)
[Windows.Forms.MessageBox]::Show(“This script assumes that each project lives in a directory with the same name as the project, as VC defaults to. Input a) the directory holding both the existing project and the new project. This is the directory CONTAINING the directory with the name of the existing project. It must include the final backslash. b) the name of the existing project. c) the name of the new project”, “”, [Windows.Forms.MessageBoxButtons]::OK, [Windows.Forms.MessageBoxIcon]::Information)
($myroot=(Read-Host "Enter path of directory holding new and existing projects."))
($projectname=(Read-Host "Enter the name of the project to copy. Must be a single word"))
($newname=(Read-Host "Enter the name of the new project. Must be a single word"))
# make a copy of the original
Set-Location $myroot
Copy-Item "$myroot$projectname" "$myroot$newname" -recurse
# find and rename all files containing the original project name
# run without recurse first or an error occurs
Get-ChildItem $myroot$newname\ -force| Where-Object {$_.name -like "*$projectname*"}| rename-item -newname { $_.name -replace "$projectname","$newname" }
Get-ChildItem $myroot$newname\ -force -recurse| Where-Object {$_.name -like "*$projectname*"}| rename-item -newname { $_.name -replace "$projectname","$newname" }
# find all references within the code to the projectname and change those
Set-Location $myroot$newname
Get-ChildItem -recurse | where {$_.extension -eq ".cpp"-or $_.extension -eq ".h" -or $_.extension -eq ".sln" -or $_.extension -eq ".vcxproj" -or $_.extension -eq ".rc"} `
|foreach-object {(get-content $_.fullname) | foreach-object {$_ -replace "$projectname", "$newname"} | set-content $_.fullname}
# delete sdf and suo files
remove-item $myroot$newname\$newname.suo -force
remove-item $myroot$newname\$newname.sdf -force
#done
関連する問題
- 1. Googleストレージバケットを複製する最も速い方法は何ですか?
- 2. MySQLのレコードを複製する最も速い方法
- 3. バージョン管理リポジトリを複製する最善の方法は何ですか?
- 4. Webサービスを複製する最も簡単な方法は何ですか?
- 5. NSMenuItemsを複製する最も簡単な方法は何ですか?
- 6. Pythonで重複をチェックする最も速い方法は何ですか?
- 7. デスクトップをストリーミングする最も速い方法は何ですか?
- 8. タイプをチェックする最も速い方法は何ですか?
- 9. テスト環境でディスク領域の不足状態を複製する最良の方法は何ですか?
- 10. iOSで最も速い描画方法は何ですか?
- 11. Microsoft AzureでLinux-VMを複製/複製する方法はありますか?
- 12. 既存の配列をゼロにする最速の方法は何ですか?
- 13. Pythonで複数のツリーのコピーを取得する最も速い方法は何ですか?
- 14. ajaxリクエストを処理する最速の方法は何ですか?
- 15. UIViewの背景を実装する最も速い方法は何ですか?
- 16. Rで複数の論理比較を実行する最も速い方法は何ですか?
- 17. Cでbmpイメージを回転する最も速い方法は何ですか?
- 18. Gtk +で画像を描画する最も速い方法は何ですか?
- 19. Javaでは、システム時間を得る最も速い方法は何ですか?
- 20. 変更可能なScalaオブジェクトを深く複製(コピー)する最も簡単な方法は何ですか?
- 21. WCF - 最速のバインディングは何ですか?
- 22. イメージがPHPで有効かどうかを確認する最善の最速の方法は何ですか?
- 23. scipy.sparseマトリックスをスライスする最も速い方法は何ですか?
- 24. ファイルを上書きする最も速い方法は何ですか?
- 25. Photoshopオブジェクト(レイヤー)を選択する最も速い方法は何ですか?
- 26. イメージをタイルにスライスする最も速い方法は何ですか?
- 27. ファイルからStringを読み取る最も速い方法は何ですか?
- 28. リモートマシン上のイベントログを読み取る最も速い方法は何ですか?
- 29. unixtimeからnumpy.datetime64に変換する最も速い方法は何ですか?
- 30. PHPを使用して重複CSSルールをフィルタリングする最も速い方法は何ですか?
: "C:\プログラムファイル\マイクロソフトのSDK \ Windowsの\ v6.0A \ビン"(私のシステムがWindows 7 Professionalの64ビット、VS 2005、2008です2010年設置) – kubilay