All Questions
Tagged with compiler-errors .net
281 questions
1
vote
1
answer
33
views
.NET MAUI: AOT compiler exited with code 139
I run the following command in Visual Studio Code to generate .NET MAUI iOS release package:
dotnet publish -f net9.0-ios -r ios-arm64
I get the following error:
error: Failed to AOT compile System....
1
vote
0
answers
284
views
Building a fresh .NET 9.0 MAUI project fails with 13 errors
As the title says, building the project fails, showing 13 build errors. I just updated Visual Studio 2022 recently and ticked all the options needed. Creating a fresh project and building it ...
0
votes
0
answers
44
views
How to set up visual studio for monogame android
I am new to monogame development and C# and I try to build my very first project. But I cant build it
In Activity1.cs
using Android.App;
using Android.Content.PM;
using Android.OS;
using Android.Views;...
0
votes
2
answers
174
views
Why "dotnet new console" generates a project that cannot be compiled with "dotnet build"? (error CS5001)
First, a little excerpt from Microsoft:
Starting with .NET 6, the project template for new C# console apps generates the following code in the Program.cs file:
// See https://aka.ms/new-console-...
0
votes
1
answer
578
views
.NET MAUI does not find namespaces
My .NET MAUI application suddenly stopped working when I tried to compile and debug it on a emulator.
I am being told that the namespace MauiApplication in /platforms/android/MainApplication.cs can't ...
0
votes
1
answer
220
views
Interface Does not contain a definition for METHOD and no extension METHOD accepting a first argument of type INTERFACE could be found
I have created a IBrowserWrapper interface and BrowserWrapper class that implements the interface
public class BrowserWrapper : IBrowserWrapper
{
private readonly IBrowser _browser;
private ...
0
votes
1
answer
48
views
C# long compilation errors when using generics
When using generic types in C# and fully qualified namespaces, the compiler will give very long compilation errors like
cannot implicitly convert type Task<Result<System.Generic.Collection.List&...
1
vote
1
answer
81
views
why i have this problem with this Nuget package
I have created a new project on visual studio .net maui.
I´m trying to install the NugetPackage CommunityToolkit.Maui version 9.01
enter image description here
But when I install it, an errors appears ...
1
vote
1
answer
1k
views
Error MSB4018 The "GenerateDepsFile" task failed unexpectedly
Recently I installed VS2022 and VSC. I opened my projecct in VS2022 and Im getting this error Error MSB4018 The "GenerateDepsFile" task failed unexpectedly
If I open this project in VS2019 i ...
2
votes
2
answers
5k
views
Trouble Running .NET 8 Projects After Installing SDK 8
I recently installed .NET SDK 8 and verified its installation using the command dotnet --version, which shows 8.0.204. However, when I attempt to open a project targeting .NET 8, I encounter the ...
0
votes
1
answer
164
views
When im trying docker build i get every of my csharp projects could not compute cache (aka could not be found)
I have been hitting my head at this problem for weeks now and i cant seem to find a reason why docker suddenly cant find my projects anymore. For context i use the auto dockerfile gen on Visual Studio ...
0
votes
2
answers
575
views
Cannot convert value "IsVisible" to "Microsoft.Maui.Controls.BindableProperty"
When creating a .NET MAUI SingleProject App, I am trying to implement some XAML code, but I can't compile it and get a strange builderror.
This is exactely what I do. In my XAML file I have this peace ...
0
votes
1
answer
158
views
Change multiple classes to be partial classes in Visual Studio
I was wondering if there was a way to fix all same compilation errors we can encounter in a C# project in Visual Studio. For example, I am currently encountering hundreds of the following errors (...
1
vote
1
answer
53
views
Package reference not restored
I'm encountering an issue with package restoration and referencing in my ASP.NET multiproject solution. Despite configuring the NuGet package sources correctly, the packages are not being referenced ...
1
vote
1
answer
79
views
weird compiler behavior with switch type pattern usage
In the following code it does not matter whether I try to access s or o, in both cases the compiler complains that the variables are not initialized. I would expect that at least o always being ...