News Articles visual-studio

Visual Code css intellisense weird interaction

On a ReactJS project, if I choose the style Jsx Attribute for inline CSS, . Then CSS intellisense won’t work or work only after I add some fields manually. But if I type the style attribute manually without clicking on the jsx attribute that VSCODE suggested, it would work normally. Source: CSS – Stack Overflow

Visual Studio bundler causes JS Uncaught ReferenceError: Cannot access variable before initialization error. Anyone know how I can fix this?

I’ve got an AJAX request as follows: $.ajax({ method: ‘GET’, url: ‘/api/some-data’, headers: { ‘Content-Type’: ‘application/json’ }, success: function(data) { if (data != null) { var userData = data; for (var key of Object.keys(userData)) { if (userData[key].BalanceYear == null) { var accYear = "Today"; } else { var accYear = userData[key].BalanceYear; } // ETC, ETC, […]

inconsistant of Navbar render?

I am writing a website with React, and using the reactstrap library for some reasons, I create two React projects by visual studio 2022 templates, for the first one, I used Standalone JavaScript React Template , for the second one, I used ASP.NET Core with React.js , and in both project, I write the code […]

Why do I get this error in my localHost: Cannot get?

I am trying to make a register system but I cannot get it to work. Whenever I try to run it in LocalHost I get the error "Cannot get" and I also need it to save the data in a JSON file. I hope you can help me. 🙂 Thank you in advance! My server […]

How to include JavaScript sources in startup.cs of AspNetCore?

Is there an easy way to reference JS sources from a JS project that has "JSProj/src/main.js" , "JSProj/package.json" to run at "AspNetCoreProj/startup.cs"? So that when the asp is run, my controller from "AspNetCoreProj/Controllers/MyController.cs" binds to (launchSettings.json) "applicationUrl": "http://localhost:44709", "sslPort": 46367 AND the front-end JS App is run at, let’s say, http://localhost:8080 at the same time? […]

How to increase the IntelliSense analysis size of big CSS files?

I have a big CSS file(3.5MB) that VS 2022 doesn’t seem to pick up and provide classes suggestions. Is there any way to increase the analysis limits of IntelliSense and provide code completions? Source: CSS – Stack Overflow

Is there a way to fix this issue in visual studio code?

after the final update of the visual studio code and I have a problem with writing on the program. I have completely deleted the program, then downloaded it but the problem is the same. so please, if anyone knows how to solve this issue you can tell me. and here is the link to the […]

vs code for Vue js always get error can’t found module

i have tag in my Vue js like this import mixinDevice from "@/mixins/device.js" import BannerUseCase from "./app/usecase/banner.js" import DefaultBannerMobile from "@/assets/default-banner-sm.svg" and then always get error like this Cannot find module ‘@/assets/default-banner-sm.svg’ or its corresponding type declarations., the file which use alias @ always got that error , thought i already config on my ViteJS […]

WebView2: How to enable Password Autofill?

How can I change the "IsPasswordAutofillEnabled" Property to be "TRUE" on WebView2? I’ve read the Microsoft page countless of times but can’t actually figure out how to do it in Visual Studio. Source: JavaSript – Stack Overflow

Where is the error "Unable to cast object of type ‘System.Int32’ to type ‘System.String’." coming from?

Here is the code where I think it is coming from but I can’t find exactly where. I have deleted strings and changed around the integers, strings, etc. When I try to input values into the text boxes, it throws this error. Let me know if I am missing information. using System; using System.Collections.Generic; using […]

Using create-react-app for simple react app but vulnerabilities causing glitches

When I try to use npx create-react-app on Visual Studio, the app is created with multiple vulnerabilities, and tends to glitch when I try to install additional dependencies that are required. I need to also install packages such as ‘Styled-Components’ and ‘React-Router’ and when this happens, it seems to conflict with the packages that were […]

HTML5 Fieldset tag removing the border in BLAZOR project

I have the following code in a test page test.html and the border displays as expected. But the border doesn’t show up in a BLAZOR project created with a default template in Visual Studio 2022. I believe some CSS in the project removing it. Any idea how to get back the border? <html> <body> <form […]

VS code going Nuts [closed]

VS Code doesn’t type right. Why does this happen? How can I fix it? VS Code is driving me crazy! Take look at this video – VS code going nuts Source: JavaSript – Stack Overflow

debugger automaticly disconnect

After I updated visual studio when I’m trying to debug my javascript code but debugger gets disconnected automatically. I added a console.log("……") statement to the snippet: The console.log statement is displayed properly. Source: JavaSript – Stack Overflow

Prevent objects keys auto indentation in Visual Studio Code?

When I alt+shift F to fix my JS code in Visual Studio Code, it indents keys within objects, so instead of: let test = { rob: 1, bob: 2, kob: 3, } it fixes it like so: let test = { rob: 1, bob: 2, kob: 3, } Would appreciate help how to disable it […]

VS code stopped recognizing my classes and idk why

I’m a begginer dev and i have a class assignment which is making a wordpress site using child theme customization (php/css/js). Here is the issue : for some reason i ignore, VS code is not recognizing the classes I use and that were working just fine before. Here is the issue, you can tell some […]

crbug/1173575, non-JS module files deprecated

I was writing up some basic HTML code and some CSS too. I ran the CSS by mistake rather than running the HTML file and suddenly I got the error showing localhost:8080 and the debug console started showing me this too. crbug/1173575, non-JS module files deprecated. Source: CSS – Stack Overflow

How to make visual studio 2022 look like vs code for React JS Development

I just installed Visual Studio 2022 today to try it for React JS since I saw they made some changes to support React JS better but I was very disappointed Everything seemed very bad and ugly from the code coloring to shortcuts and even auto-completion I managed to fix the shortcuts by adding the vs […]

Sitemap | Terms | Privacy | Cookies | Advertising

Senior Software Developer

Creator of @LzoMedia I am a backend software developer based in London who likes beautiful code and has an adherence to standards & love's open-source.