C
C#16mo ago
circles.png

❔ vscode (mac) does not recognise things in a new maui project

made a new project with dotnet new maui and dotnet run works fine, but in vscode, namespaces relating to maui and references to the xaml are not recognised. using .net 7, vscode insiders, the nromanov.dotnet-meteor extension, and a macbook air m1. i suspect this might be just bad support for maui without vs.
21 Replies
Denis
Denis16mo ago
Have you by any chance renamed the namespace, class name, etc...? This probably isn't a vs Mac issue
circles.png
circles.png16mo ago
nope havent done anything just
dotnet new maui
code . -r
dotnet new maui
code . -r
Florian Voß
Florian Voß16mo ago
does quick fix offer you importing some usings? or do you have an error about missing dependencies anyhwere? we need more than "type does not exist"
circles.png
circles.png16mo ago
no
circles.png
circles.png16mo ago
Florian Voß
Florian Voß16mo ago
missing assembly reference then
circles.png
circles.png16mo ago
quick fix doesnt offer anything about the namespace usings its a fresh project though
Florian Voß
Florian Voß16mo ago
yes but I could imagine that if you create a MAUI project in VS it comes with all the required depndencies added to it, VS is an IDE. while vscode is just a code editor, you might have to add dependencies yourself via CLI
circles.png
circles.png16mo ago
true do you know any dependencies for maui?
Florian Voß
Florian Voß16mo ago
i never worked with maui sadly but if you just google those namespaces and types youre using you should be getting somewhere
circles.png
circles.png16mo ago
i did and got nowhere
Angius
Angius16mo ago
I'm afraid it might just be the case of "VS4Mac being VS4Mac lmao"
circles.png
circles.png16mo ago
this is vscode not vs4mac vs4mac definitely works CounterBtn works by dotnet making another part of the partial class right? i did a folder wide search and MainPage is only defined in that file
Angius
Angius16mo ago
VSCode being VSCode, then Both are kinda bad
circles.png
circles.png16mo ago
Gerald Versluis
YouTube
Develop .NET MAUI Apps in VS Code with .NET Meteor
I have just found out about the .NET Meteor extension for Visual Studio Code which makes it super easy to get started with .NET MAUI development with VS Code! It even claims to have support for developing on Linux?! 💝 Join this channel to get access to perks: https://www.youtube.com/channel/GeraldVersluis/join Disclaimer: this channel is done ...
circles.png
circles.png16mo ago
their intellisense is working and omnisharp is finding the xaml elements .g.cs files arent being generated
Accord
Accord16mo ago
Was this issue resolved? If so, run /close - otherwise I will mark this as stale and this post will be archived until there is new activity.
circles.png
circles.png16mo ago
does dotnet cli have all of the capabilities of vs?
Angius
Angius16mo ago
Most
circles.png
circles.png16mo ago
is generating .g.cs available?
Accord
Accord16mo ago
Was this issue resolved? If so, run /close - otherwise I will mark this as stale and this post will be archived until there is new activity.
Want results from more Discord servers?
Add your server
More Posts