❔ 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
Denis2y ago
Have you by any chance renamed the namespace, class name, etc...? This probably isn't a vs Mac issue
circles.png
circles.pngOP2y ago
nope havent done anything just
dotnet new maui
code . -r
dotnet new maui
code . -r
Florian Voß
Florian Voß2y 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.pngOP2y ago
no
circles.png
circles.pngOP2y ago
Florian Voß
Florian Voß2y ago
missing assembly reference then
circles.png
circles.pngOP2y ago
quick fix doesnt offer anything about the namespace usings its a fresh project though
Florian Voß
Florian Voß2y 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.pngOP2y ago
true do you know any dependencies for maui?
Florian Voß
Florian Voß2y 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.pngOP2y ago
i did and got nowhere
Angius
Angius2y ago
I'm afraid it might just be the case of "VS4Mac being VS4Mac lmao"
circles.png
circles.pngOP2y 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
Angius2y ago
VSCode being VSCode, then Both are kinda bad
circles.png
circles.pngOP2y 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.pngOP2y ago
their intellisense is working and omnisharp is finding the xaml elements .g.cs files arent being generated
Accord
Accord2y 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.pngOP2y ago
does dotnet cli have all of the capabilities of vs?
Angius
Angius2y ago
Most
circles.png
circles.pngOP2y ago
is generating .g.cs available?
Accord
Accord2y 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