Enable nullable references in project templates
Contributes to dotnet/aspnetcore#33947 Commit migrated from dotnet/aspnetcore@7db552674a
This commit is contained in:
Родитель
2f2d687f6a
Коммит
802ded27e9
|
@ -2,6 +2,7 @@
|
|||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>${DefaultNetCoreTargetFramework}</TargetFramework>
|
||||
<Nullable>enable</Nullable>
|
||||
<IsPackable>false</IsPackable>
|
||||
<SpaRoot>ClientApp\</SpaRoot>
|
||||
<SpaProxyServerUrl Condition="'$(RequiresHttps)' == 'True'">https://localhost:5002</SpaProxyServerUrl>
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>${DefaultNetCoreTargetFramework}</TargetFramework>
|
||||
<Nullable>enable</Nullable>
|
||||
<TypeScriptCompileBlocked>true</TypeScriptCompileBlocked>
|
||||
<TypeScriptToolsVersion>Latest</TypeScriptToolsVersion>
|
||||
<IsPackable>false</IsPackable>
|
||||
|
|
|
@ -25,7 +25,8 @@
|
|||
".template.config/**"
|
||||
],
|
||||
"copyOnly": [
|
||||
"wwwroot/**"
|
||||
"wwwroot/**",
|
||||
"ClientApp/package-lock.json"
|
||||
],
|
||||
"modifiers": [
|
||||
{
|
||||
|
|
|
@ -19,7 +19,7 @@ namespace Company.WebApplication1.Pages
|
|||
_logger = logger;
|
||||
}
|
||||
|
||||
public string RequestId { get; set; }
|
||||
public string? RequestId { get; set; }
|
||||
|
||||
public bool ShowRequestId => !string.IsNullOrEmpty(RequestId);
|
||||
|
||||
|
|
|
@ -10,6 +10,6 @@ namespace Company.WebApplication1
|
|||
|
||||
public int TemperatureF => 32 + (int)(TemperatureC / 0.5556);
|
||||
|
||||
public string Summary { get; set; }
|
||||
public string? Summary { get; set; }
|
||||
}
|
||||
}
|
||||
|
|
|
@ -25,7 +25,8 @@
|
|||
".template.config/**"
|
||||
],
|
||||
"copyOnly": [
|
||||
"wwwroot/**"
|
||||
"wwwroot/**",
|
||||
"ClientApp/package-lock.json"
|
||||
],
|
||||
"modifiers": [
|
||||
{
|
||||
|
|
|
@ -19,7 +19,7 @@ namespace Company.WebApplication1.Pages
|
|||
_logger = logger;
|
||||
}
|
||||
|
||||
public string RequestId { get; set; }
|
||||
public string? RequestId { get; set; }
|
||||
|
||||
public bool ShowRequestId => !string.IsNullOrEmpty(RequestId);
|
||||
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
@if (SignInManager.IsSignedIn(User))
|
||||
{
|
||||
<li class="nav-item">
|
||||
<a class="nav-link text-dark" asp-area="Identity" asp-page="/Account/Manage/Index" title="Manage">Hello @User.Identity.Name!</a>
|
||||
<a class="nav-link text-dark" asp-area="Identity" asp-page="/Account/Manage/Index" title="Manage">Hello @User.Identity?.Name!</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<form class="form-inline" asp-area="Identity" asp-page="/Account/Logout" asp-route-returnUrl="/">
|
||||
|
|
|
@ -10,6 +10,6 @@ namespace Company.WebApplication1
|
|||
|
||||
public int TemperatureF => 32 + (int)(TemperatureC / 0.5556);
|
||||
|
||||
public string Summary { get; set; }
|
||||
public string? Summary { get; set; }
|
||||
}
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче