簡體   English   中英

生成VSTS錯誤,還原失敗

[英]Build VSTS error, failed to restore

我有在VSTS上給出錯誤的代碼。

2018-07-03T12:42:19.3444686Z ##[error]Error: C:\Program Files\dotnet\dotnet.exe failed with return code: 1
2018-07-03T12:42:19.3445690Z ##[error]Packages failed to restore
2018-07-03T12:42:19.3890517Z ##[section]Finishing: Restore**

在在線建立我的項目VSTS時出現了此錯誤。

這是日志:

2018-07-03T12:42:00.8859572Z ##[section]Finishing: Get Sources
2018-07-03T12:42:00.8878622Z ##[section]Starting: Restore
2018-07-03T12:42:00.9483797Z ==============================================================================
2018-07-03T12:42:00.9483938Z Task         : .NET Core
2018-07-03T12:42:00.9484123Z Description  : Build, test, package, or publish a dotnet application, or run a custom dotnet command. For package commands, supports NuGet.org and authenticated feeds like Package Management and MyGet.
2018-07-03T12:42:00.9484523Z Version      : 2.135.0
2018-07-03T12:42:00.9484621Z Author       : Microsoft Corporation
2018-07-03T12:42:00.9484769Z Help         : [More Information](https://go.microsoft.com/fwlink/?linkid=832194)
2018-07-03T12:42:00.9484892Z ==============================================================================
2018-07-03T12:42:16.9645020Z [command]C:\Windows\system32\chcp.com 65001
2018-07-03T12:42:17.2945010Z Active code page: 65001
2018-07-03T12:42:17.4326246Z SYSTEMVSSCONNECTION exists true
2018-07-03T12:42:17.4355349Z Saving NuGet.config to a temporary config file.
2018-07-03T12:42:17.4543271Z ##[warning]No package sources were found in the NuGet.config file at D:\a\1\Nuget\tempNuGet_4.config
2018-07-03T12:42:17.4868536Z [command]"C:\Program Files\dotnet\dotnet.exe" restore D:\a\1\s\VSTSDemo\VSTSDemo\VSTSDemo.csproj --configfile D:\a\1\Nuget\tempNuGet_4.config --verbosity Detailed
2018-07-03T12:42:17.8736022Z Build started 7/3/2018 12:42:17 PM.
2018-07-03T12:42:17.9520390Z      0>Property reassignment: $(MSBuildProjectExtensionsPath)="D:\a\1\s\VSTSDemo\VSTSDemo\obj\" (previous value: "obj\") at C:\Program Files\dotnet\sdk\2.1.300\15.0\Microsoft.Common.props (60,5)
2018-07-03T12:42:18.1325239Z        Property reassignment: $(MSBuildAllProjects)=";C:\Program Files\dotnet\sdk\2.1.300\Microsoft.CSharp.CurrentVersion.targets;C:\Program Files\dotnet\sdk\2.1.300\Microsoft.NETFramework.CurrentVersion.props" (previous value: ";C:\Program Files\dotnet\sdk\2.1.300\Microsoft.CSharp.CurrentVersion.targets") at C:\Program Files\dotnet\sdk\2.1.300\Microsoft.NETFramework.CurrentVersion.props (29,5)
2018-07-03T12:42:18.5600019Z        Property reassignment: $(_DebugSymbolsProduced)="true" (previous value: "false") at C:\Program Files\dotnet\sdk\2.1.300\Microsoft.Common.CurrentVersion.targets (148,5)
2018-07-03T12:42:18.5600878Z        Property reassignment: $(_DocumentationFileProduced)="false" (previous value: "true") at C:\Program Files\dotnet\sdk\2.1.300\Microsoft.Common.CurrentVersion.targets (157,5)
2018-07-03T12:42:18.5608318Z        Property reassignment: $(ProcessorArchitecture)="msil" (previous value: "") at C:\Program Files\dotnet\sdk\2.1.300\Microsoft.Common.CurrentVersion.targets (486,5)
2018-07-03T12:42:18.5635800Z        Property reassignment: $(DelaySign)="" (previous value: "false") at C:\Program Files\dotnet\sdk\2.1.300\Microsoft.Common.CurrentVersion.targets (525,5)
2018-07-03T12:42:18.5642421Z        Property reassignment: $(MSBuildAllProjects)=";C:\Program Files\dotnet\sdk\2.1.300\Microsoft.CSharp.CurrentVersion.targets;C:\Program Files\dotnet\sdk\2.1.300\Microsoft.NETFramework.CurrentVersion.props;D:\a\1\s\VSTSDemo\VSTSDemo\VSTSDemo.csproj;C:\Program Files\dotnet\sdk\2.1.300\Microsoft.Common.CurrentVersion.targets" (previous value: ";C:\Program Files\dotnet\sdk\2.1.300\Microsoft.CSharp.CurrentVersion.targets;C:\Program Files\dotnet\sdk\2.1.300\Microsoft.NETFramework.CurrentVersion.props") at C:\Program Files\dotnet\sdk\2.1.300\Microsoft.Common.CurrentVersion.targets (536,5)
2018-07-03T12:42:18.5642998Z        Property reassignment: $(_SGenGenerateSerializationAssembliesConfig)="Auto" (previous value: "") at C:\Program Files\dotnet\sdk\2.1.300\Microsoft.Common.CurrentVersion.targets (3496,5)
2018-07-03T12:42:18.5643285Z        Property reassignment: $(_SGenGenerateSerializationAssembliesConfig)="Off" (previous value: "Auto") at C:\Program Files\dotnet\sdk\2.1.300\Microsoft.Common.CurrentVersion.targets (3497,5)
2018-07-03T12:42:18.6720829Z        Property reassignment: $(MSBuildAllProjects)=";C:\Program Files\dotnet\sdk\2.1.300\Microsoft.CSharp.CurrentVersion.targets;C:\Program Files\dotnet\sdk\2.1.300\Microsoft.NETFramework.CurrentVersion.props;D:\a\1\s\VSTSDemo\VSTSDemo\VSTSDemo.csproj;C:\Program Files\dotnet\sdk\2.1.300\Microsoft.Common.CurrentVersion.targets;C:\Program Files\dotnet\sdk\2.1.300\Microsoft.NETFramework.CurrentVersion.targets" (previous value: ";C:\Program Files\dotnet\sdk\2.1.300\Microsoft.CSharp.CurrentVersion.targets;C:\Program Files\dotnet\sdk\2.1.300\Microsoft.NETFramework.CurrentVersion.props;D:\a\1\s\VSTSDemo\VSTSDemo\VSTSDemo.csproj;C:\Program Files\dotnet\sdk\2.1.300\Microsoft.Common.CurrentVersion.targets") at C:\Program Files\dotnet\sdk\2.1.300\Microsoft.NETFramework.CurrentVersion.targets (29,6)
2018-07-03T12:42:18.6771849Z        Property reassignment: $(ResolveReferencesDependsOn)="
2018-07-03T12:42:18.6772330Z              
2018-07-03T12:42:18.6772499Z              BeforeResolveReferences;
2018-07-03T12:42:18.6772699Z              AssignProjectConfiguration;
2018-07-03T12:42:18.6772889Z              ResolveProjectReferences;
2018-07-03T12:42:18.6773070Z              FindInvalidProjectReferences;
2018-07-03T12:42:18.6773272Z              ResolveNativeReferences;
2018-07-03T12:42:18.6773441Z              ResolveAssemblyReferences;
2018-07-03T12:42:18.6773609Z              GenerateBindingRedirects;
2018-07-03T12:42:18.6773780Z              ResolveComReferences;
2018-07-03T12:42:18.6773971Z              AfterResolveReferences
2018-07-03T12:42:18.6774142Z            ;
2018-07-03T12:42:18.6774307Z              ImplicitlyExpandDesignTimeFacades
2018-07-03T12:42:18.6774499Z            " (previous value: "
2018-07-03T12:42:18.6774667Z              BeforeResolveReferences;
2018-07-03T12:42:18.6774836Z              AssignProjectConfiguration;
2018-07-03T12:42:18.6775025Z              ResolveProjectReferences;
2018-07-03T12:42:18.6775198Z              FindInvalidProjectReferences;
2018-07-03T12:42:18.6775366Z              ResolveNativeReferences;
2018-07-03T12:42:18.6775696Z              ResolveAssemblyReferences;
2018-07-03T12:42:18.6775955Z              GenerateBindingRedirects;
2018-07-03T12:42:18.6776107Z              ResolveComReferences;
2018-07-03T12:42:18.6776254Z              AfterResolveReferences
2018-07-03T12:42:18.6776454Z            ") at C:\Program Files\dotnet\sdk\2.1.300\Microsoft.NETFramework.CurrentVersion.targets (79,5)
2018-07-03T12:42:18.6777621Z        Property reassignment: $(MSBuildAllProjects)=";C:\Program Files\dotnet\sdk\2.1.300\Microsoft.CSharp.CurrentVersion.targets;C:\Program Files\dotnet\sdk\2.1.300\Microsoft.NETFramework.CurrentVersion.props;D:\a\1\s\VSTSDemo\VSTSDemo\VSTSDemo.csproj;C:\Program Files\dotnet\sdk\2.1.300\Microsoft.Common.CurrentVersion.targets;C:\Program Files\dotnet\sdk\2.1.300\Microsoft.NETFramework.CurrentVersion.targets;C:\Program Files\dotnet\sdk\2.1.300\NuGet.targets" (previous value: ";C:\Program Files\dotnet\sdk\2.1.300\Microsoft.CSharp.CurrentVersion.targets;C:\Program Files\dotnet\sdk\2.1.300\Microsoft.NETFramework.CurrentVersion.props;D:\a\1\s\VSTSDemo\VSTSDemo\VSTSDemo.csproj;C:\Program Files\dotnet\sdk\2.1.300\Microsoft.Common.CurrentVersion.targets;C:\Program Files\dotnet\sdk\2.1.300\Microsoft.NETFramework.CurrentVersion.targets") at C:\Program Files\dotnet\sdk\2.1.300\NuGet.targets (45,5)
2018-07-03T12:42:18.6779244Z        Property reassignment: $(MSBuildAllProjects)=";C:\Program Files\dotnet\sdk\2.1.300\Microsoft.CSharp.CurrentVersion.targets;C:\Program Files\dotnet\sdk\2.1.300\Microsoft.NETFramework.CurrentVersion.props;D:\a\1\s\VSTSDemo\VSTSDemo\VSTSDemo.csproj;C:\Program Files\dotnet\sdk\2.1.300\Microsoft.Common.CurrentVersion.targets;C:\Program Files\dotnet\sdk\2.1.300\Microsoft.NETFramework.CurrentVersion.targets;C:\Program Files\dotnet\sdk\2.1.300\NuGet.targets;C:\Program Files\dotnet\sdk\2.1.300\15.0\Microsoft.Common.targets\ImportAfter\Microsoft.NET.Build.Extensions.targets" (previous value: ";C:\Program Files\dotnet\sdk\2.1.300\Microsoft.CSharp.CurrentVersion.targets;C:\Program Files\dotnet\sdk\2.1.300\Microsoft.NETFramework.CurrentVersion.props;D:\a\1\s\VSTSDemo\VSTSDemo\VSTSDemo.csproj;C:\Program Files\dotnet\sdk\2.1.300\Microsoft.Common.CurrentVersion.targets;C:\Program Files\dotnet\sdk\2.1.300\Microsoft.NETFramework.CurrentVersion.targets;C:\Program Files\dotnet\sdk\2.1.300\NuGet.targets") at C:\Program Files\dotnet\sdk\2.1.300\15.0\Microsoft.Common.targets\ImportAfter\Microsoft.NET.Build.Extensions.targets (14,5)
2018-07-03T12:42:18.6780911Z        Property reassignment: $(MSBuildAllProjects)=";C:\Program Files\dotnet\sdk\2.1.300\Microsoft.CSharp.CurrentVersion.targets;C:\Program Files\dotnet\sdk\2.1.300\Microsoft.NETFramework.CurrentVersion.props;D:\a\1\s\VSTSDemo\VSTSDemo\VSTSDemo.csproj;C:\Program Files\dotnet\sdk\2.1.300\Microsoft.Common.CurrentVersion.targets;C:\Program Files\dotnet\sdk\2.1.300\Microsoft.NETFramework.CurrentVersion.targets;C:\Program Files\dotnet\sdk\2.1.300\NuGet.targets;C:\Program Files\dotnet\sdk\2.1.300\15.0\Microsoft.Common.targets\ImportAfter\Microsoft.NET.Build.Extensions.targets;C:\Program Files\dotnet\sdk\2.1.300\Microsoft\Microsoft.NET.Build.Extensions\Microsoft.NET.Build.Extensions.targets" (previous value: ";C:\Program Files\dotnet\sdk\2.1.300\Microsoft.CSharp.CurrentVersion.targets;C:\Program Files\dotnet\sdk\2.1.300\Microsoft.NETFramework.CurrentVersion.props;D:\a\1\s\VSTSDemo\VSTSDemo\VSTSDemo.csproj;C:\Program Files\dotnet\sdk\2.1.300\Microsoft.Common.CurrentVersion.targets;C:\Program Files\dotnet\sdk\2.1.300\Microsoft.NETFramework.CurrentVersion.targets;C:\Program Files\dotnet\sdk\2.1.300\NuGet.targets;C:\Program Files\dotnet\sdk\2.1.300\15.0\Microsoft.Common.targets\ImportAfter\Microsoft.NET.Build.Extensions.targets") at C:\Program Files\dotnet\sdk\2.1.300\Microsoft\Microsoft.NET.Build.Extensions\Microsoft.NET.Build.Extensions.targets (15,5)
2018-07-03T12:42:18.8082724Z        Property reassignment: $(MSBuildAllProjects)=";C:\Program Files\dotnet\sdk\2.1.300\Microsoft.CSharp.CurrentVersion.targets;C:\Program Files\dotnet\sdk\2.1.300\Microsoft.NETFramework.CurrentVersion.props;D:\a\1\s\VSTSDemo\VSTSDemo\VSTSDemo.csproj;C:\Program Files\dotnet\sdk\2.1.300\Microsoft.Common.CurrentVersion.targets;C:\Program Files\dotnet\sdk\2.1.300\Microsoft.NETFramework.CurrentVersion.targets;C:\Program Files\dotnet\sdk\2.1.300\NuGet.targets;C:\Program Files\dotnet\sdk\2.1.300\15.0\Microsoft.Common.targets\ImportAfter\Microsoft.NET.Build.Extensions.targets;C:\Program Files\dotnet\sdk\2.1.300\Microsoft\Microsoft.NET.Build.Extensions\Microsoft.NET.Build.Extensions.targets;C:\Program Files\dotnet\sdk\2.1.300\Microsoft\Microsoft.NET.Build.Extensions\Microsoft.NET.Build.Extensions.NETFramework.targets" (previous value: ";C:\Program Files\dotnet\sdk\2.1.300\Microsoft.CSharp.CurrentVersion.targets;C:\Program Files\dotnet\sdk\2.1.300\Microsoft.NETFramework.CurrentVersion.props;D:\a\1\s\VSTSDemo\VSTSDemo\VSTSDemo.csproj;C:\Program Files\dotnet\sdk\2.1.300\Microsoft.Common.CurrentVersion.targets;C:\Program Files\dotnet\sdk\2.1.300\Microsoft.NETFramework.CurrentVersion.targets;C:\Program Files\dotnet\sdk\2.1.300\NuGet.targets;C:\Program Files\dotnet\sdk\2.1.300\15.0\Microsoft.Common.targets\ImportAfter\Microsoft.NET.Build.Extensions.targets;C:\Program Files\dotnet\sdk\2.1.300\Microsoft\Microsoft.NET.Build.Extensions\Microsoft.NET.Build.Extensions.targets") at C:\Program Files\dotnet\sdk\2.1.300\Microsoft\Microsoft.NET.Build.Extensions\Microsoft.NET.Build.Extensions.NETFramework.targets (15,5)
2018-07-03T12:42:18.8483693Z        Property reassignment: $(MSBuildAllProjects)=";C:\Program Files\dotnet\sdk\2.1.300\Microsoft.CSharp.CurrentVersion.targets;C:\Program Files\dotnet\sdk\2.1.300\Microsoft.NETFramework.CurrentVersion.props;D:\a\1\s\VSTSDemo\VSTSDemo\VSTSDemo.csproj;C:\Program Files\dotnet\sdk\2.1.300\Microsoft.Common.CurrentVersion.targets;C:\Program Files\dotnet\sdk\2.1.300\Microsoft.NETFramework.CurrentVersion.targets;C:\Program Files\dotnet\sdk\2.1.300\NuGet.targets;C:\Program Files\dotnet\sdk\2.1.300\15.0\Microsoft.Common.targets\ImportAfter\Microsoft.NET.Build.Extensions.targets;C:\Program Files\dotnet\sdk\2.1.300\Microsoft\Microsoft.NET.Build.Extensions\Microsoft.NET.Build.Extensions.targets;C:\Program Files\dotnet\sdk\2.1.300\Microsoft\Microsoft.NET.Build.Extensions\Microsoft.NET.Build.Extensions.NETFramework.targets;C:\Program Files\dotnet\sdk\2.1.300\Microsoft\Microsoft.NET.Build.Extensions\Microsoft.NET.Build.Extensions.ConflictResolution.targets" (previous value: ";C:\Program Files\dotnet\sdk\2.1.300\Microsoft.CSharp.CurrentVersion.targets;C:\Program Files\dotnet\sdk\2.1.300\Microsoft.NETFramework.CurrentVersion.props;D:\a\1\s\VSTSDemo\VSTSDemo\VSTSDemo.csproj;C:\Program Files\dotnet\sdk\2.1.300\Microsoft.Common.CurrentVersion.targets;C:\Program Files\dotnet\sdk\2.1.300\Microsoft.NETFramework.CurrentVersion.targets;C:\Program Files\dotnet\sdk\2.1.300\NuGet.targets;C:\Program Files\dotnet\sdk\2.1.300\15.0\Microsoft.Common.targets\ImportAfter\Microsoft.NET.Build.Extensions.targets;C:\Program Files\dotnet\sdk\2.1.300\Microsoft\Microsoft.NET.Build.Extensions\Microsoft.NET.Build.Extensions.targets;C:\Program Files\dotnet\sdk\2.1.300\Microsoft\Microsoft.NET.Build.Extensions\Microsoft.NET.Build.Extensions.NETFramework.targets") at C:\Program Files\dotnet\sdk\2.1.300\Microsoft\Microsoft.NET.Build.Extensions\Microsoft.NET.Build.Extensions.ConflictResolution.targets (15,5)
2018-07-03T12:42:18.9739481Z        Property reassignment: $(MSBuildAllProjects)=";C:\Program Files\dotnet\sdk\2.1.300\Microsoft.CSharp.CurrentVersion.targets;C:\Program Files\dotnet\sdk\2.1.300\Microsoft.NETFramework.CurrentVersion.props;D:\a\1\s\VSTSDemo\VSTSDemo\VSTSDemo.csproj;C:\Program Files\dotnet\sdk\2.1.300\Microsoft.Common.CurrentVersion.targets;C:\Program Files\dotnet\sdk\2.1.300\Microsoft.NETFramework.CurrentVersion.targets;C:\Program Files\dotnet\sdk\2.1.300\NuGet.targets;C:\Program Files\dotnet\sdk\2.1.300\15.0\Microsoft.Common.targets\ImportAfter\Microsoft.NET.Build.Extensions.targets;C:\Program Files\dotnet\sdk\2.1.300\Microsoft\Microsoft.NET.Build.Extensions\Microsoft.NET.Build.Extensions.targets;C:\Program Files\dotnet\sdk\2.1.300\Microsoft\Microsoft.NET.Build.Extensions\Microsoft.NET.Build.Extensions.NETFramework.targets;C:\Program Files\dotnet\sdk\2.1.300\Microsoft\Microsoft.NET.Build.Extensions\Microsoft.NET.Build.Extensions.ConflictResolution.targets;C:\Program Files\dotnet\sdk\2.1.300\Microsoft\Microsoft.NET.Build.Extensions\Microsoft.NET.DefaultPackageConflictOverrides.targets" (previous value: ";C:\Program Files\dotnet\sdk\2.1.300\Microsoft.CSharp.CurrentVersion.targets;C:\Program Files\dotnet\sdk\2.1.300\Microsoft.NETFramework.CurrentVersion.props;D:\a\1\s\VSTSDemo\VSTSDemo\VSTSDemo.csproj;C:\Program Files\dotnet\sdk\2.1.300\Microsoft.Common.CurrentVersion.targets;C:\Program Files\dotnet\sdk\2.1.300\Microsoft.NETFramework.CurrentVersion.targets;C:\Program Files\dotnet\sdk\2.1.300\NuGet.targets;C:\Program Files\dotnet\sdk\2.1.300\15.0\Microsoft.Common.targets\ImportAfter\Microsoft.NET.Build.Extensions.targets;C:\Program Files\dotnet\sdk\2.1.300\Microsoft\Microsoft.NET.Build.Extensions\Microsoft.NET.Build.Extensions.targets;C:\Program Files\dotnet\sdk\2.1.300\Microsoft\Microsoft.NET.Build.Extensions\Microsoft.NET.Build.Extensions.NETFramework.targets;C:\Program Files\dotnet\sdk\2.1.300\Microsoft\Microsoft.NET.Build.Extensions\Microsoft.NET.Build.Extensions.ConflictResolution.targets") at C:\Program Files\dotnet\sdk\2.1.300\Microsoft\Microsoft.NET.Build.Extensions\Microsoft.NET.DefaultPackageConflictOverrides.targets (15,5)
2018-07-03T12:42:18.9743559Z        Property reassignment: $(MSBuildAllProjects)=";C:\Program Files\dotnet\sdk\2.1.300\Microsoft.CSharp.CurrentVersion.targets;C:\Program Files\dotnet\sdk\2.1.300\Microsoft.NETFramework.CurrentVersion.props;D:\a\1\s\VSTSDemo\VSTSDemo\VSTSDemo.csproj;C:\Program Files\dotnet\sdk\2.1.300\Microsoft.Common.CurrentVersion.targets;C:\Program Files\dotnet\sdk\2.1.300\Microsoft.NETFramework.CurrentVersion.targets;C:\Program Files\dotnet\sdk\2.1.300\NuGet.targets;C:\Program Files\dotnet\sdk\2.1.300\15.0\Microsoft.Common.targets\ImportAfter\Microsoft.NET.Build.Extensions.targets;C:\Program Files\dotnet\sdk\2.1.300\Microsoft\Microsoft.NET.Build.Extensions\Microsoft.NET.Build.Extensions.targets;C:\Program Files\dotnet\sdk\2.1.300\Microsoft\Microsoft.NET.Build.Extensions\Microsoft.NET.Build.Extensions.NETFramework.targets;C:\Program Files\dotnet\sdk\2.1.300\Microsoft\Microsoft.NET.Build.Extensions\Microsoft.NET.Build.Extensions.ConflictResolution.targets;C:\Program Files\dotnet\sdk\2.1.300\Microsoft\Microsoft.NET.Build.Extensions\Microsoft.NET.DefaultPackageConflictOverrides.targets;C:\Program Files\dotnet\sdk\2.1.300\15.0\Microsoft.Common.targets\ImportAfter\Microsoft.TestPlatform.ImportAfter.targets" (previous value: ";C:\Program Files\dotnet\sdk\2.1.300\Microsoft.CSharp.CurrentVersion.targets;C:\Program Files\dotnet\sdk\2.1.300\Microsoft.NETFramework.CurrentVersion.props;D:\a\1\s\VSTSDemo\VSTSDemo\VSTSDemo.csproj;C:\Program Files\dotnet\sdk\2.1.300\Microsoft.Common.CurrentVersion.targets;C:\Program Files\dotnet\sdk\2.1.300\Microsoft.NETFramework.CurrentVersion.targets;C:\Program Files\dotnet\sdk\2.1.300\NuGet.targets;C:\Program Files\dotnet\sdk\2.1.300\15.0\Microsoft.Common.targets\ImportAfter\Microsoft.NET.Build.Extensions.targets;C:\Program Files\dotnet\sdk\2.1.300\Microsoft\Microsoft.NET.Build.Extensions\Microsoft.NET.Build.Extensions.targets;C:\Program Files\dotnet\sdk\2.1.300\Microsoft\Microsoft.NET.Build.Extensions\Microsoft.NET.Build.Extensions.NETFramework.targets;C:\Program Files\dotnet\sdk\2.1.300\Microsoft\Microsoft.NET.Build.Extensions\Microsoft.NET.Build.Extensions.ConflictResolution.targets;C:\Program Files\dotnet\sdk\2.1.300\Microsoft\Microsoft.NET.Build.Extensions\Microsoft.NET.DefaultPackageConflictOverrides.targets") at C:\Program Files\dotnet\sdk\2.1.300\15.0\Microsoft.Common.targets\ImportAfter\Microsoft.TestPlatform.ImportAfter.targets (16,5)
2018-07-03T12:42:18.9756277Z        Property reassignment: $(MSBuildAllProjects)=";C:\Program Files\dotnet\sdk\2.1.300\Microsoft.CSharp.CurrentVersion.targets;C:\Program Files\dotnet\sdk\2.1.300\Microsoft.NETFramework.CurrentVersion.props;D:\a\1\s\VSTSDemo\VSTSDemo\VSTSDemo.csproj;C:\Program Files\dotnet\sdk\2.1.300\Microsoft.Common.CurrentVersion.targets;C:\Program Files\dotnet\sdk\2.1.300\Microsoft.NETFramework.CurrentVersion.targets;C:\Program Files\dotnet\sdk\2.1.300\NuGet.targets;C:\Program Files\dotnet\sdk\2.1.300\15.0\Microsoft.Common.targets\ImportAfter\Microsoft.NET.Build.Extensions.targets;C:\Program Files\dotnet\sdk\2.1.300\Microsoft\Microsoft.NET.Build.Extensions\Microsoft.NET.Build.Extensions.targets;C:\Program Files\dotnet\sdk\2.1.300\Microsoft\Microsoft.NET.Build.Extensions\Microsoft.NET.Build.Extensions.NETFramework.targets;C:\Program Files\dotnet\sdk\2.1.300\Microsoft\Microsoft.NET.Build.Extensions\Microsoft.NET.Build.Extensions.ConflictResolution.targets;C:\Program Files\dotnet\sdk\2.1.300\Microsoft\Microsoft.NET.Build.Extensions\Microsoft.NET.DefaultPackageConflictOverrides.targets;C:\Program Files\dotnet\sdk\2.1.300\15.0\Microsoft.Common.targets\ImportAfter\Microsoft.TestPlatform.ImportAfter.targets;C:\Program Files\dotnet\sdk\2.1.300\Microsoft.TestPlatform.targets" (previous value: ";C:\Program Files\dotnet\sdk\2.1.300\Microsoft.CSharp.CurrentVersion.targets;C:\Program Files\dotnet\sdk\2.1.300\Microsoft.NETFramework.CurrentVersion.props;D:\a\1\s\VSTSDemo\VSTSDemo\VSTSDemo.csproj;C:\Program Files\dotnet\sdk\2.1.300\Microsoft.Common.CurrentVersion.targets;C:\Program Files\dotnet\sdk\2.1.300\Microsoft.NETFramework.CurrentVersion.targets;C:\Program Files\dotnet\sdk\2.1.300\NuGet.targets;C:\Program Files\dotnet\sdk\2.1.300\15.0\Microsoft.Common.targets\ImportAfter\Microsoft.NET.Build.Extensions.targets;C:\Program Files\dotnet\sdk\2.1.300\Microsoft\Microsoft.NET.Build.Extensions\Microsoft.NET.Build.Extensions.targets;C:\Program Files\dotnet\sdk\2.1.300\Microsoft\Microsoft.NET.Build.Extensions\Microsoft.NET.Build.Extensions.NETFramework.targets;C:\Program Files\dotnet\sdk\2.1.300\Microsoft\Microsoft.NET.Build.Extensions\Microsoft.NET.Build.Extensions.ConflictResolution.targets;C:\Program Files\dotnet\sdk\2.1.300\Microsoft\Microsoft.NET.Build.Extensions\Microsoft.NET.DefaultPackageConflictOverrides.targets;C:\Program Files\dotnet\sdk\2.1.300\15.0\Microsoft.Common.targets\ImportAfter\Microsoft.TestPlatform.ImportAfter.targets") at C:\Program Files\dotnet\sdk\2.1.300\Microsoft.TestPlatform.targets (17,5)
2018-07-03T12:42:19.2724137Z      1>Project "D:\a\1\s\VSTSDemo\VSTSDemo\VSTSDemo.csproj" on node 1 (Restore target(s)).
2018-07-03T12:42:19.2728383Z      1>Building with tools version "15.0".
2018-07-03T12:42:19.2988664Z      1>D:\a\1\s\VSTSDemo\VSTSDemo\VSTSDemo.csproj(293,3): error MSB4019: The imported project "C:\Program Files\dotnet\sdk\2.1.300\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.
2018-07-03T12:42:19.2989104Z      1>Done Building Project "D:\a\1\s\VSTSDemo\VSTSDemo\VSTSDemo.csproj" (Restore target(s)) -- FAILED.
2018-07-03T12:42:19.3105724Z 
2018-07-03T12:42:19.3106408Z Build FAILED.
2018-07-03T12:42:19.3112023Z 
2018-07-03T12:42:19.3112348Z        "D:\a\1\s\VSTSDemo\VSTSDemo\VSTSDemo.csproj" (Restore target) (1) ->
2018-07-03T12:42:19.3113744Z          D:\a\1\s\VSTSDemo\VSTSDemo\VSTSDemo.csproj(293,3): error MSB4019: The imported project "C:\Program Files\dotnet\sdk\2.1.300\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.
2018-07-03T12:42:19.3114127Z 

日志文件說C:\\Program Files\\dotnet\\sdk\\2.1.300\\Microsoft\\VisualStudio\\v15.0\\WebApplications\\Microsoft.WebApplication.targets該文件: C:\\Program Files\\dotnet\\sdk\\2.1.300\\Microsoft\\VisualStudio\\v15.0\\WebApplications\\Microsoft.WebApplication.targets

您可以:

  • 從本地計算機獲取此文件,並將其推送到特定文件夾下的git存儲庫。

  • 通過編寫腳本以在構建代理中搜索文件Microsoft.WebApplication.targets ,將其找到到計算機中。

我遇到了同樣的問題。 似乎無法構建.NET Core 2.1 / ASP.NET Core 2.1項目,或者默認模板上缺少某些配置。

我還沒有找到自己的東西。

該錯誤消息主要是由於使用.NET Core還原任務構建ASP.NET(.Net框架)項目而引起的。

因此,您可以仔細檢查您的項目。 而要構建ASP.NET項目,可以將ASP.NET構建模板與NuGet恢復任務結合使用。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM