0

I am building a project using batch scripts that uses msbuild.exe. I performed two builds: a manual one and automated one.

The manual build resulted to this folder structure:

+ project
    + obj
        + Debug
        + Release

Meanwhile in automated build:

+ project
    + obj
        + Release

Can anyone explain how they got that difference? I am suspecting nuget restoration is the culprit for this but I don't have a proof for this or something.

As @vasily.sib suggested, this is just the script content:

cd msbuild_path
msbuild.exe project_path\project.sln /t:Clean;Build /p:Configuration=Release;Platform="Any CPU"
CodeRed
  • 905
  • 1
  • 6
  • 24
  • I guess this is because `automated` build is building only with `Release` configuration. But why do you ever care? – vasily.sib Aug 30 '19 at 03:25
  • @vasily.sib why do I care? Someone's checking and comparing my build results and I need to come up with an explanation as to why is this happening – CodeRed Aug 30 '19 at 03:41
  • and as I have said up there, i am using scripts that uses `msbuild.exe`, additionally, I am specifying the configuration details in the script via `/p:Configuration=Release` – CodeRed Aug 30 '19 at 03:43
  • then maybe you will show us this batch scripts, so we will have an object to tallk about? – vasily.sib Aug 30 '19 at 03:49

1 Answers1

0

I don't know if anyone will be having the same question in the future. I found out that the answer to this is very easy:

As stated here, obj folders are created during compilation. I realized that from the time I open my Visual Studio to restore my NuGet package in the manual build is also the time where Debug folder is created. The automated build restores NuGet package via script so it doesnt need to open Visual Studio.

CodeRed
  • 905
  • 1
  • 6
  • 24