Dotnet Core Blazor-命令“ dotnet ...”以代码1

时间:2018-06-26 06:42:02

标签: c# .net asp.net-core core blazor

我有一个由几个.NET core(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链接-u链接-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 \ NuGetFall backFolder \ 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 \ bin \ Debug \ netst andard2.0 \ XXXXXX.IdentityProvider.Model.dll“ -a” C:\ TFS2 \ BAP-桌面\主\源\代码\ XXXXXX.Utilities \ bin \ Debug \ netstandard2.0 \ XXXXXX.Utilities.dll“ -a “ C:\ TFS2 \ BAP-桌面\主\源\代码\ XXXXXX.ServiceLayer.Analytic.Web \ Lib \ DevExpress.CodeParser.v18.1.dll” -a“ C:\ TFS2 \ BAP-桌面\主\ 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-桌面\主\源\代码\ 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 \包\ microsoft.aspnetcore.blazor.build \ 0.4.0 \ targets \ Blazor.MonoRuntime.targets 441

我真的不知道为什么这种情况开始发生。

我知道任何人都很难解决-但是,如果您能指出为什么出现这样的错误,那么我也许可以解决它:)

我试图清理/重建,并且电脑也被关闭了多次,但错误仍然存​​在。

有什么想法吗?它与.NET Core有关吗?

谢谢

1 个答案:

答案 0 :(得分:2)

在失败的项目上运行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文件中删除以上内容,错误消失了。