错误 RZ3007:目标标记名称不能为空或空格 [英] Error RZ3007: Targeted tag name cannot be null or whitespace

查看:30
本文介绍了错误 RZ3007:目标标记名称不能为空或空格的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

升级到 .NET Core 2.0 后,我的 1.1 Web 应用程序无法运行.我收到如下所示的错误消息.检查输出后,我发现对 RZ3007 错误的引用,我认为这与 Razor 编译器有关.视图未编译.

主页/Index.cshtml:

@model LayoutViewModel<div></div>

视图/共享/_Layout.cshtml

 <头><meta charset="utf-8"/><meta name="viewport" content="width=device-width, initial-scale=1.0"/><title>@ViewData["Title"] - GLCoderConfiguration</title><环境名称=开发"><link rel="stylesheet" href="~/lib/bootstrap/dist/css/bootstrap.css"/><link rel="stylesheet" href="~/css/site.css?"/></环境><环境名称="Staging,Production"><link rel="stylesheet" href="https://ajax.aspnetcdn.com/ajax/bootstrap/3.3.7/css/bootstrap.min.css"asp-fallback-href="~/lib/bootstrap/dist/css/bootstrap.min.css"asp-fallback-test-class="sr-only" asp-fallback-test-property="position" asp-fallback-test-value="absolute"/><link rel="stylesheet" href="~/css/site.min.css?"asp-append-version="true"/></环境><身体><nav class="navbar navbar-default navbar-form " ><div class="navbar-header" style="margin-top:10px;margin-bottom:15px;"><button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1"><span class="sr-only">切换导航</span><span class="icon-bar"></span><span class="icon-bar"></span><span class="icon-bar"></span><a class="navbar-brand" href="#">SCM - NCMain</a>

<div class="collapse navbar-collapse vcenter" id="bs-example-navbar-collapse-1" style="margin-top:10px;margin-bottom:0px;">

</nav><div class="container body-content">@RenderBody()<小时/><页脚><p>&copy;2017 - 英格兰物流 - SCM</p></页脚>

<环境名称=开发"><script src="~/lib/jquery/dist/jquery.js"></script><script src="~/lib/bootstrap/dist/js/bootstrap.js"></script><script src="~/js/site.js" asp-append-version="true"></script></环境><环境名称="Staging,Production"><script src="https://ajax.aspnetcdn.com/ajax/jquery/jquery-2.2.0.min.js"asp-fallback-src="~/lib/jquery/dist/jquery.min.js"asp-fallback-test="window.jQuery"crossorigin =匿名"完整性=sha384-K+ctZQ+LL8q6tP7I94W+qzQsfRV2a+AfHIi9k8z8l9ggpc8X+Ytst4yBo/hH+8Fk"><script src="https://ajax.aspnetcdn.com/ajax/bootstrap/3.3.7/bootstrap.min.js"asp-fallback-src="~/lib/bootstrap/dist/js/bootstrap.min.js"asp-fallback-test="window.jQuery && window.jQuery.fn && window.jQuery.fn.modal"crossorigin =匿名"完整性="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa"><script src="~/js/site.min.js" asp-append-version="true"></script></环境>@RenderSection("脚本",需要:false)

我有几个视图组件(LoginStatus 和 MenuItems),但删除了它们以尝试使其正常工作.

