【发布时间】:2022-02-22 01:30:33
【问题描述】:
我能够构建应用程序并在我的本地计算机上正确运行它。在将 nuget 包升级到较新版本之前,构建工作正常。
我已确保安装了正确的 SDK。在本地运行最新版本的 Visual Studio。特别是 Visual Studio 2019。
我确实使用了很多谷歌,但在故障排除方面没有运气。
推送构建服务器(TeamCity 在 Windows 上托管,在 Windows 上具有构建代理。)我得到以下信息
详细构建错误
>Done executing task "MSBuild" -- FAILED.
>Done building target "_GenerateRestoreGraph" in project "LBX - Data Worker.csproj" -- FAILED.
>Done Building Project "C:\TeamCity\BuildAgent\work\9316ac4346c6016c\LBX Capital Collector\LBX - Data Worker.csproj" (Restore target(s)) -- FAILED.
.csproj
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>netcoreapp3.1</TargetFramework>
<RootNamespace>LBX_DataWorker</RootNamespace>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'">
<GenerateProgramFile>False</GenerateProgramFile>
<OutputPath>bin\Release</OutputPath>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
<GenerateProgramFile>False</GenerateProgramFile>
<OutputPath>\bin\Debug</OutputPath>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.Identity.EntityFrameworkCore" Version="5.0.10" />
<PackageReference Include="Microsoft.AspNetCore.SignalR.Common" Version="5.0.10" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="5.0.10">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="5.0.10" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="5.0.10">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="5.0.0" />
<PackageReference Include="Microsoft.Extensions.Hosting" Version="5.0.0" />
<PackageReference Include="Microsoft.Extensions.Hosting.Abstractions" Version="5.0.0" />
<PackageReference Include="Microsoft.Extensions.Hosting.WindowsServices" Version="5.0.1" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.11.0" />
<PackageReference Include="NUnit" Version="3.13.2" />
<PackageReference Include="NUnit3TestAdapter" Version="4.0.0" />
<PackageReference Include="ServiceStack.Text" Version="5.12.0" />
<PackageReference Include="System.ServiceProcess.ServiceController" Version="5.0.0" />
<PackageReference Include="WindowsAzure.Storage" Version="9.3.3" />
</ItemGroup>
<ItemGroup>
<None Update="appsettingsProd.json">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Update="appsettingsDev.json">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Update="FredSeries.csv">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Update="GeneralLedgerMissingContractIDs.csv">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
</ItemGroup>
<ItemGroup>
<Folder Include="Database\LBX_Capital\Migrations\" />
</ItemGroup>
</Project>
【问题讨论】: