4.3 KiB
.NET Core 3.0 Preview Known Issues
This document lists known issues for .NET Core 3.0 Preview releases which may be encountered during usage.
ASP.NET Core
Preview 3
-
The Windows Hosting bundle doesn't exist for Preview3: The Windows Hosting bundle contained an issue which copied the 32 bit dlls into 64 bit locations. To work aroud this issue, please install the 3.0 Preview 2 Hosting Bundle and run the executable on a command line with the paramaters
OPT_NO_SHAREDFX=1 OPT_NO_RUNTIME=1
. Then install the appropriate .NET and ASP.NET runtimes for preview3. -
Updates to .razor files fail to show up in subsequent builds: Updates to Razor Component (.razor) in Visual Studio may fail to show up in subsequent builds. To work around this issue add the following item group to the project file:
<ItemGroup> <UpToDateCheckInput Include="@(Content->WithMetadataValue('Extension', '.razor'))" /> </ItemGroup>
-
Updates to Razor Components in .razor files fail to show up in IntelliSense: Updates to Razor Components defined in .razor files may fail to show up in IntelliSense in Visual Studio. To workaround this issue rebuild the project.
-
Single Page Applications with authentication enabled throws method not found exception when visiting the register or login pages: The exception message is the one below.
Method not found: 'Microsoft.EntityFrameworkCore.Metadata.Builders.IndexBuilder Microsoft.EntityFrameworkCore.Metadata.Builders.EntityTypeBuilder``1.HasIndex(System.Linq.Expressions.Expression``1<System.Func``2<!0,System.Object>>)'.
To workaround this issue follow these steps:-
Replace the following package references with the ones below in your csproj folder:
<PackageReference Include="Microsoft.AspNetCore.Identity.EntityFrameworkCore" Version="3.0.0-preview3-19153-02" /> <PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="3.0.0-preview3.19153.1" /> <PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="3.0.0-preview3.19153.1" />
<PackageReference Include="Microsoft.AspNetCore.Identity.EntityFrameworkCore" Version="3.0.0-preview-18579-0056" /> <PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="3.0.0-preview.19080.1" /> <PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="3.0.0-preview.19080.1" /> <PackageReference Include="Microsoft.EntityFrameworkCore.Relational" Version="3.0.0-preview.19080.1" /> <PackageReference Include="Microsoft.EntityFrameworkCore" Version="3.0.0-preview.19080.1" />
-
Add the following snippet to your csproj file:
<PropertyGroup> <NoWarn>$(NoWarn);NU1605</NoWarn> </PropertyGroup>
-
-
Referencing 3.0.0 MVC libraries don't work as intended: There are several issues with referencing a 3.0.0 MVC library.
- Razor pages will 404,
- ApplicationParts and factories will not be discoverable
- Controllers will not be discoverable
To workaround this issue do the following:
- Add the helper method:
private void Add30AssemblyWorkaround(Assembly referencedAssembly, ApplicationPartManager applicationPartManager) { var partFactory = ApplicationPartFactory.GetApplicationPartFactory(referencedAssembly); foreach (var part in partFactory.GetApplicationParts(referencedAssembly)) { applicationPartManager.ApplicationParts.Add(part); } var relatedAssemblies = RelatedAssemblyAttribute.GetRelatedAssemblies(referencedAssembly, throwOnError: true); foreach (var assembly in relatedAssemblies) { partFactory = ApplicationPartFactory.GetApplicationPartFactory(assembly); foreach (var part in partFactory.GetApplicationParts(assembly)) { applicationPartManager.ApplicationParts.Add(part); } } }
- Modify your
services.AddMvc()
call inStartup.cs
:
services.AddMvc() .ConfigureApplicationPartManager(manager => { var referencedAssembly = Assembly.Load("RCL"); Add30AssemblyWorkaround(referencedAssembly, manager); }) ...