运行输出:

 Microsoft.AspNetCore.Mvc.Razor.Compilation.CompilationFailedException:发生一个或多个编译失败:(0,0):错误 RZ3007:目标标记名称不能为空或空格.在 Microsoft.AspNetCore.Mvc.Razor.Internal.RazorViewCompiler.CompileAndEmit(String relativePath)在 Microsoft.AspNetCore.Mvc.Razor.Internal.RazorViewCompiler.CreateCacheEntry(String normalizedPath)--- 从上一个抛出异常的位置开始的堆栈跟踪结束 ---在 System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()在 System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)在 System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()在 Microsoft.AspNetCore.Mvc.Razor.Internal.DefaultRazorPageFactoryProvider.CreateFactory(String relativePath)在 Microsoft.AspNetCore.Mvc.Razor.RazorViewEngine.CreateCacheResult(HashSet`1 expireTokens, String relativePath, Boolean isMainPage)在 Microsoft.AspNetCore.Mvc.Razor.RazorViewEngine.OnCacheMiss(ViewLocationExpanderContext expanderContext, ViewLocationCacheKey cacheKey)在 Microsoft.AspNetCore.Mvc.Razor.RazorViewEngine.LocatePageFromViewLocations(ActionContext actionContext, String pageName, Boolean isMainPage)在 Microsoft.AspNetCore.Mvc.Razor.RazorViewEngine.FindView(ActionContext context, String viewName, Boolean isMainPage)在 Microsoft.AspNetCore.Mvc.ViewEngines.CompositeViewEngine.FindView(ActionContext context, String viewName, Boolean isMainPage)在 Microsoft.AspNetCore.Mvc.ViewFeatures.Internal.ViewResultExecutor.FindView(ActionContext actionContext, ViewResult viewResult)在 Microsoft.AspNetCore.Mvc.ViewResult.d__26.MoveNext()--- 从上一个抛出异常的位置开始的堆栈跟踪结束 ---在 System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()在 System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)在 Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.d__19.MoveNext()--- 从上一个抛出异常的位置开始的堆栈跟踪结束 ---在 System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()在 System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)在 Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.d__24.MoveNext()--- 从上一个抛出异常的位置开始的堆栈跟踪结束 ---在 System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()在 Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.Rethrow(ResultExecutedContext context)在 Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)在 Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.d__22.MoveNext()--- 从上一个抛出异常的位置开始的堆栈跟踪结束 ---在 System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()在 Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.Rethrow(ResourceExecutedContext context)在 Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)在 Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.d__17.MoveNext()--- 从上一个抛出异常的位置开始的堆栈跟踪结束 ---在 System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()在 System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)在 Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.d__15.MoveNext()--- 从上一个抛出异常的位置开始的堆栈跟踪结束 ---在 System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()在 System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)在 Microsoft.AspNetCore.Builder.RouterMiddleware.d__4.MoveNext()--- 从上一个抛出异常的位置开始的堆栈跟踪结束 ---在 System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()在 System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)在 Microsoft.AspNetCore.Session.SessionMiddleware.d__9.MoveNext()--- 从上一个抛出异常的位置开始的堆栈跟踪结束 ---在 System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()在 Microsoft.AspNetCore.Session.SessionMiddleware.d__9.MoveNext()--- 从上一个抛出异常的位置开始的堆栈跟踪结束 ---在 System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()在 System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)在 Microsoft.AspNetCore.Authentication.AuthenticationMiddleware.d__6.MoveNext()--- 从上一个抛出异常的位置开始的堆栈跟踪结束 ---在 System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()在 System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)在 Microsoft.AspNetCore.Diagnostics.DeveloperExceptionPageMiddleware.d__7.MoveNext()

.CSProj

 <属性组><TargetFramework>netcoreapp2.0</TargetFramework><MvcRazorCompileOnPublish>true</MvcRazorCompileOnPublish><MvcCompileViews>true</MvcCompileViews><PreserveCompilationContext>true</PreserveCompilationContext><AssetTargetFallback>$(AssetTargetFallback);portable-net45+win8+wp8+wpa81;</AssetTargetFallback><StartupObject>GLCoderConfiguration.Program</StartupObject></PropertyGroup><项目组><PackageReference Include="FluentValidation" Version="7.1.1"/><PackageReference Include="Microsoft.AspNetCore" Version="2.0.0"/><PackageReference Include="Microsoft.AspNetCore.Diagnostics" 版本="2.0.0"/><PackageReference Include="Microsoft.AspNetCore.Identity.EntityFrameworkCore" Version="2.0.0"/><PackageReference Include="Microsoft.AspNetCore.Mvc" Version="2.0.0"/><PackageReference Include="Microsoft.AspNetCore.Mvc.DataAnnotations" Version="2.0.0"/><PackageReference Include="Microsoft.AspNetCore.Mvc.Razor" Version="2.0.0"/><PackageReference Include="Microsoft.AspNetCore.Mvc.Razor.ViewCompilation" Version="2.0.0" PrivateAssets="All"/><PackageReference Include="Microsoft.AspNetCore.Mvc.TagHelpers" Version="2.0.0"/><PackageReference Include="Microsoft.AspNetCore.Mvc.ViewFeatures" 版本="2.0.0"/><PackageReference Include="Microsoft.AspNetCore.Razor.Runtime" Version="2.0.0"/><PackageReference Include="Microsoft.AspNetCore.Server.IISIntegration" 版本="2.0.0"/><PackageReference Include="Microsoft.AspNetCore.Session" Version="2.0.0"/><PackageReference Include="Microsoft.AspNetCore.StaticFiles" 版本="2.0.0"/><PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="2.0.0"/><PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="2.0.0"/><PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="2.0.0"/><PackageReference Include="Microsoft.Extensions.Caching.Memory" 版本="2.0.0"/><PackageReference Include="Microsoft.Extensions.Logging.Console" Version="2.0.0"/><PackageReference Include="Microsoft.Extensions.Logging.Debug" Version="2.0.0"/><PackageReference Include="Microsoft.Extensions.Options.ConfigurationExtensions" Version="2.0.0"/><PackageReference Include="Microsoft.NETCore.Platforms" Version="2.0.0"/><PackageReference Include="Microsoft.VisualStudio.Web.BrowserLink" 版本="2.0.0"/><PackageReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Design" 版本="2.0.0"/><PackageReference Include="NETStandard.Library" Version="2.0.0"/><PackageReference Include="System.Runtime.CompilerServices.Unsafe" Version="4.4.0"/></项目组><项目组><项目组><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"/></项目组><项目组><ProjectReference Include="....SCMEnumerationsSCMEnumerations.csproj"/><ProjectReference Include="....TMainModelTMainModel.csproj"/><ProjectReference Include="....ViewHelperFunctionsViewExtensions.csproj"/></项目组></项目>

解决方案

我最终回顾了 Microsoft. 然后我完全卸载了 Visual Studio 并重新安装.然后我创建了一个新的 Web 项目,将其设置为目标 2.0,然后从非工作解决方案中复制文件,事情开始自动工作.我仍然需要确保身份验证配置正确,但事情开始出现问题.

After upgrading to .NET Core 2.0 my 1.1 web application cannot run. I get the error message indicated below. After checking the output I found references to the RZ3007 error which I believe is related to the Razor compiler. The View is not compiling.

Home/Index.cshtml:

@model LayoutViewModel
<div></div>

Views/Shared/_Layout.cshtml

    <!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>@ViewData["Title"] - GLCoderConfiguration</title>

    <environment names="Development">
        <link rel="stylesheet" href="~/lib/bootstrap/dist/css/bootstrap.css" />
        <link rel="stylesheet" href="~/css/site.css?" />
    </environment>
    <environment names="Staging,Production">
        <link rel="stylesheet" href="https://ajax.aspnetcdn.com/ajax/bootstrap/3.3.7/css/bootstrap.min.css"
              asp-fallback-href="~/lib/bootstrap/dist/css/bootstrap.min.css"
              asp-fallback-test-class="sr-only" asp-fallback-test-property="position" asp-fallback-test-value="absolute" />
        <link rel="stylesheet" href="~/css/site.min.css?" asp-append-version="true" />

   </environment>
</head>
<body>
    <nav class="navbar navbar-default navbar-form " >

        <div class="navbar-header" style="margin-top:10px;margin-bottom:15px;">
            <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1">
                <span class="sr-only">Toggle navigation</span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
            </button>
            <a class="navbar-brand" href="#">SCM - NCMain</a>
        </div>


        <div class="collapse navbar-collapse vcenter" id="bs-example-navbar-collapse-1" style="margin-top:10px;margin-bottom:0px;">

      </div>
    </nav>
    <div class="container body-content">
        @RenderBody()
        <hr />
        <footer>
            <p>&copy; 2017 - England Logisitics - SCM</p>
        </footer>
    </div>

    <environment names="Development">
        <script src="~/lib/jquery/dist/jquery.js"></script>
        <script src="~/lib/bootstrap/dist/js/bootstrap.js"></script>
        <script src="~/js/site.js" asp-append-version="true"></script>
    </environment>
    <environment names="Staging,Production">
        <script src="https://ajax.aspnetcdn.com/ajax/jquery/jquery-2.2.0.min.js"
                asp-fallback-src="~/lib/jquery/dist/jquery.min.js"
                asp-fallback-test="window.jQuery"
                crossorigin="anonymous"
                integrity="sha384-K+ctZQ+LL8q6tP7I94W+qzQsfRV2a+AfHIi9k8z8l9ggpc8X+Ytst4yBo/hH+8Fk">
        </script>
        <script src="https://ajax.aspnetcdn.com/ajax/bootstrap/3.3.7/bootstrap.min.js"
                asp-fallback-src="~/lib/bootstrap/dist/js/bootstrap.min.js"
                asp-fallback-test="window.jQuery && window.jQuery.fn && window.jQuery.fn.modal"
                crossorigin="anonymous"
                integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa">
        </script>
        <script src="~/js/site.min.js" asp-append-version="true"></script>


    </environment>

    @RenderSection("Scripts", required: false)
  </body>
</html>

I had a couple of view components (LoginStatus and MenuItems) but removed them to try to get this working.

Output from run:

    Microsoft.AspNetCore.Mvc.Razor.Compilation.CompilationFailedException: One or more compilation failures occurred:
(0,0): Error RZ3007: Targeted tag name cannot be null or whitespace.
   at Microsoft.AspNetCore.Mvc.Razor.Internal.RazorViewCompiler.CompileAndEmit(String relativePath)
   at Microsoft.AspNetCore.Mvc.Razor.Internal.RazorViewCompiler.CreateCacheEntry(String normalizedPath)
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at Microsoft.AspNetCore.Mvc.Razor.Internal.DefaultRazorPageFactoryProvider.CreateFactory(String relativePath)
   at Microsoft.AspNetCore.Mvc.Razor.RazorViewEngine.CreateCacheResult(HashSet`1 expirationTokens, String relativePath, Boolean isMainPage)
   at Microsoft.AspNetCore.Mvc.Razor.RazorViewEngine.OnCacheMiss(ViewLocationExpanderContext expanderContext, ViewLocationCacheKey cacheKey)
   at Microsoft.AspNetCore.Mvc.Razor.RazorViewEngine.LocatePageFromViewLocations(ActionContext actionContext, String pageName, Boolean isMainPage)
   at Microsoft.AspNetCore.Mvc.Razor.RazorViewEngine.FindView(ActionContext context, String viewName, Boolean isMainPage)
   at Microsoft.AspNetCore.Mvc.ViewEngines.CompositeViewEngine.FindView(ActionContext context, String viewName, Boolean isMainPage)
   at Microsoft.AspNetCore.Mvc.ViewFeatures.Internal.ViewResultExecutor.FindView(ActionContext actionContext, ViewResult viewResult)
   at Microsoft.AspNetCore.Mvc.ViewResult.<ExecuteResultAsync>d__26.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.<InvokeResultAsync>d__19.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.<InvokeNextResultFilterAsync>d__24.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.Rethrow(ResultExecutedContext context)
   at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)
   at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.<InvokeNextResourceFilter>d__22.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.Rethrow(ResourceExecutedContext context)
   at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)
   at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.<InvokeFilterPipelineAsync>d__17.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.<InvokeAsync>d__15.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.AspNetCore.Builder.RouterMiddleware.<Invoke>d__4.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.AspNetCore.Session.SessionMiddleware.<Invoke>d__9.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Microsoft.AspNetCore.Session.SessionMiddleware.<Invoke>d__9.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.AspNetCore.Authentication.AuthenticationMiddleware.<Invoke>d__6.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.AspNetCore.Diagnostics.DeveloperExceptionPageMiddleware.<Invoke>d__7.MoveNext()

