Visual Studioコードを使用してC++プロジェクトを構築しようとしています。MsBuildを使用したVisual Studioコードのビルド
自動ビルドのためにtask.jsonを作成しました。
{
// See https://go.microsoft.com/fwlink/?LinkId=733558
// for the documentation about the tasks.json format
"version": "2.0.0",
"tasks": [
{
"label": "build",
"type": "shell",
"command": "msbuild",
"args": [
// Ask msbuild to generate full paths for file names.
"/property:GenerateFullPaths=true",
"/t:build"
],
"group": "build",
"presentation": {
// Reveal the output only if unrecognized errors occur.
"reveal": "silent"
},
// Use the standard MS compiler pattern to detect errors, warnings and infos
"problemMatcher": "$msCompile"
}
]
}
以下の例外をスローします。
MSBUILD : error MSB1003: Specify a project or solution file. The current working directory does not contain a project or solution file.
The terminal process terminated with exit code: 1
ビルドタスクは、MSBuildのに基づいています。 MSBuildはビルドに.vcxprojファイルが必要でした。
nugetまたはmsbuildによって.vcxprojを生成できるコマンドはありますか。
このリンクは質問に答えるかもしれないが、ここでは答えの重要な部分が含まれており、参考のためにリンクを提供することをお勧めします。リンクされたページが変更された場合、リンクのみの回答は無効になります。 - [レビューから](/レビュー/低品質の投稿/ 18006086) –
xml設定を自分で書く必要がありますか? MicrosoftはVisual Studio以外のファイルを生成するツールを提供していますか? –
私が知る限り、それを生成するツールはありません。私はサンプルで自分の反応を更新しました。貼り付けるだけで、ClIncludeを更新して必要なファイルを含めることができます。 – mageos