title: MSBuild not generating dll files in bin folder
body: <p>I'm trying to set up Jenkins for automated testing of a Xamarin project. I call MSBuild via the jenkinsfile. The output says the build succeeded (see stage log below). </p>
  
  <p>My problem is that no bin folder and no dll's are created (or I just can't find them). In the next stage i need the dll's to test them using NUnit. Aren't the dll's supposed to be created in a bin folder in the project folder?</p>
  
  <p>I have been searching for a fix for a day now, with no result. I'm probably doing something wrong, since I'm new to Jenkins, MSBuild and Xamarin. I usually build projects with Visual Studio. English is not my native language, so sorry for the language mistakes.</p>
  
  <p>Jenkinsfile (actual app name replaced with My_App)</p>
  
  <pre><code>bat "subst \"W:\" /d || exit 0"
  bat 'subst W: "%WORKSPACE%"'                 
  bat 'C:/nuget.exe restore \"W:/My_App/My_App.sln\"'
  bat "\"${tool 'MSBuild'}\" \"W:/My_App/My_App.sln\" /t:Restore /property:Platform=\"Any CPU\" /property:ProductVersion=1.0.0.${env.BUILD_NUMBER}"
  </code></pre>
  
  <p>Jenkins stage log (actual app name replaced with My_App)</p>
  
  <pre><code>C:\Program Files (x86)\Jenkins\workspace\My_zorgrobot_development&gt;"C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\15.0\Bin\MSBuild.exe" "W:/My_App/My_App.sln" /t:Restore /property:Platform="Any CPU" /property:ProductVersion=1.0.0.63 
  Microsoft (R) Build Engine version 15.9.21+g9802d43bc3 for .NET Framework
  Copyright (C) Microsoft Corporation. All rights reserved.
  
  Building the projects in this solution one at a time. To enable parallel build, please add the "/m" switch.
  Build started 4/3/2019 12:47:25 AM.
  Project "W:\My_App\My_App.sln" on node 1 (Restore target(s)).
  ValidateSolutionConfiguration:
    Building solution configuration "Debug|Any CPU".
  W:\My_App\My_App\My_App.UWP\My_App.UWP.csproj : warning NU1503: Skipping restore for project 'W:\My_App\My_App\My_App.UWP\My_App.UWP.csproj'. The project file may be invalid or missing targets required for restore. [W:\My_App\My_App.sln]
  Project "W:\My_App\My_App.sln" (1) is building "W:\My_App\My_App\My_App.Android\My_App.Android.csproj" (2:5) on node 1 (_GenerateProjectRestoreGraph target(s)).
  _SetLatestTargetFrameworkVersion:
    Found Java SDK version 1.8.0.
    Found Java SDK version 1.8.0.
  Done Building Project "W:\My_App\My_App\My_App.Android\My_App.Android.csproj" (_GenerateProjectRestoreGraph target(s)).
  Restore:
    Restoring packages for W:\My_App\My_App\My_App.iOS\My_App.iOS.csproj...
    Restoring packages for W:\My_App\My_App\My_App.Android\My_App.Android.csproj...
    Committing restore...
    Generating MSBuild file W:\My_App\My_App\My_App.Android\obj\My_App.Android.csproj.nuget.g.props.
    Committing restore...
    Generating MSBuild file W:\My_App\My_App\My_App.Android\obj\My_App.Android.csproj.nuget.g.targets.
    Generating MSBuild file W:\My_App\My_App\My_App.iOS\obj\My_App.iOS.csproj.nuget.g.props.
    Writing lock file to disk. Path: W:\My_App\My_App\My_App.Android\obj\project.assets.json
    Generating MSBuild file W:\My_App\My_App\My_App.iOS\obj\My_App.iOS.csproj.nuget.g.targets.
    Writing lock file to disk. Path: W:\My_App\My_App\My_App.iOS\obj\project.assets.json
    Restore completed in 713.65 ms for W:\My_App\My_App\My_App.iOS\My_App.iOS.csproj.
    Restore completed in 696.72 ms for W:\My_App\My_App\My_App.Android\My_App.Android.csproj.
    Restoring packages for W:\My_App\My_App\My_App\My_App.csproj...
    Committing restore...
    Generating MSBuild file W:\My_App\My_App\My_App\obj\My_App.csproj.nuget.g.props.
    Generating MSBuild file W:\My_App\My_App\My_App\obj\My_App.csproj.nuget.g.targets.
    Writing lock file to disk. Path: W:\My_App\My_App\My_App\obj\project.assets.json
    Restore completed in 48.76 ms for W:\My_App\My_App\My_App\My_App.csproj.
  
    NuGet Config files used:
        C:\Windows\system32\config\systemprofile\AppData\Roaming\NuGet\NuGet.Config
        C:\Program Files (x86)\NuGet\Config\Microsoft.VisualStudio.Offline.config
  
    Feeds used:
        https://api.nuget.org/v3/index.json
        C:\Program Files (x86)\Microsoft SDKs\NuGetPackages\
  Done Building Project "W:\My_App\My_App.sln" (Restore target(s)).
  
  Build succeeded.
  
  "W:\My_App\My_App.sln" (Restore target) (1) -&gt;
  (_FilterRestoreGraphProjectInputItems target) -&gt; 
    W:\My_App\My_App\My_App.UWP\My_App.UWP.csproj : warning NU1503: Skipping restore for project 'W:\My_App\My_App\My_App.UWP\My_App.UWP.csproj'. The project file may be invalid or missing targets required for restore. [W:\My_App\My_App.sln]
  
      1 Warning(s)
      0 Error(s)
  
  Time Elapsed 00:00:03.09
  </code></pre>
  
  <p>Jenkins stage log verbosity diagnostic</p>
  
  <pre><code>o_App.Android.csproj (_IsProjectRestoreSupported)  (TaskId:0)
    | 12                : 0.177s           0.177s       W:\My_App\My_App\My_App\My_App.csproj (_GenerateRestoreGraphProjectEntry)  (TaskId:0)
    | 13                : 0.055s           0.055s       W:\My_App\My_App\My_App.Android\My_App.Android.csproj (_GenerateRestoreGraphProjectEntry)  (TaskId:0)
    | 14                : 0.037s           0.037s       W:\My_App\My_App\My_App.iOS\My_App.iOS.csproj (_GenerateRestoreGraphProjectEntry)  (TaskId:0)
    | 15                : 0.030s           0.030s       W:\My_App\My_App.Tests\My_App.Tests.csproj (_GenerateRestoreGraphProjectEntry)  (TaskId:0)
    | 16                : 0.053s           0.053s       W:\My_App\My_App\My_App\My_App.csproj (_GenerateProjectRestoreGraph)  (TaskId:0)
    | 17                : 0.880s           0.880s       W:\My_App\My_App\My_App.Android\My_App.Android.csproj (_GenerateProjectRestoreGraph)  (TaskId:0)
    | 18                : 0.037s           0.037s       W:\My_App\My_App\My_App.iOS\My_App.iOS.csproj (_GenerateProjectRestoreGraph)  (TaskId:0)
    . 19                : 0.032s           0.032s       W:\My_App\My_App.Tests\My_App.Tests.csproj (_GenerateProjectRestoreGraph)  (TaskId:0)
  
    ============================== Node Utilization (IDs represent configurations) ====================================================
    Timestamp:            1        Duration   Cumulative
    ----------------------------------------------------------------------------------------------------------------------------------- (TaskId:0)
    636898788056711871:   0        0.392s     0.392s ####### (TaskId:0)
    636898788060631956:   1        0.265s     0.657s ##### (TaskId:0)
    636898788063282046:   2        0.136s     0.793s ## (TaskId:0)
    636898788064642119:   3        0.022s     0.815s  (TaskId:0)
    636898788064862126:   4        0.334s     1.149s ###### (TaskId:0)
    636898788068202196:   5        0.074s     1.223s # (TaskId:0)
    636898788068942244:   0        0.018s     1.241s  (TaskId:0)
    636898788069122245:   6        0.062s     1.303s # (TaskId:0)
    636898788069742275:   8        0.034s     1.337s  (TaskId:0)
    636898788070082270:   6        0.003s     1.340s  (TaskId:0)
    636898788070112288:   7        0.027s     1.367s  (TaskId:0)
    636898788070382276:   10       0.136s     1.503s ## (TaskId:0)
    636898788071742310:   7        0.003s     1.506s  (TaskId:0)
    636898788071772332:   9        0.029s     1.535s  (TaskId:0)
    636898788072062334:   0        0.008s     1.543s  (TaskId:0)
    636898788072142348:   11       0.041s     1.584s  (TaskId:0)
    636898788072552328:   0        0.010s     1.594s  (TaskId:0)
    636898788072652360:   12       0.177s     1.771s ### (TaskId:0)
    636898788074422410:   13       0.055s     1.826s # (TaskId:0)
    636898788074972426:   14       0.037s     1.863s  (TaskId:0)
    636898788075342453:   15       0.030s     1.893s  (TaskId:0)
    636898788075642458:   0        0.007s     1.900s  (TaskId:0)
    636898788075712465:   16       0.053s     1.953s # (TaskId:0)
    636898788076242471:   17       0.880s     2.833s ################# (TaskId:0)
    636898788085042751:   18       0.037s     2.870s  (TaskId:0)
    636898788085412761:   19       0.032s     2.902s  (TaskId:0)
    636898788085732751:   0        1.455s     4.357s ############################# (TaskId:0)
    -----------------------------------------------------------------------------------------------------------------------------------
    Utilization:          100.0    Average Utilization: 100.0 (TaskId:0)
  
  Project Evaluation Performance Summary:
         12 ms  W:\My_App\My_App\My_App.UWP\My_App.UWP.csproj   1 calls
         50 ms  W:\My_App\My_App.Tests\My_App.Tests.csproj   1 calls
         62 ms  W:\My_App\My_App\My_App.iOS\My_App.iOS.csproj   1 calls
        175 ms  W:\My_App\My_App\My_App.Android\My_App.Android.csproj   1 calls
        399 ms  W:\My_App\My_App\My_App\My_App.csproj   2 calls
  
  Project Performance Summary:
          6 ms  W:\My_App\My_App\My_App.UWP\My_App.UWP.csproj   1 calls
                    6 ms  _IsProjectRestoreSupported                 1 calls
        112 ms  W:\My_App\My_App.Tests\My_App.Tests.csproj   5 calls
                   23 ms  _IsProjectRestoreSupported                 2 calls
                   29 ms  _GenerateRestoreProjectPathWalk            1 calls
                   30 ms  _GenerateRestoreGraphProjectEntry          1 calls
                   30 ms  _GenerateProjectRestoreGraph               1 calls
        261 ms  W:\My_App\My_App\My_App.iOS\My_App.iOS.csproj   5 calls
                   25 ms  _IsProjectRestoreSupported                 2 calls
                  165 ms  _GenerateRestoreProjectPathWalk            1 calls
                   35 ms  _GenerateRestoreGraphProjectEntry          1 calls
                   36 ms  _GenerateProjectRestoreGraph               1 calls
        326 ms  W:\My_App\My_App\My_App\My_App.csproj   8 calls
                   42 ms  _IsProjectRestoreSupported                 2 calls
                   58 ms  _GenerateRestoreProjectPathWalk            4 calls
                  175 ms  _GenerateRestoreGraphProjectEntry          1 calls
                   51 ms  _GenerateProjectRestoreGraph               1 calls
       1148 ms  W:\My_App\My_App\My_App.Android\My_App.Android.csproj   5 calls
                  123 ms  _IsProjectRestoreSupported                 2 calls
                   99 ms  _GenerateRestoreProjectPathWalk            1 calls
                   46 ms  _GenerateRestoreGraphProjectEntry          1 calls
                  880 ms  _GenerateProjectRestoreGraph               1 calls
       4355 ms  W:\My_App\My_App.sln                   1 calls
                 4355 ms  Restore                                    1 calls
  
  Target Performance Summary:
          0 ms  CheckForImplicitPackageReferenceOverridesBeforeRestore   1 calls
          0 ms  _GetRestoreSettingsCurrentProject          3 calls
          0 ms  _GetRestoreSettingsOverrides               3 calls
          0 ms  _SetLatestTargetFrameworkVersionForPackageReference   1 calls
          0 ms  _GenerateRestoreProjectPathItemsCurrentProject   5 calls
          0 ms  _GenerateProjectRestoreGraphCurrentProject   4 calls
          0 ms  _GenerateRestoreGraphProjectEntry          4 calls
          0 ms  _GenerateRestoreDependencies               4 calls
          0 ms  ValidateToolsVersions                      1 calls
          0 ms  _GenerateProjectRestoreGraph               4 calls
          0 ms  ValidateProjects                           1 calls
          1 ms  _CheckForUnsupportedNETStandardVersion     1 calls
          1 ms  CollectPackageReferences                   4 calls
          1 ms  _GetRestoreProjectStyle                    4 calls
          2 ms  _GetRestoreSettingsPerFramework            3 calls
          2 ms  _IsProjectRestoreSupported                 4 calls
          4 ms  _GenerateRestoreSpecs                      4 calls
          4 ms  _GenerateRestoreProjectPathItems           5 calls
          5 ms  _GenerateRestoreProjectSpec                4 calls
          5 ms  _GetProjectJsonPath                        4 calls
          8 ms  _GetReferenceAssemblyPaths                 1 calls
          9 ms  _GenerateRestoreProjectPathItemsPerFramework   5 calls
         11 ms  CheckForImplicitPackageReferenceOverrides   1 calls
         20 ms  _GetRestoreTargetFrameworksOutput          4 calls
         22 ms  _GenerateProjectRestoreGraphPerFramework   4 calls
         29 ms  _GenerateDotnetCliToolReferenceSpecs       4 calls
         38 ms  ValidateSolutionConfiguration              1 calls
         40 ms  RedirectMonoAndroidSdkPaths                1 calls
        122 ms  _GetRestoreSettings                        3 calls
        150 ms  _LoadRestoreGraphEntryPoints               1 calls
        185 ms  _GenerateRestoreProjectPathWalk            5 calls
        349 ms  _GetAllRestoreProjectPathItems             1 calls
        826 ms  _SetLatestTargetFrameworkVersion           1 calls
        897 ms  _FilterRestoreGraphProjectInputItems       1 calls
       1323 ms  _GenerateRestoreGraph                      1 calls
       1448 ms  Restore                                    1 calls
  
  Task Performance Summary:
          1 ms  SetVsMonoAndroidRegistryKey                1 calls
          3 ms  GetRestoreProjectJsonPathTask              3 calls
          4 ms  CreateItem                                 2 calls
          5 ms  CreateProperty                             3 calls
          6 ms  CheckForImplicitPackageReferenceOverrides   1 calls
          6 ms  ConvertToAbsolutePath                      8 calls
          7 ms  GetReferenceAssemblyPaths                  1 calls
          9 ms  GetRestorePackageReferencesTask            3 calls
         10 ms  WarnForInvalidProjectsTask                 1 calls
         10 ms  GetRestoreProjectReferencesTask            4 calls
         15 ms  Message                                   10 calls
         16 ms  GetProjectTargetFrameworksTask             4 calls
         20 ms  RemoveDuplicates                          13 calls
         27 ms  GetRestoreDotnetCliToolsTask               4 calls
         32 ms  ResolveAndroidTooling                      1 calls
         77 ms  ResolveSdks                                1 calls
        121 ms  GetRestoreSettingsTask                     3 calls
        131 ms  GetRestoreSolutionProjectsTask             1 calls
        705 ms  ValidateJavaVersion                        1 calls
       1436 ms  RestoreTask                                1 calls
       2724 ms  MsBuild                                   10 calls
  
  Build succeeded.
  
  "W:\My_App\My_App.sln" (Restore target) (1) -&gt;
  (_FilterRestoreGraphProjectInputItems target) -&gt; 
    W:\My_App\My_App\My_App.UWP\My_App.UWP.csproj : warning NU1503: Skipping restore for project 'W:\My_App\My_App\My_App.UWP\My_App.UWP.csproj'. The project file may be invalid or missing targets required for restore. [W:\My_App\My_App.sln]
  
      1 Warning(s)
      0 Error(s)
  
  Time Elapsed 00:00:04.66
  </code></pre>
  
  <p>As extra information i would like to add that removing the /t:Restore from MSBuild results in a failed build, saying that NuGet needs to restore before building.</p>
  
  <p>I expect dll files to be created in a folder called 'bin' inside the project folder, but no bin folder or dll's are created.</p>