I cannot create the initial or any migration in my new Visual Studio 2022 install. This is a new project from scratch and everything is up to date. Any guidance would be appreciated.
PM> Add-Migration InitialSetup
Get-Interface : GetEnumerator must be called on the UI thread.
At C:\PROGRAM FILES\MICROSOFT VISUAL
STUDIO\2022\PROFESSIONAL\COMMON7\IDE\COMMONEXTENSIONS\MICROSOFT\NUGET\Modules\NuGet\profile.ps1:128 char:20
+ $service = Get-Interface $service $InterfaceType
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [Get-Interface], COMException
+ FullyQualifiedErrorId : System.Runtime.InteropServices.COMException,Get-Interface
The following exception occurred while trying to enumerate the collection: "GetEnumerator must be called on the UI thread.".
At C:\PROGRAM FILES\MICROSOFT VISUAL
STUDIO\2022\PROFESSIONAL\COMMON7\IDE\COMMONEXTENSIONS\MICROSOFT\NUGET\Modules\NuGet\profile.ps1:131 char:5
+ $service
+ ~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [], ExtendedTypeSystemException
+ FullyQualifiedErrorId : ExceptionInGetEnumerator
Add-Migration : You cannot call a method on a null-valued expression.
At line:1 char:1
+ Add-Migration Initial
+ ~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (:) [Add-Migration], RuntimeException
+ FullyQualifiedErrorId : InvokeMethodOnNull,Add-Migration
This is my .csproj
<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.Diagnostics.EntityFrameworkCore" Version="6.0.6" />
<PackageReference Include="Microsoft.AspNetCore.Identity.EntityFrameworkCore" Version="6.0.6" />
<PackageReference Include="Microsoft.AspNetCore.Identity.UI" Version="6.0.5" />
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="6.0.6" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="6.0.6">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="6.0.6" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="6.0.6">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Design" Version="6.0.5" />
</ItemGroup>