UB
Universal Blue•2w ago
Vi-

Visual Studio Code can't see .NET SDK

Visual Studio Code is reporting an error detecting the .NET SDK, which is installed and on the system path. VSC's path is missing items from the system path as well.
27 Replies
wolfyreload
wolfyreload•2w ago
Was about to say make a thread
Vi-
Vi-OP•2w ago
No description
wolfyreload
wolfyreload•2w ago
You could just layer vscode (which the Bazzite devs don't like but Bluefin and Aurora do it for this reason)
Vi-
Vi-OP•2w ago
No description
Vi-
Vi-OP•2w ago
What does that do?
wolfyreload
wolfyreload•2w ago
It puts vs code as a layer in rpm-ostree instead of trying to hack around the flatpak
echo -e "[code]\nname=Visual Studio Code\nbaseurl=https://packages.microsoft.com/yumrepos/vscode\nenabled=1\ngpgcheck=1\ngpgkey=https://packages.microsoft.com/keys/microsoft.asc" | sudo tee /etc/yum.repos.d/vscode.repo > /dev/null
rpm-ostree install code
echo -e "[code]\nname=Visual Studio Code\nbaseurl=https://packages.microsoft.com/yumrepos/vscode\nenabled=1\ngpgcheck=1\ngpgkey=https://packages.microsoft.com/keys/microsoft.asc" | sudo tee /etc/yum.repos.d/vscode.repo > /dev/null
rpm-ostree install code
reboot the machine, uninstall the flatpak of vscode and it works the same way as Windows Disadvantage your updates are slower. The other way you can do it is work in a devcontainer or a distrobox. One per project
Vi-
Vi-OP•2w ago
Thanks That honestly sounds like a nightmare
wolfyreload
wolfyreload•2w ago
Are you just doing .net dev or are you using node.js for the front end side of your dev?
Vi-
Vi-OP•2w ago
Does Angular use node?
wolfyreload
wolfyreload•2w ago
yup angular is using node
Vi-
Vi-OP•2w ago
Then yes
wolfyreload
wolfyreload•2w ago
have a look at nvm https://github.com/nvm-sh/nvm it makes switching to different versions of node very easy
Vi-
Vi-OP•2w ago
I have some 40 hours remaining to produce a full stack demo application for a job application
wolfyreload
wolfyreload•2w ago
Good luck! 🙂 Hope your demo goes well
Vi-
Vi-OP•2w ago
Thanks It's a pretty simple program but My development experience is very non-mainstream
wolfyreload
wolfyreload•2w ago
My dev stack is Angular and .net, so shout if you get stuck anywhere else in the setup
Vi-
Vi-OP•2w ago
As in, My last boss thought dynamically creating HTML elements would be impossible Thank you very much If I get the job I'll make 110,000 a year and move My partner over from the USA to not be put in a concentration camp by Trump's government. 🤞
asen23
asen23•2w ago
btw its better to do dev in distrobox, just sayin i do my azure function from distrobox saves headache from remote debugging
wolfyreload
wolfyreload•2w ago
Yeah Distrobox seems easier than DevContrainers. Well so far at least. I like the idea of devcontainers though
asen23
asen23•2w ago
devcontainer is fine for non-ui dev, but kinda pains if you do gui
Vi-
Vi-OP•2w ago
Can nvm do everything npm can? I'm having some trouble with npm. I installed Node with Flathub but apparently the flathub version doesn't come with npm Or it's just not added it to the path
wolfyreload
wolfyreload•2w ago
Yup you can just switch to whatever version of node.js you want that have npm installed with it
Vi-
Vi-OP•2w ago
Oh thank the gods! I've been struggling to get this working for the past hour, thanks
wolfyreload
wolfyreload•2w ago
I usually use the latest lts version
nvm install --lts
nvm install --lts
Install angular
npm i -g @angular/cli
npm i -g @angular/cli
And you good
Vi-
Vi-OP•2w ago
Taking you up on that offer. I have My component calling a service that makes an HTTP request to a server, and I'm using .then() to update a component class member variable, like so:
export class CarsTableComponent {
carsService: CarsService = inject(CarsService);
carsList: Car[] = [];
make: string = "";

constructor() {
this.carsService.getCarsList(this.make).then((carsList: Car[]) => {
this.carsList = carsList;
});
}

}
export class CarsTableComponent {
carsService: CarsService = inject(CarsService);
carsList: Car[] = [];
make: string = "";

constructor() {
this.carsService.getCarsList(this.make).then((carsList: Car[]) => {
this.carsList = carsList;
});
}

}
Apparently, any change in the .then() doesn't propagate back to the page. If I console.log carsList in the .then(), then it outputs correctly. But Angular doesn't seem to have realised carsList has been updated. It works perfectly when I exit the process and then ng serve, but if I just refresh the page, it doesn't work.
wolfyreload
wolfyreload•2w ago
It's probably related to the life cycle of the components of the page. Since you only getting the data in the constructor of the CarsTableComponent, unless the component is destroyed and recreated it won't get updated.
Vi-
Vi-OP•2w ago
I found something weird Context: My cars database is all fictional cars. The first one is the Batmobile. I just tried inserting a Beetle, a real car, as a test value Then I ran:
const firstCar = this.carsList[0];
this.carsList.push(firstCar);
console.log(this.carsList);
const firstCar = this.carsList[0];
this.carsList.push(firstCar);
console.log(this.carsList);
Console.log reports that the newly added car is the Batmobile, and that there is only one entry for the Beetle But on the page, there are two elements created for the Beetle and nothing else So the same two lines of code are having a different effect in Javascript vs in Angular's ngFor I think Javascript can see the contents of carsList, but instead of listening to Javascript, Angular is running the same code on the version of carsList it sees So therefore, i have no idea how to recreate carsList in a way Angular can see

Did you find this page helpful?