510 questions
- Bountied 0
- Unanswered
- Frequent
- Score
- Trending
- Week
- Month
- Unanswered (my tags)
0
votes
0
answers
67
views
EF Core throw an exception related to a schema where the queried entity is from another schema
I get this exception:
The entity type 'TblCentrale' requires a primary key to be defined.
If you intended to use a keyless entity type, call 'HasNoKey' in 'OnModelCreating'.
This is the code in ...
2
votes
0
answers
193
views
.NET MAUI BindableObject throws an InvalidOperationException when try to instantiate it
I'm currently trying to embed some maui views into a legacy android native application and I found out a way to accomplish that using MSDN native embedding guide;
https://learn.microsoft.com/en-us/...
0
votes
1
answer
101
views
InvalidOperationException was unhandled - C#
I'm coding a button to insert data into a table in a SQL Server database. When I debug, I get this error:
InvalidOperationException was unhandled.
It was highlighting the line
sdadap.Fill(dtab);
I'...
0
votes
0
answers
39
views
Simple exception in Visual Studio that I can't solve about an "InvalidOperationException" [duplicate]
I was following a tutorial from Brackeys on C#, I am trash at programming, and I am also starting out.
Nonetheless, I got this error (see attached screenshot) after writing the line:
Console.ReadKey();...
0
votes
0
answers
22
views
System.InvalidOperationException shoots when I give attribute xpath to method XPathSelectElement() [duplicate]
I am currently coding to obtain the attributes and elements of an input xml by use of xpaths.
Consider the below method:
public static XElement GetXElement(XElement element, string xpathKey)
{
try
...
1
vote
1
answer
152
views
Use Blazored.LocalStorage in onPost of PageModel
I want to use LocalStorage in an onPost method of my PageModel.
But I have an error : "InvalidOperationException: JavaScript interop calls cannot be issued at this time. This is because the ...
0
votes
0
answers
212
views
Razor pages without .cshtml file? Getting a System.InvalidOperationException: The view 'Login' was not found
I'm currently working on a project with an older .Net Core 2.2 webapi which has to be updated to a more recent version. All the developers who has worked on this project has left this company a pretty ...
1
vote
1
answer
566
views
Maui.net ExecuteScriptAsync(): Failed because a valid CoreWebView2 is not present
If I want to execute this method:
private async void GetSessionIdFromWebView()
{
sessionId = await webViewer.EvaluateJavaScriptAsync("MauiAppInterface.GetSessionId();");
}...
0
votes
1
answer
142
views
InvalidOperationException for dropdown filter in ASP.NET Core MVC
I have created a global dropdown filter on my navbar. I get the error:
An unhandled exception occurred while processing the request.
InvalidOperationException: The model item passed into the ...
7
votes
1
answer
12k
views
InvalidOperationEception with serialization with EF Power Tools
When executing the below code: The block of code being executed is with the stars
public static class DbContextExtensions
{
public static async Task<List> SqlQueryAsync(this DbContext db, string ...
0
votes
2
answers
143
views
Run Form simultaneously with Program
I have a class that attempts to create an better alternative to the System.Console class. It started as follows:
public class SuperConsole
{
private readonly Form _Form;
public SuperConsole()
...
-2
votes
1
answer
1k
views
Using UpdateAsync method of UserManager throws InvalidOperationException on EntityFrameworkCore
I am in the process of updating a dotnet Framework project to dotnet Core. I have a UserProfileService class to handle all the users. This had a UserManager which is injected using the dotnet core ...
1
vote
1
answer
200
views
BadImageFormatException for UnitTest with C#
I'm working with this code on C# and at the beginning I couldn't run it because it threw this exception: 'BadImageFormatException ERROR (HRESULT 0x8007000B)'. I resolved it by simply changing: Tools -&...
0
votes
0
answers
41
views
DbContextFactory InvalidOperationException in Blazor App
I’ve changed my use of DbContext to incorporating DbContextFactory in order to handle multiple sql transactions. I’ve run into a couple questions/errors trying to do this.
I have 3 different tables ...
2
votes
1
answer
2k
views
System.InvalidOperationException: 'An error was generated for warning 'Microsoft.EntityFrameworkCore.Query.InvalidIncludePathError'
I get this error:
System.InvalidOperationException: 'An error was generated for warning 'Microsoft.EntityFrameworkCore.Query.InvalidIncludePathError': Unable to find navigation ' ApplicationUser' ...