Dotnet Core Blazor - 命令“dotnet ...”退出代碼1

.net asp.net-core blazor c# core

我有一個解決方案,包括幾個.NET核心(2.1)項目和一個用Blazor(0.4.0)編寫的Web解決方案。

我剛開始收到以下錯誤:

錯誤MSB3073命令“dotnet”C:\ Users \ YYY.nuget \ packages \ microsoft.aspnetcore.blazor.build \ 0.4.0 \ targets ../ tools / illink / illink.dll“-c link -u link -t --verbose -d“C:\ Users \ YYY.nuget \ packages \ microsoft.aspnetcore.blazor.build \ 0.4.0 \ targets ../ tools / mono / bcl /” - d“C:\ Users \ YYY。 nuget \ packages \ microsoft.aspnetcore.blazor.build \ 0.4.0 \ targets ../ tools / mono / bcl / Facades /“ - o”C:\ TFS2 \ BAP - Desktop \ Main \ Source \ Code \ Framework.Desktop \ obj \ Debug \ netstandard2.0 \ blazor / linker /“ - x”C:\ Users \ YYY.nuget \ packages \ microsoft.aspnetcore.blazor.build \ 0.4.0 \ targets \ BuiltInBclLinkerDescriptor.xml“-x”C :\ TFS2 \ BAP - Desktop \ Main \ Source \ Code \ Framework.Desktop \ obj \ Debug \ netstandard2.0 \ blazor \ linker.descriptor.xml“-a”C:\ Users \ YYY.nuget \ packages \ microsoft。 aspnetcore.blazor \ 0.4.0 \ lib \ netstandard2.0 \ Microsoft.AspNetCore.Blazor.dll“-a”C:\ Users \ YYY.nuget \ packages \ microsoft.aspnetcore.blazor.browser \ 0.4.0 \ lib \ netstandard2.0 \ Microsoft.AspNetCore.Blazor.Browser.dll“-a”C:\ Program Files \ dotnet \ sdk \ NuGetFallback Folder \ microsoft.extensions.dependencyinjection \ 2.0.0 \ lib \ netstandard2.0 \ Microsoft.Extensions.DependencyInjection.dll“-a”C:\ Program Files \ dotnet \ sdk \ NuGetFallbackFolder \ microsoft.extensions.dependencyinjection.abstractions \ 2.0 .0 \ lib \ netstandard2.0 \ Microsoft.Extensions.DependencyInjection.Abstractions.dll“-a”C:\ Program Files \ dotnet \ sdk \ NuGetFallbackFolder \ microsoft.extensions.localization.abstractions \ 2.1.0 \ lib \ netstandard2。 0 \ Microsoft.Extensions.Localization.Abstractions.dll“-a”C:\ Program Files \ dotnet \ sdk \ NuGetFallbackFolder \ microsoft.extensions.logging.abstractions \ 2.1.0 \ lib \ netstandard2.0 \ Microsoft.Extensions.Logging .Abstractions.dll“-a”C:\ Program Files \ dotnet \ sdk \ NuGetFallbackFolder \ system.componentmodel.annotations \ 4.5.0 \ lib \ netstandard2.0 \ System.ComponentModel.Annotations.dll“-a”C:\ TFS2 \ BAP - Desktop \ Main \ Source \ Code \ BlazorDevExtreme \ bin \ Debug \ netstandard2.0 \ BlazorDevExtreme.dll“-a”C:\ TFS2 \ BAP - Desktop \ Main \ Source \ Code \ XXXXXX.IdentityProvider.Model \斌\調試\ netstanda rd2.0 \ XXXXXX.IdentityProvider.Model.dll“-a”C:\ TFS2 \ BAP - Desktop \ Main \ Source \ Code \ XXXXXX.Utilities \ bin \ Debug \ netstandard2.0 \ XXXXXX.Utilities.dll“-a “C:\ TFS2 \ BAP - Desktop \ Main \ Source \ Code \ XXXXXX.ServiceLayer.Analytic.Web \ Lib \ DevExpress.CodeParser.v18.1.dll”-a“C:\ TFS2 \ BAP - Desktop \ Main \ Source \ Code \ Framework.Constants \ bin \ Debug \ netstandard2.0 \ Framework.Constants.dll“-a”C:\ TFS2 \ BAP - Desktop \ Main \ Source \ Code \ Framework.Shared \ bin \ Debug \ netstandard2。 0 \ Framework.Shared.dll“-a”C:\ TFS2 \ BAP - Desktop \ Main \ Source \ Code \ XXXXXX.ServiceLayer.Analytic.Web \ Lib \ DevExpress.Data.v18.1.dll“-a”C :\ TFS2 \ BAP - Desktop \ Main \ Source \ Code \ Framework.Desktop \ obj \ Debug \ netstandard2.0 \ Framework.Desktop.dll“”退出代碼1. Framework.Desktop C:\ Users \ YYY.nuget \ packages \ microsoft.aspnetcore.blazor.build \ 0.4.0 \ targets \ Blazor.MonoRuntime.targets 441

我真的不知道為什麼會發生這種情況。

我知道任何人都很難解決 - 但是如果你能指出我為什麼會出現這樣的錯誤,那麼我可以解決它:)

我已經嘗試清理/重建並且電腦也已經多次關閉,錯誤仍然存在。

有任何想法嗎?它與.NET Core有關嗎?

謝謝

熱門答案

在運行dotnet構建失敗的項目後,我遇到了一個具體的錯誤,發現我的.csproj文件中有一些錯誤。

由於某種原因,自動插入了一些ItemGroup元素:

<ItemGroup>
    <Reference Include="DevExpress.CodeParser.v18.1">
      <HintPath>..\XXX.ServiceLayer.Analytic.Web\Lib\DevExpress.CodeParser.v18.1.dll</HintPath>
    </Reference>
  </ItemGroup>

  <ItemGroup>
    <Content Update="Components\FormGroupRowLabeledDateBox\FormGroupRowLabeledDateBox.cshtml">
      <Pack>$(IncludeRazorContentInPack)</Pack>
    </Content>
    <Content Update="Components\FormGroupRowLabeledTextBox\FormGroupRowLabeledTextBox.cshtml">
      <Pack>$(IncludeRazorContentInPack)</Pack>
    </Content>
  </ItemGroup>

通過從失敗的.csproj文件中刪除上述內容,錯誤消失了。



許可下: CC-BY-SA with attribution
不隸屬於 Stack Overflow
許可下: CC-BY-SA with attribution
不隸屬於 Stack Overflow