Hi, I just created a blazer serverside 3.1 project and added net472. In my csproj I have this:
<PropertyGroup>
<TargetFrameworks>netcoreapp3.1;net472</TargetFrameworks>
</PropertyGroup>
I also have these specified in my program.cs
using AspNetCore;
using Microsoft.AspNetCore.Hosting;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.Hosting;
using Microsoft.Extensions.Logging;
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Threading.Tasks;
These are the errors
Error CS0234 The type or namespace name 'AspNetCore' does not exist in the namespace 'Microsoft' (are you missing an assembly reference?) MbsaBlazorServerMultiTarget (net472) D:\MBSSys\MbsaBlazorServerMultiTarget\Program.cs 2 Active
Error CS0234 The type or namespace name 'Extensions' does not exist in the namespace 'Microsoft' (are you missing an assembly reference?) MbsaBlazorServerMultiTarget (net472) D:\MBSSys\MbsaBlazorServerMultiTarget\Program.cs 3 Active
Error CS0246 The type or namespace name 'IHostBuilder' could not be found (are you missing a using directive or an assembly reference?) MbsaBlazorServerMultiTarget (net472) D:\MBSSys\MbsaBlazorServerMultiTarget\Program.cs 21 Active
Error CS0103 The name 'Host' does not exist in the current context MbsaBlazorServerMultiTarget (net472) D:\MBSSys\MbsaBlazorServerMultiTarget\Program.cs 22 Active
Error CS0246 The type or namespace name 'IApplicationBuilder' could not be found (are you missing a using directive or an assembly reference?) MbsaBlazorServerMultiTarget (net472) D:\MBSSys\MbsaBlazorServerMultiTarget\Startup.cs 35 Active
Warning RAZORSDK1005 One or more Razor component files (.razor) were found, but the project is not configured to compile Razor Components. Configure the project by targeting RazorLangVersion 3.0 or newer. For more information, see https://go.microsoft.com/fwlink/?linkid=868374. MbsaBlazorServerMultiTarget C:\Program Files\dotnet\sdk\6.0.203\Sdks\Microsoft.NET.Sdk.Razor\targets\Sdk.Razor.CurrentVersion.targets 720
Error CS0246 The type or namespace name 'IConfiguration' could not be found (are you missing a using directive or an assembly reference?) MbsaBlazorServerMultiTarget (net472) D:\MBSSys\MbsaBlazorServerMultiTarget\Startup.cs 18 Active
Error CS0246 The type or namespace name 'IWebHostEnvironment' could not be found (are you missing a using directive or an assembly reference?) MbsaBlazorServerMultiTarget (net472) D:\MBSSys\MbsaBlazorServerMultiTarget\Startup.cs 35 Active
I am sure its something I need to do or not do.
thanks for any advice or suggestions