.NET Blazor在构建应用程序时出现MSB3073错误,但如何解决,删除Blazor.MonoRuntime.target中的行并不能使其生效。

我在大学的最后一年,所以在编程,特别是Blazor.This错误显示后,启动项目,安装nuget包EntityFrameworkCore,EntityFrameworkCore.SqlServer和EntityFrameworkCore.Tools,然后我scaffold我的本地数据库(这就是为什么我给con字符串),这一行。

Scaffold-DbContext "Data Source=DESKTOP-VF53KDE;Initial Catalog=studAdmin;
Integrated Security=True;Connect Timeout=30;Encrypt=False;TrustServerCertificate=False;ApplicationIntent=ReadWrite;MultiSubnetFailover=False" 
Microsoft.EntityFrameworkCore.SqlServer -OutputDir Models -Tables dvorana ,evidencijaBoravka ,grupa ,mjesto ,
nastavnik ,orgjed ,predmet ,predmetgrupa ,student ,upisanpredmet ,zupanija

. 到目前为止,我可以建立应用程序,但在脚手架后,我得到这样的错误。

Error   MSB3073 The command "dotnet "C:\Users\Tomislav\.nuget\packages\
microsoft.aspnetcore.blazor.build\0.6.0\targets\../tools/illink/illink.dll" -l none --verbose 
--strip-security true --exclude-feature com --exclude-feature sre -v false -c link -u link
-b true -d "C:\Users\Tomislav\.nuget\packages\microsoft.aspnetcore.blazor.build\0.6.0\
targets\../tools/mono/bcl/" -d "C:\Users\Tomislav\.nuget\packages\microsoft.aspnetcore.blazor.build
\0.6.0\targets\../tools/mono/bcl/Facades/" -o "C:\Users\Tomislav\Documents\Visual Studio 2017\Projects\Project\Project.Client\obj\Debug\
netstandard2.0\blazor\linker/" -x "C:\Users\Tomislav\.nuget\packages\
microsoft.aspnetcore.blazor.build\0.6.0\targets\BuiltInBclLinkerDescriptor.xml" -x "C:\Users\Tomislav\
Documents\Visual Studio 2017\Projects\Project\Project.Client\obj\Debug\netstandard2.0\blazor\linker.descriptor.xml" -a
 "C:\Users\Tomislav\.nuget\packages\
microsoft.aspnetcore.blazor\0.6.0\lib\netstandard2.0\Microsoft.AspNetCore.Blazor.dll" -a 
"C:\Users\Tomislav\.nuget\packages\microsoft.aspnetcore.blazor.browser\0.6.0\lib\netstandard2.0\
Microsoft.AspNetCore.Blazor.Browser.dll" -a "C:\Users\Tomislav\.nuget\
packages\microsoft.aspnetcore.blazor.build\0.6.0\lib\netstandard1.0\Microsoft.AspNetCore.Blazor.TagHelperWorkaround.dll" -a "C:\Users\Tomislav\.nuget\packages\
microsoft.entityframeworkcore\2.1.4\lib\netstandard2.0\Microsoft.EntityFrameworkCore.dll" -a "C:\Users\Tomislav\.nuget\packages\microsoft.entityframeworkcore.abstractions\2.1.4\lib\netstandard2.0\Microsoft.EntityFrameworkCore.Abstractions.dll" -a "C:\Users\Tomislav\.nuget\packages\microsoft.entityframeworkcore.relational\2.1.4\lib\netstandard2.0\Microsoft.EntityFrameworkCore.Relational.dll" -a "C:\Users\Tomislav\.nuget\packages\microsoft.entityframeworkcore.sqlserver\2.1.4\lib\netstandard2.0\Microsoft.EntityFrameworkCore.SqlServer.dll" -a "C:\Program Files\dotnet\sdk\NuGetFallbackFolder\microsoft.extensions.caching.abstractions\2.1.1\lib\netstandard2.0\Microsoft.Extensions.Caching.Abstractions.dll" -a "C:\Program Files\dotnet\sdk\NuGetFallbackFolder\microsoft.extensions.caching.memory\2.1.1\lib\netstandard2.0\Microsoft.Extensions.Caching.Memory.dll" -a "C:\Program Files\dotnet\sdk\NuGetFallbackFolder\microsoft.extensions.configuration\2.1.1\lib\netstandard2.0\Microsoft.Extensions.Configuration.dll" -a "C:\Program Files\dotnet\sdk\NuGetFallbackFolder\microsoft.extensions.configuration.abstractions\2.1.1\lib\netstandard2.0\Microsoft.Extensions.Configuration.Abstractions.dll" -a "C:\Program Files\dotnet\sdk\NuGetFallbackFolder\microsoft.extensions.configuration.binder\2.1.1\lib\netstandard2.0\Microsoft.Extensions.Configuration.Binder.dll" -a "C:\Program Files\dotnet\sdk\NuGetFallbackFolder\microsoft.extensions.dependencyinjection\2.1.1\lib\netstandard2.0\Microsoft.Extensions.DependencyInjection.dll" -a "C:\Program Files\dotnet\sdk\NuGetFallbackFolder\microsoft.extensions.dependencyinjection.abstractions\2.1.1\lib\netstandard2.0\Microsoft.Extensions.DependencyInjection.Abstractions.dll" -a "C:\Program Files\dotnet\sdk\NuGetFallbackFolder\microsoft.extensions.logging\2.1.1\lib\netstandard2.0\Microsoft.Extensions.Logging.dll" -a "C:\Program Files\dotnet\sdk\NuGetFallbackFolder\microsoft.extensions.logging.abstractions\2.1.1\lib\netstandard2.0\Microsoft.Extensions.Logging.Abstractions.dll" -a "C:\Program Files\dotnet\sdk\NuGetFallbackFolder\microsoft.extensions.options\2.1.1\lib\netstandard2.0\Microsoft.Extensions.Options.dll" -a "C:\Program Files\dotnet\sdk\NuGetFallbackFolder\microsoft.extensions.primitives\2.1.1\lib\netstandard2.0\Microsoft.Extensions.Primitives.dll" -a "C:\Users\Tomislav\.nuget\packages\microsoft.jsinterop\0.6.0\lib\netstandard2.0\Microsoft.JSInterop.dll" -a "C:\Program Files\dotnet\sdk\NuGetFallbackFolder\microsoft.win32.registry\4.5.0\lib\netstandard2.0\Microsoft.Win32.Registry.dll" -a "C:\Users\Tomislav\.nuget\packages\mono.webassembly.interop\0.6.0\lib\netstandard2.0\Mono.WebAssembly.Interop.dll" -a "C:\Program Files\dotnet\sdk\NuGetFallbackFolder\remotion.linq\2.2.0\lib\netstandard1.0\Remotion.Linq.dll" -a "C:\Users\Tomislav\.nuget\packages\system.buffers\4.4.0\lib\netstandard2.0\System.Buffers.dll" -a "C:\Program Files\dotnet\sdk\NuGetFallbackFolder\system.collections.immutable\1.5.0\lib\netstandard2.0\System.Collections.Immutable.dll" -a "C:\Program Files\dotnet\sdk\NuGetFallbackFolder\system.componentmodel.annotations\4.5.0\lib\netstandard2.0\System.ComponentModel.Annotations.dll" -a "C:\Program Files\dotnet\sdk\NuGetFallbackFolder\system.data.sqlclient\4.5.1\lib\netstandard2.0\System.Data.SqlClient.dll" -a "C:\Users\Tomislav\.nuget\packages\system.diagnostics.diagnosticsource\4.5.1\lib\netstandard1.3\System.Diagnostics.DiagnosticSource.dll" -a "C:\Program Files\dotnet\sdk\NuGetFallbackFolder\system.interactive.async\3.1.1\lib\netstandard1.3\System.Interactive.Async.dll" -a "C:\Program Files\dotnet\sdk\NuGetFallbackFolder\system.linq\4.1.0\lib\netstandard1.6\System.Linq.dll" -a "C:\Program Files\dotnet\sdk\NuGetFallbackFolder\system.linq.expressions\4.1.0\lib\netstandard1.6\System.Linq.Expressions.dll" -a "C:\Program Files\dotnet\sdk\NuGetFallbackFolder\system.linq.queryable\4.0.1\lib\netstandard1.3\System.Linq.Queryable.dll" -a "C:\Program Files\dotnet\sdk\NuGetFallbackFolder\system.memory\4.5.1\lib\netstandard2.0\System.Memory.dll" -a "C:\Users\Tomislav\.nuget\packages\system.numerics.vectors\4.4.0\lib\netstandard2.0\System.Numerics.Vectors.dll" -a "C:\Program Files\dotnet\sdk\NuGetFallbackFolder\system.objectmodel\4.0.12\lib\netstandard1.3\System.ObjectModel.dll" -a "C:\Program Files\dotnet\sdk\NuGetFallbackFolder\system.reflection.emit\4.0.1\lib\netstandard1.3\System.Reflection.Emit.dll" -a "C:\Program Files\dotnet\sdk\NuGetFallbackFolder\system.reflection.emit.ilgeneration\4.0.1\lib\netstandard1.3\System.Reflection.Emit.ILGeneration.dll" -a "C:\Program Files\dotnet\sdk\NuGetFallbackFolder\system.reflection.emit.lightweight\4.0.1\lib\netstandard1.3\System.Reflection.Emit.Lightweight.dll" -a "C:\Program Files\dotnet\sdk\NuGetFallbackFolder\system.reflection.typeextensions\4.1.0\lib\netstandard1.5\System.Reflection.TypeExtensions.dll" -a "C:\Program Files\dotnet\sdk\NuGetFallbackFolder\system.runtime.compilerservices.unsafe\4.5.1\lib\netstandard2.0\System.Runtime.CompilerServices.Unsafe.dll" -a "C:\Program Files\dotnet\sdk\NuGetFallbackFolder\system.security.accesscontrol\4.5.0\lib\netstandard2.0\System.Security.AccessControl.dll" -a "C:\Program Files\dotnet\sdk\NuGetFallbackFolder\system.security.principal.windows\4.5.0\lib\netstandard2.0\System.Security.Principal.Windows.dll" -a "C:\Program Files\dotnet\sdk\NuGetFallbackFolder\system.text.encoding.codepages\4.5.0\lib\netstandard2.0\System.Text.Encoding.CodePages.dll" -a "C:\Program Files\dotnet\sdk\NuGetFallbackFolder\system.threading\4.0.11\lib\netstandard1.3\System.Threading.dll" -a "C:\Users\Tomislav\Documents\Visual Studio 2017\Projects\Project\Project.Shared\bin\Debug\netstandard2.0\Project.Shared.dll" -a "C:\Users\Tomislav\Documents\Visual Studio 2017\Projects\Project\Project.Client\obj\Debug\netstandard2.0\Project.Client.dll"" exited with code 1.  Project.Client  C:\Users\Tomislav\.nuget\packages\microsoft.aspnetcore.blazor.build\0.6.0\targets\Blazor.MonoRuntime.targets    447 

