How fix package.json in vs code extension pack - visual-studio-code

I created an extension pack named Kholiqiyon Pack. Published it on the vscode marketplace. Now I would like to add more to the extension and update it. I added new entries in package.json and the question is now how how to run package.json and save it. I need your helps.

Related

VSC check in project relevant extensions to a version control system

I created a project (in my case flutter) with Visual Studio Code. Therefore I installed some extensions. It is planned to upload the project to gitlab.
My problem relates to the extension: Is it possible to store all extensions used in the git repo as well so other developers don't have to install them all manually?
My first thought was about to reference these extension in the .vscode folder somehow, but I haven't found information on how this could work.
Put all the required extensions to the Workspace Recommendation:
Go to the extension bar: Ctrl+Shift+X
Select an extension
use context menu (right click) and select: Add to Workspace Recommendation
don't put the big extensions to the repo, you need to update these big files for each update and that will bloat the repo to an enormous size.

VSCode extension that packages .d.ts file

I've created a new .d.ts file which will enable autocomplete whenever a particular global object is used in the code.
How do I package this .d.ts file as part of an extension, so that, anyone can install this extension and use the autocomplete/intellisense ?

VSCode: Attempted to update project that is not loaded

I am using VSC for Unity v2019.4. I have the package from package manager installed. Also I have installed dotnet. The thing is that when I open VSC (through Unity) it shows in the output:
Attempted to update project that is not loaded: C:\workspaces\Unity\MyGame\Assembly-CSharp.csproj.
am able to use the editor, but the Intellisense is not working. I also have tried to change the omnisharp version to latest and it is still not working.
You can try a few things in order to make Visual Studio Code works properly with Unity.
First of all make sure that the editor package is installed in your project via Package Manager. Latest version should be installed.
Just to be sure it's better to close the project, delete Library folder and all .csproj and .sln files.
Then you can open your project in Unity again, wait it to load and try to remember to open scripts not by double clicking, but instead use right click in Project window and select Open C# Project. This will load the scripts without any issues.
In case anyone is still having this problem, try to install .net framework 4.7.1
Try uninstalling then reinstalling vs code and dotnet latest version. Also make sure vs code is installed in a folder with permissions to edit. If not it will not save any files until you run as admin

How to fix vsce not packaging code changes into .vsix file

I'm developing an extension in vscode, and using vsce to package it into a .vsix file.
I noticed a typo in my description in my extension's package.json, noticeable when the extension is installed and loaded in the extension tab. So I fixed it and re-ran vsce package in ~/extension_name/client/ and re-installed the extension, but the typo remains.
I've double checked I'm not installing the wrong .vsix file. I've ran npm install in ~/extension_name/client/. I've even committed my changes to a branch in git, downloaded that branch and packaged it, no luck.
Do I need to run another command to get vsce to realise there are changes to include? How can I determine what version of the code vsce is packaging up?
I've had the same issue in the past, where I repackaged an extension with the same version and it didn't get installed properly.
VSCode installs extensions to ~/.vscode/extensions, so you can inspect the code in your extension's directory there. I think VSCode is just failing to overwrite the existing extension there, so try deleting the extension within that folder and then installing the .vsix again.
To see the contents of the .vsix file, you can change the file extension to .zip. (See https://blogs.msdn.microsoft.com/quanto/2009/05/26/what-is-a-vsix/)
For VSCode extensions, there should be an 'extension' folder inside it which has all of your code.

How to manage nuget packages without opening solution

I am unable to load my solution ever since I upgraded my nugget packages to the latest Xamarin.Forms alpha.
Can someone provide me an example of how I can point all nuget packages of a certain id to an earlier version without having my solution open?
I think the best way is to open the packages.config file in a text editor and remove the Xamarin.Forms values from it.
After that you can open your .csproj file (with a text editor) and also remove the references from it.
Now you should be able to open the project (with the visual studio) and add the references you want again via the nuget manager.