.CSProj

    <Project Sdk="Microsoft.NET.Sdk.Web">

      <PropertyGroup>
        <TargetFramework>netcoreapp2.0</TargetFramework>
        <MvcRazorCompileOnPublish>true</MvcRazorCompileOnPublish>
        <MvcCompileViews>true</MvcCompileViews>
        <PreserveCompilationContext>true</PreserveCompilationContext>
        <AssetTargetFallback>$(AssetTargetFallback);portable-net45+win8+wp8+wpa81;</AssetTargetFallback>
        <StartupObject>GLCoderConfiguration.Program</StartupObject>
      </PropertyGroup>

      <ItemGroup>
        <PackageReference Include="FluentValidation" Version="7.1.1" />
        <PackageReference Include="Microsoft.AspNetCore" Version="2.0.0" />
        <PackageReference Include="Microsoft.AspNetCore.Diagnostics" Version="2.0.0" />
        <PackageReference Include="Microsoft.AspNetCore.Identity.EntityFrameworkCore" Version="2.0.0" />
        <PackageReference Include="Microsoft.AspNetCore.Mvc" Version="2.0.0" />
        <PackageReference Include="Microsoft.AspNetCore.Mvc.DataAnnotations" Version="2.0.0" />
        <PackageReference Include="Microsoft.AspNetCore.Mvc.Razor" Version="2.0.0" />
        <PackageReference Include="Microsoft.AspNetCore.Mvc.Razor.ViewCompilation" Version="2.0.0" PrivateAssets="All" />
        <PackageReference Include="Microsoft.AspNetCore.Mvc.TagHelpers" Version="2.0.0" />
        <PackageReference Include="Microsoft.AspNetCore.Mvc.ViewFeatures" Version="2.0.0" />
        <PackageReference Include="Microsoft.AspNetCore.Razor.Runtime" Version="2.0.0" />
        <PackageReference Include="Microsoft.AspNetCore.Server.IISIntegration" Version="2.0.0" />
        <PackageReference Include="Microsoft.AspNetCore.Session" Version="2.0.0" />
        <PackageReference Include="Microsoft.AspNetCore.StaticFiles" Version="2.0.0" />
        <PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="2.0.0" />
        <PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="2.0.0" />
        <PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="2.0.0" />
        <PackageReference Include="Microsoft.Extensions.Caching.Memory" Version="2.0.0" />
        <PackageReference Include="Microsoft.Extensions.Logging.Console" Version="2.0.0" />
        <PackageReference Include="Microsoft.Extensions.Logging.Debug" Version="2.0.0" />
        <PackageReference Include="Microsoft.Extensions.Options.ConfigurationExtensions" Version="2.0.0" />
        <PackageReference Include="Microsoft.NETCore.Platforms" Version="2.0.0" />
        <PackageReference Include="Microsoft.VisualStudio.Web.BrowserLink" Version="2.0.0" />
        <PackageReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Design" Version="2.0.0" />
        <PackageReference Include="NETStandard.Library" Version="2.0.0" />
        <PackageReference Include="System.Runtime.CompilerServices.Unsafe" Version="4.4.0" />
      </ItemGroup>

      <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="....SCMEnumerationsSCMEnumerations.csproj" />
        <ProjectReference Include="....TMainModelTMainModel.csproj" />
        <ProjectReference Include="....ViewHelperFunctionsViewExtensions.csproj" />
      </ItemGroup>

    </Project>

解决方案

I ended up going over the steps detailed from Microsoft. I then uninstalled Visual Studio completely and reinstalled. Then I created a new web project, set it to target 2.0 and then copied the files from the non-working solution and things started working automatically. I still need to ensure Authentication is configured correctly but things are beginning to fall in line.

这篇关于错误 RZ3007:目标标记名称不能为空或空格的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
其他开发最新文章
热门教程
热门工具
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