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
这个KB合法吗? 是的,了解原因
许可下: CC-BY-SA with attribution
不隶属于 Stack Overflow
这个KB合法吗? 是的,了解原因