dotnet / aspnet-api-versioning

Provides a set of libraries which add service API versioning to ASP.NET Web API, OData with ASP.NET Web API, and ASP.NET Core.
MIT License
3.03k stars 702 forks source link

Solution is not building #244

Closed bdebaere closed 6 years ago

bdebaere commented 6 years ago

When trying to restore the NuGet packages I receive the error below. Anything I'm doing wrong?

PM> Update-Package -reinstall
Join-Path : Cannot convert 'System.Object[]' to the type 'System.String' required by parameter 'ChildPath'. Specified method is not supported.
At C:\Users\\Downloads\aspnet-api-versioning-master (2)\aspnet-api-versioning-master\packages\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.1.0.0\tools\init.ps1:13 char:57
+ ... rPackageDirectory = Join-Path $packageDirectory $compilerPackage.Name
+                                                     ~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidArgument: (:) [Join-Path], ParameterBindingException
    + FullyQualifiedErrorId : CannotConvertArgument,Microsoft.PowerShell.Commands.JoinPathCommand

Join-Path : Cannot bind argument to parameter 'Path' because it is null.
At C:\Users\\Downloads\aspnet-api-versioning-master (2)\aspnet-api-versioning-master\packages\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.1.0.0\tools\init.ps1:14 char:44
+ ... erPackageToolsDirectory = Join-Path $compilerPackageDirectory 'tools'
+                                         ~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidData: (:) [Join-Path], ParameterBindingValidationException
    + FullyQualifiedErrorId : ParameterArgumentValidationErrorNullNotAllowed,Microsoft.PowerShell.Commands.JoinPathCommand