双击错误文件Blazor.Monotime.target后,在行打开

<!--  I deleted this row -->
<Exec Command="dotnet &quot;$(MonoLinkerPath)&quot; $(_BlazorLinkerAdditionalOptions) 
@(_BlazorFolderLookupPaths, ' ') -o &quot;$(BlazorIntermediateLinkerOutputPath)&quot; 
@(_BlazorAssemblyDescriptorFiles, ' ') @(_BlazorAssembliesToLink, ' ')"  />

和删除这一行让我建立应用程序,但它只是加载,而不是工作.和我看到错误是在这一行,但我根本不知道bash和足够的其他知识,使这项工作和谷歌没有帮助.有没有人帮助我启动项目,并解释我是什么问题。

EDIT:在我重复了这个项目的所有步骤.Server后,它工作得很好,但如果它是在共享它不工作。

解决方案:

对我来说,这个错误只发生在我激活链接器的时候,所以在进行发布构建的时候。只要你不想真正地把它运给客户,你就可以在不使用链接的情况下进行构建,这应该是可行的。输出只是会比使用链接时大三倍,这取决于你的项目。

在你的情况下,这意味着不要使用 “链接 “这个配置,而是使用另一个不包含链接的配置,通常是 “Debug”。

对于Release构建,我还没有找到解决方案。可能需要看看AspNetCore repo,在那里找到或提出一个问题。

给TA打赏
共{{data.count}}人
人已打赏
未分类

如何从JTable的多行中取值并将其赋值给一个变量?

2022-9-9 0:00:22

未分类

模块'tensorflow'没有属性'random_uniform'。

2022-9-9 0:11:18

0 条回复 A文章作者 M管理员
    暂无讨论,说说你的看法吧
个人中心
购物车
优惠劵
今日签到
有新私信 私信列表
搜索