我是大学的最后一年,所以我在编程方面很在行,尤其是Blazor。此错误显示在启动项目后,安装nuget包EntityFrameworkCore、EntityFrameworkCore.SQL Server和EntityFrameworkCore.Tools,然后我用此行构建本地数据库(这就是为什么我给出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:UsersTomislav.nugetpackages
microsoft.aspnetcore.blazor.build .6.0targets../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:UsersTomislav.nugetpackagesmicrosoft.aspnetcore.blazor.build .6.0
targets../tools/mono/bcl/" -d "C:UsersTomislav.nugetpackagesmicrosoft.aspnetcore.blazor.build
.6.0targets../tools/mono/bcl/Facades/" -o "C:UsersTomislavDocumentsVisual Studio 2017ProjectsProjectProject.ClientobjDebug
netstandard2.0blazorlinker/" -x "C:UsersTomislav.nugetpackages
microsoft.aspnetcore.blazor.build .6.0targetsBuiltInBclLinkerDescriptor.xml" -x "C:UsersTomislav
DocumentsVisual Studio 2017ProjectsProjectProject.ClientobjDebugnetstandard2.0blazorlinker.descriptor.xml" -a
"C:UsersTomislav.nugetpackages
microsoft.aspnetcore.blazor .6.0libnetstandard2.0Microsoft.AspNetCore.Blazor.dll" -a
"C:UsersTomislav.nugetpackagesmicrosoft.aspnetcore.blazor.browser .6.0libnetstandard2.0
Microsoft.AspNetCore.Blazor.Browser.dll" -a "C:UsersTomislav.nuget
packagesmicrosoft.aspnetcore.blazor.build .6.0libnetstandard1.0Microsoft.AspNetCore.Blazor.TagHelperWorkaround.dll" -a "C:UsersTomislav.nugetpackages
microsoft.entityframeworkcore2.1.4libnetstandard2.0Microsoft.EntityFrameworkCore.dll" -a "C:UsersTomislav.nugetpackagesmicrosoft.entityframeworkcore.abstractions2.1.4libnetstandard2.0Microsoft.EntityFrameworkCore.Abstractions.dll" -a "C:UsersTomislav.nugetpackagesmicrosoft.entityframeworkcore.relational2.1.4libnetstandard2.0Microsoft.EntityFrameworkCore.Relational.dll" -a "C:UsersTomislav.nugetpackagesmicrosoft.entityframeworkcore.sqlserver2.1.4libnetstandard2.0Microsoft.EntityFrameworkCore.SqlServer.dll" -a "C:Program FilesdotnetsdkNuGetFallbackFoldermicrosoft.extensions.caching.abstractions2.1.1libnetstandard2.0Microsoft.Extensions.Caching.Abstractions.dll" -a "C:Program FilesdotnetsdkNuGetFallbackFoldermicrosoft.extensions.caching.memory2.1.1libnetstandard2.0Microsoft.Extensions.Caching.Memory.dll" -a "C:Program FilesdotnetsdkNuGetFallbackFoldermicrosoft.extensions.configuration2.1.1libnetstandard2.0Microsoft.Extensions.Configuration.dll" -a "C:Program FilesdotnetsdkNuGetFallbackFoldermicrosoft.extensions.configuration.abstractions2.1.1libnetstandard2.0Microsoft.Extensions.Configuration.Abstractions.dll" -a "C:Program FilesdotnetsdkNuGetFallbackFoldermicrosoft.extensions.configuration.binder2.1.1libnetstandard2.0Microsoft.Extensions.Configuration.Binder.dll" -a "C:Program FilesdotnetsdkNuGetFallbackFoldermicrosoft.extensions.dependencyinjection2.1.1libnetstandard2.0Microsoft.Extensions.DependencyInjection.dll" -a "C:Program FilesdotnetsdkNuGetFallbackFoldermicrosoft.extensions.dependencyinjection.abstractions2.1.1libnetstandard2.0Microsoft.Extensions.DependencyInjection.Abstractions.dll" -a "C:Program FilesdotnetsdkNuGetFallbackFoldermicrosoft.extensions.logging2.1.1libnetstandard2.0Microsoft.Extensions.Logging.dll" -a "C:Program FilesdotnetsdkNuGetFallbackFoldermicrosoft.extensions.logging.abstractions2.1.1libnetstandard2.0Microsoft.Extensions.Logging.Abstractions.dll" -a "C:Program FilesdotnetsdkNuGetFallbackFoldermicrosoft.extensions.options2.1.1libnetstandard2.0Microsoft.Extensions.Options.dll" -a "C:Program FilesdotnetsdkNuGetFallbackFoldermicrosoft.extensions.primitives2.1.1libnetstandard2.0Microsoft.Extensions.Primitives.dll" -a "C:UsersTomislav.nugetpackagesmicrosoft.jsinterop .6.0libnetstandard2.0Microsoft.JSInterop.dll" -a "C:Program FilesdotnetsdkNuGetFallbackFoldermicrosoft.win32.registry4.5.0libnetstandard2.0Microsoft.Win32.Registry.dll" -a "C:UsersTomislav.nugetpackagesmono.webassembly.interop .6.0libnetstandard2.0Mono.WebAssembly.Interop.dll" -a "C:Program FilesdotnetsdkNuGetFallbackFolderremotion.linq2.2.0libnetstandard1.0Remotion.Linq.dll" -a "C:UsersTomislav.nugetpackagessystem.buffers4.4.0libnetstandard2.0System.Buffers.dll" -a "C:Program FilesdotnetsdkNuGetFallbackFoldersystem.collections.immutable1.5.0libnetstandard2.0System.Collections.Immutable.dll" -a "C:Program FilesdotnetsdkNuGetFallbackFoldersystem.componentmodel.annotations4.5.0libnetstandard2.0System.ComponentModel.Annotations.dll" -a "C:Program FilesdotnetsdkNuGetFallbackFoldersystem.data.sqlclient4.5.1libnetstandard2.0System.Data.SqlClient.dll" -a "C:UsersTomislav.nugetpackagessystem.diagnostics.diagnosticsource4.5.1libnetstandard1.3System.Diagnostics.DiagnosticSource.dll" -a "C:Program FilesdotnetsdkNuGetFallbackFoldersystem.interactive.async3.1.1libnetstandard1.3System.Interactive.Async.dll" -a "C:Program FilesdotnetsdkNuGetFallbackFoldersystem.linq4.1.0libnetstandard1.6System.Linq.dll" -a "C:Program FilesdotnetsdkNuGetFallbackFoldersystem.linq.expressions4.1.0libnetstandard1.6System.Linq.Expressions.dll" -a "C:Program FilesdotnetsdkNuGetFallbackFoldersystem.linq.queryable4.0.1libnetstandard1.3System.Linq.Queryable.dll" -a "C:Program FilesdotnetsdkNuGetFallbackFoldersystem.memory4.5.1libnetstandard2.0System.Memory.dll" -a "C:UsersTomislav.nugetpackagessystem.numerics.vectors4.4.0libnetstandard2.0System.Numerics.Vectors.dll" -a "C:Program FilesdotnetsdkNuGetFallbackFoldersystem.objectmodel4.0.12libnetstandard1.3System.ObjectModel.dll" -a "C:Program FilesdotnetsdkNuGetFallbackFoldersystem.reflection.emit4.0.1libnetstandard1.3System.Reflection.Emit.dll" -a "C:Program FilesdotnetsdkNuGetFallbackFoldersystem.reflection.emit.ilgeneration4.0.1libnetstandard1.3System.Reflection.Emit.ILGeneration.dll" -a "C:Program FilesdotnetsdkNuGetFallbackFoldersystem.reflection.emit.lightweight4.0.1libnetstandard1.3System.Reflection.Emit.Lightweight.dll" -a "C:Program FilesdotnetsdkNuGetFallbackFoldersystem.reflection.typeextensions4.1.0libnetstandard1.5System.Reflection.TypeExtensions.dll" -a "C:Program FilesdotnetsdkNuGetFallbackFoldersystem.runtime.compilerservices.unsafe4.5.1libnetstandard2.0System.Runtime.CompilerServices.Unsafe.dll" -a "C:Program FilesdotnetsdkNuGetFallbackFoldersystem.security.accesscontrol4.5.0libnetstandard2.0System.Security.AccessControl.dll" -a "C:Program FilesdotnetsdkNuGetFallbackFoldersystem.security.principal.windows4.5.0libnetstandard2.0System.Security.Principal.Windows.dll" -a "C:Program FilesdotnetsdkNuGetFallbackFoldersystem.text.encoding.codepages4.5.0libnetstandard2.0System.Text.Encoding.CodePages.dll" -a "C:Program FilesdotnetsdkNuGetFallbackFoldersystem.threading4.0.11libnetstandard1.3System.Threading.dll" -a "C:UsersTomislavDocumentsVisual Studio 2017ProjectsProjectProject.SharedbinDebugnetstandard2.0Project.Shared.dll" -a "C:UsersTomislavDocumentsVisual Studio 2017ProjectsProjectProject.ClientobjDebugnetstandard2.0Project.Client.dll"" exited with code 1. Project.Client C:UsersTomislav.nugetpackagesmicrosoft.aspnetcore.blazor.build .6.0targetsBlazor.MonoRuntime.targets 447
双击错误文件后,Blazor.Monotime.targets在线上打开
<!-- I deleted this row -->
<Exec Command="dotnet "$(MonoLinkerPath)" $(_BlazorLinkerAdditionalOptions)
@(_BlazorFolderLookupPaths, ' ') -o "$(BlazorIntermediateLinkerOutputPath)"
@(_BlazorAssemblyDescriptorFiles, ' ') @(_BlazorAssembliesToLink, ' ')" />
删除这一行可以让我构建应用程序,但它只是加载而不起作用。正如我所看到的,错误就在这一行,但我根本不知道bash和其他足够的知识来实现这一点,谷歌也没有帮助。有人帮我启动这个项目并向我解释哪里出了问题吗。
编辑:在我重复了这个项目上的所有步骤之后。服务器工作得很好,但如果是在共享中完成的,就不起作用了。
对我来说,这个错误只有在激活链接器时才会发生,所以在进行发布构建时也是如此。你可以在不链接的情况下构建,只要你不想把它真正交付给客户,它应该可以工作。输出将是链接的三倍大,具体取决于您的项目。
在您的情况下,这意味着不使用配置"链接",而是使用另一个不包括链接的配置,通常是"调试"。
对于Release版本,我还没有找到解决方案。可能需要查看AspNetCore回购来发现或解决问题。