从asp.net core 2.0更新到2.1后,我试图用预编译的razorview发布项目,它总是显示错误
命令““ dotnet” exec --runtimeconfig “ E:\ TEMP \ projectname \ bin \ Release \ netcoreapp2.1 \ projectname.runtimeconfig.json” --depsfile“ E:\ TEMP \ projectname \ bin \ Release \ netcoreapp2.1 \ projectname.deps.json” “ C:\ Users \ congt.nuget \ packages \ microsoft.aspnetcore.mvc.razor.viewcompilation \ 2.1.1 \ build \ netstandard2.0 \ Microsoft.AspNetCore.Mvc.Razor.ViewCompilation.dll” @“ obj \ Release \ netcoreapp2.1 \ microsoft.aspnetcore.mvc.razor.viewcompilation.rsp”“ 以代码1退出。
我的csproj:
<Project Sdk="Microsoft.NET.Sdk.Web">
<PropertyGroup>
<TargetFramework>netcoreapp2.1</TargetFramework>
<UserSecretsId>aspnet-projectname-3fa7922c-48ff-48fa-a634-0281b3be3d8e</UserSecretsId>
<PreserveCompilationContext>true</PreserveCompilationContext>
<MvcRazorCompileOnPublish>true</MvcRazorCompileOnPublish>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'">
<Optimize>false</Optimize>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
<LangVersion>7.2</LangVersion>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="AutoMapper.Extensions.Microsoft.DependencyInjection" Version="5.0.1" />
<PackageReference Include="Microsoft.AspNetCore.All" Version="2.1.5" />
<PackageReference Include="Microsoft.AspNetCore.Mvc.Razor.ViewCompilation" Version="2.1.1" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="2.1.4" PrivateAssets="all">
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
<PackageReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Design" Version="2.1.5" PrivateAssets="All" />
</ItemGroup>
<ItemGroup>
<DotNetCliToolReference Include="Microsoft.EntityFrameworkCore.Tools.DotNet" Version="2.0.0" />
<DotNetCliToolReference Include="Microsoft.Extensions.SecretManager.Tools" Version="2.0.0" />
<DotNetCliToolReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Tools" Version="2.0.0" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\projectname.Core\projectname.Core.csproj" />
<ProjectReference Include="..\projectname.Data\projectname.Data.csproj" />
<ProjectReference Include="..\projectname.Services\projectname.Services.csproj" />
</ItemGroup>
<ItemGroup>
<Folder Include="Properties\PublishProfiles\" />
</ItemGroup>
</Project>