nuget-restore : The term 'nuget-restore' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
At line:1 char:1
+ nuget-restore
+ ~~~~~~~~~~~~~
    + CategoryInfo          : ObjectNotFound: (nuget-restore:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException

PM> 
commonsensesoftware commented 6 years ago

I've not tried through the Package Manager, but it should work. You can restore through the standard build tools, which is what I generally do.

.NET CLI

dotnet restore

MSBuild 15.0+

msbuild /t:Restore /v:m

bdebaere commented 6 years ago

Have you tried restoring through Package Manager?

For your information. Restoring with .NET CLI gave me this output, but I was able to run without issues.

Microsoft Windows [Version 10.0.16299.192]
(c) 2017 Microsoft Corporation. All rights reserved.

C:\Users\\Downloads>cd C:\Users\\Downloads\aspnet-api-versioning-master (4)\aspnet-api-versioning-master

C:\Users\\Downloads\aspnet-api-versioning-master (4)\aspnet-api-versioning-master>dotnet restore

Welcome to .NET Core!
---------------------
Learn more about .NET Core @ https://aka.ms/dotnet-docs. Use dotnet --help to see available commands or go to https://aka.ms/dotnet-cli-docs.

Telemetry
--------------
The .NET Core tools collect usage data in order to improve your experience. The data is anonymous and does not include command-line arguments. The data is collected by Microsoft and shared with the community.
You can opt out of telemetry by setting a DOTNET_CLI_TELEMETRY_OPTOUT environment variable to 1 using your favorite shell.
You can read more about .NET Core tools telemetry @ https://aka.ms/dotnet-cli-telemetry.
C:\Users\\Downloads\aspnet-api-versioning-master (4)\aspnet-api-versioning-master\samples\webapi\BasicWebApiSample\BasicWebApiSample.csproj(129,3): error MSB4019: The imported project "C:\Program Files\dotnet\sdk\2.1.4\Microsoft\VisualStudio\v15.0\WebApplications\Microsoft.WebApplication.targets" was not found. Confirm that the path in the <Import> declaration is correct, and that the file exists on disk.
C:\Users\\Downloads\aspnet-api-versioning-master (4)\aspnet-api-versioning-master\samples\webapi\BasicODataWebApiSample\BasicODataWebApiSample.csproj(157,3): error MSB4019: The imported project "C:\Program Files\dotnet\sdk\2.1.4\Microsoft\VisualStudio\v15.0\WebApplications\Microsoft.WebApplication.targets" was not found. Confirm that the path in the <Import> declaration is correct, and that the file exists on disk.
C:\Users\\Downloads\aspnet-api-versioning-master (4)\aspnet-api-versioning-master\samples\webapi\AdvancedODataWebApiSample\AdvancedODataWebApiSample.csproj(162,3): error MSB4019: The imported project "C:\Program Files\dotnet\sdk\2.1.4\Microsoft\VisualStudio\v15.0\WebApplications\Microsoft.WebApplication.targets" was not found. Confirm that the path in the <Import> declaration is correct, and that the file exists on disk.
C:\Users\\Downloads\aspnet-api-versioning-master (4)\aspnet-api-versioning-master\samples\webapi\ByNamespaceWebApiSample\ByNamespaceWebApiSample.csproj(130,3): error MSB4019: The imported project "C:\Program Files\dotnet\sdk\2.1.4\Microsoft\VisualStudio\v15.0\WebApplications\Microsoft.WebApplication.targets" was not found. Confirm that the path in the <Import> declaration is correct, and that the file exists on disk.
C:\Users\\Downloads\aspnet-api-versioning-master (4)\aspnet-api-versioning-master\samples\webapi\ConventionsWebApiSample\ConventionsWebApiSample.csproj(127,3): error MSB4019: The imported project "C:\Program Files\dotnet\sdk\2.1.4\Microsoft\VisualStudio\v15.0\WebApplications\Microsoft.WebApplication.targets" was not found. Confirm that the path in the <Import> declaration is correct, and that the file exists on disk.
C:\Users\\Downloads\aspnet-api-versioning-master (4)\aspnet-api-versioning-master\samples\webapi\ConventionsODataWebApiSample\ConventionsODataWebApiSample.csproj(154,3): error MSB4019: The imported project "C:\Program Files\dotnet\sdk\2.1.4\Microsoft\VisualStudio\v15.0\WebApplications\Microsoft.WebApplication.targets" was not found. Confirm that the path in the <Import> declaration is correct, and that the file exists on disk.
C:\Users\\Downloads\aspnet-api-versioning-master (4)\aspnet-api-versioning-master\samples\webapi\SwaggerWebApiSample\SwaggerWebApiSample.csproj(145,3): error MSB4019: The imported project "C:\Program Files\dotnet\sdk\2.1.4\Microsoft\VisualStudio\v15.0\WebApplications\Microsoft.WebApplication.targets" was not found. Confirm that the path in the <Import> declaration is correct, and that the file exists on disk.
C:\Users\\Downloads\aspnet-api-versioning-master (4)\aspnet-api-versioning-master\samples\webapi\SwaggerODataWebApiSample\SwaggerODataWebApiSample.csproj(172,3): error MSB4019: The imported project "C:\Program Files\dotnet\sdk\2.1.4\Microsoft\VisualStudio\v15.0\WebApplications\Microsoft.WebApplication.targets" was not found. Confirm that the path in the <Import> declaration is correct, and that the file exists on disk.
C:\Users\\Downloads\aspnet-api-versioning-master (4)\aspnet-api-versioning-master\samples\webapi\BasicWebApiSample\BasicWebApiSample.csproj : warning NU1503: Skipping restore for project 'C:\Users\\Downloads\aspnet-api-versioning-master (4)\aspnet-api-versioning-master\samples\webapi\BasicWebApiSample\BasicWebApiSample.csproj'. The project file may be invalid or missing targets required for restore. [C:\Users\\Downloads\aspnet-api-versioning-master (4)\aspnet-api-versioning-master\ApiVersioning.sln]
C:\Users\\Downloads\aspnet-api-versioning-master (4)\aspnet-api-versioning-master\samples\webapi\BasicODataWebApiSample\BasicODataWebApiSample.csproj : warning NU1503: Skipping restore for project 'C:\Users\\Downloads\aspnet-api-versioning-master (4)\aspnet-api-versioning-master\samples\webapi\BasicODataWebApiSample\BasicODataWebApiSample.csproj'. The project file may be invalid or missing targets required for restore. [C:\Users\\Downloads\aspnet-api-versioning-master (4)\aspnet-api-versioning-master\ApiVersioning.sln]
C:\Users\\Downloads\aspnet-api-versioning-master (4)\aspnet-api-versioning-master\samples\webapi\AdvancedODataWebApiSample\AdvancedODataWebApiSample.csproj : warning NU1503: Skipping restore for project 'C:\Users\\Downloads\aspnet-api-versioning-master (4)\aspnet-api-versioning-master\samples\webapi\AdvancedODataWebApiSample\AdvancedODataWebApiSample.csproj'. The project file may be invalid or missing targets required for restore. [C:\Users\\Downloads\aspnet-api-versioning-master (4)\aspnet-api-versioning-master\ApiVersioning.sln]
C:\Users\\Downloads\aspnet-api-versioning-master (4)\aspnet-api-versioning-master\samples\webapi\ByNamespaceWebApiSample\ByNamespaceWebApiSample.csproj : warning NU1503: Skipping restore for project 'C:\Users\\Downloads\aspnet-api-versioning-master (4)\aspnet-api-versioning-master\samples\webapi\ByNamespaceWebApiSample\ByNamespaceWebApiSample.csproj'. The project file may be invalid or missing targets required for restore. [C:\Users\\Downloads\aspnet-api-versioning-master (4)\aspnet-api-versioning-master\ApiVersioning.sln]
C:\Users\\Downloads\aspnet-api-versioning-master (4)\aspnet-api-versioning-master\samples\webapi\ConventionsWebApiSample\ConventionsWebApiSample.csproj : warning NU1503: Skipping restore for project 'C:\Users\\Downloads\aspnet-api-versioning-master (4)\aspnet-api-versioning-master\samples\webapi\ConventionsWebApiSample\ConventionsWebApiSample.csproj'. The project file may be invalid or missing targets required for restore. [C:\Users\\Downloads\aspnet-api-versioning-master (4)\aspnet-api-versioning-master\ApiVersioning.sln]
C:\Users\\Downloads\aspnet-api-versioning-master (4)\aspnet-api-versioning-master\samples\webapi\ConventionsODataWebApiSample\ConventionsODataWebApiSample.csproj : warning NU1503: Skipping restore for project 'C:\Users\\Downloads\aspnet-api-versioning-master (4)\aspnet-api-versioning-master\samples\webapi\ConventionsODataWebApiSample\ConventionsODataWebApiSample.csproj'. The project file may be invalid or missing targets required for restore. [C:\Users\\Downloads\aspnet-api-versioning-master (4)\aspnet-api-versioning-master\ApiVersioning.sln]
C:\Users\\Downloads\aspnet-api-versioning-master (4)\aspnet-api-versioning-master\samples\webapi\SwaggerWebApiSample\SwaggerWebApiSample.csproj : warning NU1503: Skipping restore for project 'C:\Users\\Downloads\aspnet-api-versioning-master (4)\aspnet-api-versioning-master\samples\webapi\SwaggerWebApiSample\SwaggerWebApiSample.csproj'. The project file may be invalid or missing targets required for restore. [C:\Users\\Downloads\aspnet-api-versioning-master (4)\aspnet-api-versioning-master\ApiVersioning.sln]
C:\Users\\Downloads\aspnet-api-versioning-master (4)\aspnet-api-versioning-master\samples\webapi\SwaggerODataWebApiSample\SwaggerODataWebApiSample.csproj : warning NU1503: Skipping restore for project 'C:\Users\\Downloads\aspnet-api-versioning-master (4)\aspnet-api-versioning-master\samples\webapi\SwaggerODataWebApiSample\SwaggerODataWebApiSample.csproj'. The project file may be invalid or missing targets required for restore. [C:\Users\\Downloads\aspnet-api-versioning-master (4)\aspnet-api-versioning-master\ApiVersioning.sln]
  Restoring packages for C:\Users\\Downloads\aspnet-api-versioning-master (4)\aspnet-api-versioning-master\src\Microsoft.AspNet.OData.Versioning.ApiExplorer\Microsoft.AspNet.OData.Versioning.ApiExplorer.csproj...
  Restoring packages for C:\Users\\Downloads\aspnet-api-versioning-master (4)\aspnet-api-versioning-master\src\Microsoft.AspNet.OData.Versioning\Microsoft.AspNet.OData.Versioning.csproj...
  Restoring packages for C:\Users\\Downloads\aspnet-api-versioning-master (4)\aspnet-api-versioning-master\samples\aspnetcore\ConventionsSample\ConventionsSample.csproj...
  Restoring packages for C:\Users\\Downloads\aspnet-api-versioning-master (4)\aspnet-api-versioning-master\src\Microsoft.AspNet.WebApi.Versioning\Microsoft.AspNet.WebApi.Versioning.csproj...
  Restoring packages for C:\Users\\Downloads\aspnet-api-versioning-master (4)\aspnet-api-versioning-master\samples\aspnetcore\BasicSample\BasicSample.csproj...
  Restoring packages for C:\Users\\Downloads\aspnet-api-versioning-master (4)\aspnet-api-versioning-master\samples\aspnetcore\ByNamespaceSample\ByNamespaceSample.csproj...
  Restoring packages for C:\Users\\Downloads\aspnet-api-versioning-master (4)\aspnet-api-versioning-master\samples\aspnetcore\SwaggerSample\SwaggerSample.csproj...
  Restoring packages for C:\Users\\Downloads\aspnet-api-versioning-master (4)\aspnet-api-versioning-master\src\Microsoft.AspNet.WebApi.Versioning.ApiExplorer\Microsoft.AspNet.WebApi.Versioning.ApiExplorer.csproj...
  Installing Text.Analyzers 2.6.0.
  Installing Microsoft.CodeQuality.Analyzers 2.6.0.
  Installing Microsoft.NetCore.Analyzers 2.6.0.
  Installing Microsoft.NetFramework.Analyzers 2.6.0.
  Installing Microsoft.CodeAnalysis.FxCopAnalyzers 2.6.0.
  Installing StyleCop.Analyzers 1.1.0-beta004.
  Installing Microsoft.Net.Compilers 2.6.0.
  Generating MSBuild file C:\Users\\Downloads\aspnet-api-versioning-master (4)\aspnet-api-versioning-master\src\Microsoft.AspNet.WebApi.Versioning\obj\Microsoft.AspNet.WebApi.Versioning.csproj.nuget.g.props.
  Generating MSBuild file C:\Users\\Downloads\aspnet-api-versioning-master (4)\aspnet-api-versioning-master\src\Microsoft.AspNet.WebApi.Versioning.ApiExplorer\obj\Microsoft.AspNet.WebApi.Versioning.ApiExplorer.csproj.nuget.g.props.
  Generating MSBuild file C:\Users\\Downloads\aspnet-api-versioning-master (4)\aspnet-api-versioning-master\src\Microsoft.AspNet.WebApi.Versioning.ApiExplorer\obj\Microsoft.AspNet.WebApi.Versioning.ApiExplorer.csproj.nuget.g.targets.
  Generating MSBuild file C:\Users\\Downloads\aspnet-api-versioning-master (4)\aspnet-api-versioning-master\src\Microsoft.AspNet.WebApi.Versioning\obj\Microsoft.AspNet.WebApi.Versioning.csproj.nuget.g.targets.
  Restore completed in 4,54 sec for C:\Users\\Downloads\aspnet-api-versioning-master (4)\aspnet-api-versioning-master\src\Microsoft.AspNet.WebApi.Versioning.ApiExplorer\Microsoft.AspNet.WebApi.Versioning.ApiExplorer.csproj.
  Restore completed in 4,54 sec for C:\Users\\Downloads\aspnet-api-versioning-master (4)\aspnet-api-versioning-master\src\Microsoft.AspNet.WebApi.Versioning\Microsoft.AspNet.WebApi.Versioning.csproj.
  Restoring packages for C:\Users\\Downloads\aspnet-api-versioning-master (4)\aspnet-api-versioning-master\src\Microsoft.AspNetCore.Mvc.Versioning\Microsoft.AspNetCore.Mvc.Versioning.csproj...
  Restoring packages for C:\Users\\Downloads\aspnet-api-versioning-master (4)\aspnet-api-versioning-master\src\Microsoft.AspNetCore.Mvc.Versioning.ApiExplorer\Microsoft.AspNetCore.Mvc.Versioning.ApiExplorer.csproj...
  Generating MSBuild file C:\Users\\Downloads\aspnet-api-versioning-master (4)\aspnet-api-versioning-master\src\Microsoft.AspNet.OData.Versioning.ApiExplorer\obj\Microsoft.AspNet.OData.Versioning.ApiExplorer.csproj.nuget.g.props.
  Generating MSBuild file C:\Users\\Downloads\aspnet-api-versioning-master (4)\aspnet-api-versioning-master\src\Microsoft.AspNet.OData.Versioning\obj\Microsoft.AspNet.OData.Versioning.csproj.nuget.g.props.
  Generating MSBuild file C:\Users\\Downloads\aspnet-api-versioning-master (4)\aspnet-api-versioning-master\src\Microsoft.AspNet.OData.Versioning.ApiExplorer\obj\Microsoft.AspNet.OData.Versioning.ApiExplorer.csproj.nuget.g.targets.
  Generating MSBuild file C:\Users\\Downloads\aspnet-api-versioning-master (4)\aspnet-api-versioning-master\src\Microsoft.AspNet.OData.Versioning\obj\Microsoft.AspNet.OData.Versioning.csproj.nuget.g.targets.
  Restore completed in 4,85 sec for C:\Users\\Downloads\aspnet-api-versioning-master (4)\aspnet-api-versioning-master\src\Microsoft.AspNet.OData.Versioning.ApiExplorer\Microsoft.AspNet.OData.Versioning.ApiExplorer.csproj.
  Restore completed in 4,85 sec for C:\Users\\Downloads\aspnet-api-versioning-master (4)\aspnet-api-versioning-master\src\Microsoft.AspNet.OData.Versioning\Microsoft.AspNet.OData.Versioning.csproj.
  Restoring packages for C:\Users\\Downloads\aspnet-api-versioning-master (4)\aspnet-api-versioning-master\test\Microsoft.AspNet.OData.Versioning.Tests\Microsoft.AspNet.OData.Versioning.Tests.csproj...
  Restoring packages for C:\Users\\Downloads\aspnet-api-versioning-master (4)\aspnet-api-versioning-master\test\Microsoft.AspNet.OData.Versioning.ApiExplorer.Tests\Microsoft.AspNet.OData.Versioning.ApiExplorer.Tests.csproj...
  Generating MSBuild file C:\Users\\Downloads\aspnet-api-versioning-master (4)\aspnet-api-versioning-master\src\Microsoft.AspNetCore.Mvc.Versioning\obj\Microsoft.AspNetCore.Mvc.Versioning.csproj.nuget.g.props.
  Generating MSBuild file C:\Users\\Downloads\aspnet-api-versioning-master (4)\aspnet-api-versioning-master\src\Microsoft.AspNetCore.Mvc.Versioning\obj\Microsoft.AspNetCore.Mvc.Versioning.csproj.nuget.g.targets.
  Restore completed in 1,59 sec for C:\Users\\Downloads\aspnet-api-versioning-master (4)\aspnet-api-versioning-master\src\Microsoft.AspNetCore.Mvc.Versioning\Microsoft.AspNetCore.Mvc.Versioning.csproj.
  Restoring packages for C:\Users\\Downloads\aspnet-api-versioning-master (4)\aspnet-api-versioning-master\test\Microsoft.AspNet.WebApi.Acceptance.Tests\Microsoft.AspNet.WebApi.Acceptance.Tests.csproj...
  Generating MSBuild file C:\Users\\Downloads\aspnet-api-versioning-master (4)\aspnet-api-versioning-master\src\Microsoft.AspNetCore.Mvc.Versioning.ApiExplorer\obj\Microsoft.AspNetCore.Mvc.Versioning.ApiExplorer.csproj.nuget.g.props.
  Generating MSBuild file C:\Users\\Downloads\aspnet-api-versioning-master (4)\aspnet-api-versioning-master\src\Microsoft.AspNetCore.Mvc.Versioning.ApiExplorer\obj\Microsoft.AspNetCore.Mvc.Versioning.ApiExplorer.csproj.nuget.g.targets.
  Restore completed in 1,71 sec for C:\Users\\Downloads\aspnet-api-versioning-master (4)\aspnet-api-versioning-master\src\Microsoft.AspNetCore.Mvc.Versioning.ApiExplorer\Microsoft.AspNetCore.Mvc.Versioning.ApiExplorer.csproj.
  Restoring packages for C:\Users\\Downloads\aspnet-api-versioning-master (4)\aspnet-api-versioning-master\test\Microsoft.AspNet.WebApi.Versioning.ApiExplorer.Tests\Microsoft.AspNet.WebApi.Versioning.ApiExplorer.Tests.csproj...
  Generating MSBuild file C:\Users\\Downloads\aspnet-api-versioning-master (4)\aspnet-api-versioning-master\samples\aspnetcore\BasicSample\obj\BasicSample.csproj.nuget.g.props.
  Generating MSBuild file C:\Users\\Downloads\aspnet-api-versioning-master (4)\aspnet-api-versioning-master\samples\aspnetcore\BasicSample\obj\BasicSample.csproj.nuget.g.targets.
  Generating MSBuild file C:\Users\\Downloads\aspnet-api-versioning-master (4)\aspnet-api-versioning-master\samples\aspnetcore\ConventionsSample\obj\ConventionsSample.csproj.nuget.g.props.
  Generating MSBuild file C:\Users\\Downloads\aspnet-api-versioning-master (4)\aspnet-api-versioning-master\samples\aspnetcore\ConventionsSample\obj\ConventionsSample.csproj.nuget.g.targets.
  Generating MSBuild file C:\Users\\Downloads\aspnet-api-versioning-master (4)\aspnet-api-versioning-master\samples\aspnetcore\ByNamespaceSample\obj\ByNamespaceSample.csproj.nuget.g.props.
  Generating MSBuild file C:\Users\\Downloads\aspnet-api-versioning-master (4)\aspnet-api-versioning-master\samples\aspnetcore\ByNamespaceSample\obj\ByNamespaceSample.csproj.nuget.g.targets.
  Restore completed in 7,88 sec for C:\Users\\Downloads\aspnet-api-versioning-master (4)\aspnet-api-versioning-master\samples\aspnetcore\BasicSample\BasicSample.csproj.
  Restoring packages for C:\Users\\Downloads\aspnet-api-versioning-master (4)\aspnet-api-versioning-master\test\Microsoft.AspNet.WebApi.Versioning.Tests\Microsoft.AspNet.WebApi.Versioning.Tests.csproj...
  Restore completed in 7,89 sec for C:\Users\\Downloads\aspnet-api-versioning-master (4)\aspnet-api-versioning-master\samples\aspnetcore\ConventionsSample\ConventionsSample.csproj.
  Restore completed in 7,9 sec for C:\Users\\Downloads\aspnet-api-versioning-master (4)\aspnet-api-versioning-master\samples\aspnetcore\ByNamespaceSample\ByNamespaceSample.csproj.
  Restoring packages for C:\Users\\Downloads\aspnet-api-versioning-master (4)\aspnet-api-versioning-master\test\Microsoft.AspNetCore.Mvc.Acceptance.Tests\Microsoft.AspNetCore.Mvc.Acceptance.Tests.csproj...
  Restoring packages for C:\Users\\Downloads\aspnet-api-versioning-master (4)\aspnet-api-versioning-master\test\Microsoft.AspNetCore.Mvc.Versioning.ApiExplorer.Tests\Microsoft.AspNetCore.Mvc.Versioning.ApiExplorer.Tests.csproj...
  Installing xunit.abstractions 2.0.1.
  Installing more.xunit.extensibility.core 2.3.1.
  Installing more.xunit.extensibility.execution 2.3.1.
  Installing more.xunit.core 2.3.1.
  Installing xunit.assert 2.3.1.
  Installing xunit.analyzers 0.7.0.
  Installing Castle.Core 4.2.1.
  Installing more.xunit 2.3.1.
  Installing more.xunit.runner.visualstudio 2.3.1.
  Installing FluentAssertions 4.19.4.
  Installing Moq 4.8.1.
  Generating MSBuild file C:\Users\\Downloads\aspnet-api-versioning-master (4)\aspnet-api-versioning-master\test\Microsoft.AspNet.WebApi.Versioning.ApiExplorer.Tests\obj\Microsoft.AspNet.WebApi.Versioning.ApiExplorer.Tests.csproj.nuget.g.props.
  Generating MSBuild file C:\Users\\Downloads\aspnet-api-versioning-master (4)\aspnet-api-versioning-master\test\Microsoft.AspNet.WebApi.Versioning.Tests\obj\Microsoft.AspNet.WebApi.Versioning.Tests.csproj.nuget.g.props.
  Generating MSBuild file C:\Users\\Downloads\aspnet-api-versioning-master (4)\aspnet-api-versioning-master\test\Microsoft.AspNet.WebApi.Versioning.Tests\obj\Microsoft.AspNet.WebApi.Versioning.Tests.csproj.nuget.g.targets.
  Generating MSBuild file C:\Users\\Downloads\aspnet-api-versioning-master (4)\aspnet-api-versioning-master\test\Microsoft.AspNet.WebApi.Versioning.ApiExplorer.Tests\obj\Microsoft.AspNet.WebApi.Versioning.ApiExplorer.Tests.csproj.nuget.g.targets.
  Generating MSBuild file C:\Users\\Downloads\aspnet-api-versioning-master (4)\aspnet-api-versioning-master\test\Microsoft.AspNet.WebApi.Acceptance.Tests\obj\Microsoft.AspNet.WebApi.Acceptance.Tests.csproj.nuget.g.props.
  Generating MSBuild file C:\Users\\Downloads\aspnet-api-versioning-master (4)\aspnet-api-versioning-master\test\Microsoft.AspNet.WebApi.Acceptance.Tests\obj\Microsoft.AspNet.WebApi.Acceptance.Tests.csproj.nuget.g.targets.
  Generating MSBuild file C:\Users\\Downloads\aspnet-api-versioning-master (4)\aspnet-api-versioning-master\test\Microsoft.AspNet.OData.Versioning.Tests\obj\Microsoft.AspNet.OData.Versioning.Tests.csproj.nuget.g.props.
  Generating MSBuild file C:\Users\\Downloads\aspnet-api-versioning-master (4)\aspnet-api-versioning-master\test\Microsoft.AspNet.OData.Versioning.Tests\obj\Microsoft.AspNet.OData.Versioning.Tests.csproj.nuget.g.targets.
  Generating MSBuild file C:\Users\\Downloads\aspnet-api-versioning-master (4)\aspnet-api-versioning-master\test\Microsoft.AspNet.OData.Versioning.ApiExplorer.Tests\obj\Microsoft.AspNet.OData.Versioning.ApiExplorer.Tests.csproj.nuget.g.props.
  Restore completed in 1,99 sec for C:\Users\\Downloads\aspnet-api-versioning-master (4)\aspnet-api-versioning-master\test\Microsoft.AspNet.WebApi.Versioning.Tests\Microsoft.AspNet.WebApi.Versioning.Tests.csproj.
  Restore completed in 3,61 sec for C:\Users\\Downloads\aspnet-api-versioning-master (4)\aspnet-api-versioning-master\test\Microsoft.AspNet.WebApi.Versioning.ApiExplorer.Tests\Microsoft.AspNet.WebApi.Versioning.ApiExplorer.Tests.csproj.
  Restoring packages for C:\Users\\Downloads\aspnet-api-versioning-master (4)\aspnet-api-versioning-master\test\Microsoft.AspNetCore.Mvc.Versioning.Tests\Microsoft.AspNetCore.Mvc.Versioning.Tests.csproj...
  Restoring packages for C:\Users\\Downloads\aspnet-api-versioning-master (4)\aspnet-api-versioning-master\samples\aspnetcore\BasicSample\BasicSample.csproj...
  Generating MSBuild file C:\Users\\Downloads\aspnet-api-versioning-master (4)\aspnet-api-versioning-master\test\Microsoft.AspNet.OData.Versioning.ApiExplorer.Tests\obj\Microsoft.AspNet.OData.Versioning.ApiExplorer.Tests.csproj.nuget.g.targets.
  Restore completed in 5,06 sec for C:\Users\\Downloads\aspnet-api-versioning-master (4)\aspnet-api-versioning-master\test\Microsoft.AspNet.OData.Versioning.Tests\Microsoft.AspNet.OData.Versioning.Tests.csproj.
  Restore completed in 3,74 sec for C:\Users\\Downloads\aspnet-api-versioning-master (4)\aspnet-api-versioning-master\test\Microsoft.AspNet.WebApi.Acceptance.Tests\Microsoft.AspNet.WebApi.Acceptance.Tests.csproj.
  Restore completed in 5,07 sec for C:\Users\\Downloads\aspnet-api-versioning-master (4)\aspnet-api-versioning-master\test\Microsoft.AspNet.OData.Versioning.ApiExplorer.Tests\Microsoft.AspNet.OData.Versioning.ApiExplorer.Tests.csproj.
  Installing System.Net.WebSockets 4.0.0.
  Installing System.Collections.Specialized 4.0.1.
  Installing System.ComponentModel.Primitives 4.1.0.
  Installing Microsoft.AspNetCore.Http.Features 1.0.0.
  Installing Microsoft.Extensions.Localization.Abstractions 1.0.0.
  Installing Microsoft.AspNetCore.WebUtilities 1.0.0.
  Installing Microsoft.DotNet.InternalAbstractions 1.0.0.
  Installing System.Security.Claims 4.0.1.
  Installing System.ComponentModel.TypeConverter 4.1.0.
  Installing Microsoft.Net.Http.Headers 1.0.0.
  Installing Microsoft.AspNetCore.Http.Abstractions 1.0.0.
  Installing Microsoft.AspNetCore.Hosting.Server.Abstractions 1.0.0.
  Installing Microsoft.Extensions.Configuration.Abstractions 1.0.0.
  Installing System.Text.Encodings.Web 4.0.0.
  Installing Microsoft.Extensions.Primitives 1.0.0.
  Installing Microsoft.Extensions.Localization 1.0.0.
  Installing Swashbuckle.AspNetCore 1.0.0.
  Installing Swashbuckle.AspNetCore.SwaggerUI 1.0.0.
  Installing Swashbuckle.AspNetCore.Swagger 1.0.0.
  Installing Swashbuckle.AspNetCore.SwaggerGen 1.0.0.
  Restore completed in 1,12 sec for C:\Users\\Downloads\aspnet-api-versioning-master (4)\aspnet-api-versioning-master\samples\aspnetcore\BasicSample\BasicSample.csproj.
  Installing System.Xml.XPath 4.0.0.
  Installing Microsoft.Extensions.FileProviders.Embedded 1.0.0.
  Installing Microsoft.AspNetCore.StaticFiles 1.0.0.
  Installing Microsoft.AspNetCore.Mvc.Formatters.Json 1.0.0.
  Installing Microsoft.AspNetCore.Routing 1.0.0.
  Installing Microsoft.AspNetCore.Mvc.Core 1.0.0.
  Installing Microsoft.AspNetCore.Mvc.ApiExplorer 1.0.0.
  Installing Microsoft.AspNetCore.Mvc.DataAnnotations 1.0.0.
  Installing Microsoft.Extensions.FileProviders.Abstractions 1.0.0.
  Installing Microsoft.Extensions.Logging.Abstractions 1.0.0.
  Installing Microsoft.Extensions.WebEncoders 1.0.0.
  Installing Microsoft.AspNetCore.Hosting.Abstractions 1.0.0.
  Installing Microsoft.AspNetCore.Http.Extensions 1.0.0.
  Installing Microsoft.Extensions.ObjectPool 1.0.0.
  Installing Microsoft.Extensions.Options 1.0.0.
  Installing Microsoft.AspNetCore.Routing.Abstractions 1.0.0.
  Installing Microsoft.AspNetCore.JsonPatch 1.0.0.
  Installing Microsoft.Extensions.PlatformAbstractions 1.0.0.
  Installing Microsoft.AspNetCore.Authorization 1.0.0.
  Installing Microsoft.Extensions.DependencyModel 1.0.0.
  Installing Microsoft.AspNetCore.Http 1.0.0.
  Installing Microsoft.AspNetCore.Mvc.Abstractions 1.0.0.
  Installing System.ComponentModel.Annotations 4.1.0.
  Generating MSBuild file C:\Users\\Downloads\aspnet-api-versioning-master (4)\aspnet-api-versioning-master\samples\aspnetcore\SwaggerSample\obj\SwaggerSample.csproj.nuget.g.props.
  Generating MSBuild file C:\Users\\Downloads\aspnet-api-versioning-master (4)\aspnet-api-versioning-master\samples\aspnetcore\SwaggerSample\obj\SwaggerSample.csproj.nuget.g.targets.
  Restore completed in 13,8 sec for C:\Users\\Downloads\aspnet-api-versioning-master (4)\aspnet-api-versioning-master\samples\aspnetcore\SwaggerSample\SwaggerSample.csproj.
  Installing System.Xml.XmlSerializer 4.3.0.
  Installing System.Private.DataContractSerialization 4.3.0.
  Installing Microsoft.Win32.Registry 4.3.0.
  Installing System.Runtime.Serialization.Json 4.3.0.
  Installing System.Diagnostics.Process 4.3.0.
  Installing System.Runtime.Loader 4.3.0.
  Installing System.Diagnostics.TextWriterTraceListener 4.3.0.
  Installing System.ComponentModel.EventBasedAsync 4.3.0.
  Installing Microsoft.DotNet.PlatformAbstractions 1.0.3.
  Installing Microsoft.TestPlatform.ObjectModel 15.3.0.
  Installing Microsoft.Extensions.DependencyModel 1.0.3.
  Installing System.Diagnostics.TraceSource 4.3.0.
  Installing System.Linq.Queryable 4.3.0.
  Installing Microsoft.TestPlatform.TestHost 15.3.0.
  Installing Microsoft.NET.Test.Sdk 15.3.0.
  Installing Microsoft.AspNetCore.TestHost 2.0.0.
  Installing Microsoft.AspNet.WebApi.Client 5.2.4-preview1.
  Generating MSBuild file C:\Users\\Downloads\aspnet-api-versioning-master (4)\aspnet-api-versioning-master\test\Microsoft.AspNetCore.Mvc.Versioning.ApiExplorer.Tests\obj\Microsoft.AspNetCore.Mvc.Versioning.ApiExplorer.Tests.csproj.nuget.g.props.
  Generating MSBuild file C:\Users\\Downloads\aspnet-api-versioning-master (4)\aspnet-api-versioning-master\test\Microsoft.AspNetCore.Mvc.Versioning.ApiExplorer.Tests\obj\Microsoft.AspNetCore.Mvc.Versioning.ApiExplorer.Tests.csproj.nuget.g.targets.
  Generating MSBuild file C:\Users\\Downloads\aspnet-api-versioning-master (4)\aspnet-api-versioning-master\test\Microsoft.AspNetCore.Mvc.Versioning.Tests\obj\Microsoft.AspNetCore.Mvc.Versioning.Tests.csproj.nuget.g.props.
  Generating MSBuild file C:\Users\\Downloads\aspnet-api-versioning-master (4)\aspnet-api-versioning-master\test\Microsoft.AspNetCore.Mvc.Versioning.Tests\obj\Microsoft.AspNetCore.Mvc.Versioning.Tests.csproj.nuget.g.targets.
  Restore completed in 7,35 sec for C:\Users\\Downloads\aspnet-api-versioning-master (4)\aspnet-api-versioning-master\test\Microsoft.AspNetCore.Mvc.Versioning.Tests\Microsoft.AspNetCore.Mvc.Versioning.Tests.csproj.
  Restore completed in 9,37 sec for C:\Users\\Downloads\aspnet-api-versioning-master (4)\aspnet-api-versioning-master\test\Microsoft.AspNetCore.Mvc.Versioning.ApiExplorer.Tests\Microsoft.AspNetCore.Mvc.Versioning.ApiExplorer.Tests.csproj.
  Generating MSBuild file C:\Users\\Downloads\aspnet-api-versioning-master (4)\aspnet-api-versioning-master\test\Microsoft.AspNetCore.Mvc.Acceptance.Tests\obj\Microsoft.AspNetCore.Mvc.Acceptance.Tests.csproj.nuget.g.props.
  Generating MSBuild file C:\Users\\Downloads\aspnet-api-versioning-master (4)\aspnet-api-versioning-master\test\Microsoft.AspNetCore.Mvc.Acceptance.Tests\obj\Microsoft.AspNetCore.Mvc.Acceptance.Tests.csproj.nuget.g.targets.
  Restore completed in 9,42 sec for C:\Users\\Downloads\aspnet-api-versioning-master (4)\aspnet-api-versioning-master\test\Microsoft.AspNetCore.Mvc.Acceptance.Tests\Microsoft.AspNetCore.Mvc.Acceptance.Tests.csproj.

C:\Users\\Downloads\aspnet-api-versioning-master (4)\aspnet-api-versioning-master>
commonsensesoftware commented 6 years ago

I almost never use the Package Manager anymore; however, it seems that I was able to repro the problem. I would follow up with the NuGet team in their repo on GitHub.

I'm using: Package Manager Console Host Version 4.5.0.4685

This is the output I would expect to see. You've clearly never run dotnet before (for this version anyway) and so you also seeing the run once initialization. The .NET CLI cannot be used build all of the samples because some of them still use the legacy project system and the .NET CLI build does not have 100% parity with MSBuild - yet. If you want to build the entire solution from the command-line, then MSBuild is the way to go. I use both regularly, but mostly the .NET CLI unless I'm building the whole solution from the command-line.

For convenience, I strong recommend the Open Command Line extension for Visual Studio by Mads Kristensen; it's awesome. Whenever Visual Studio happens to get out of sync (which happens occasionally), I can just hit SHIFT + ALT + , to open the Developer Command Prompt. From there I can run dotnet or msbuild as needed.

NOTE: I recommend deleting the folder %USERPROFILE%\Source. The Developer Command Prompt opens here over the current directory by default if it exists. I've never found a use for this folder nor ever store anything in it.

I suppose I should have some documentation on how to build the solution, but this is the first time anyone's really asked. In general, people build from within Visual Studio, which couldn't be any more straight forward. However, everything can also be easily built from the command-line. I'm a strong believer in the F5 philosophy. The CI build has the exact same execution steps. There's no special build magic happening.

If you're going to build from the command-line, here's some common commands:

MSBuild

Command Description
msbuild /v:m /t:Restore Perform NuGet package restore
msbuild /v:m Build everything with minimal console logging; similar output to dotnet build
msbuild /v:m /p:Configuration=Release Perform Release build; this will also trigger NuGet packaging
msbuild /v:m /p:Configuration=Release /p:VersionSuffix=beta1 Perform a pre-release build
msbuild /v:m /t:Pack Build a NuGet package without building

.NET CLI

Command Description
dotnet restore Perform NuGet package restore
dotnet build Build everything with minimal console logging; similar output to dotnet build
dotnet build -c Release Perform Release build; this will also trigger NuGet packaging
dotnet build -c Release --version-suffix beta1 Perform a pre-release build
dotnet pack or dotnet pack --no-build Build a NuGet package without building

I hope you find that useful.

bdebaere commented 6 years ago

@commonsensesoftware Thank you for your helpful information. The solution also doesn't build with F5 for me. Which is always my first step, after which I try the Package Manager. Then when that didn't work I came here.

commonsensesoftware commented 6 years ago

You may want to ensure that your tools are up-to-date. It should build from a clean state. My CI configure for PRs builds this way so I know there is a setup where this works.

Here's my current tool set (but I can't tell you the minimum required):

I hope that helps.

commonsensesoftware commented 6 years ago

@bdebaere it seems that you're unblocked or otherwise got things building. There was an issue with one of the referenced NuGet packages that may have been causing an issue too. That has since been resolved. Feel free to come back or reopen the issue if you continue to have problems. I've added a task for myself to document the build tools and process. Thanks.