Visual Studio Code build commands disappeared


#1

For last four months I ws able to create and build several HTML5 projects using Visual Studio Code. For each new project I simply made a new folder, copied and editing the project.xml file, created the folders for the assets and source files and made those files. Then I would invoke the Run Build Task command, choose Build and the project would be built. The last time I did that was three weeks ago.

Today I did what I’ve always done for a new project but this time when I invoked the Run Build Task command, I got this:

No%20Build%201No%20Build%202No%20Build%203

I tried the MSBuild template but that gave me build errors that didn’t make any sense to me. I tried opening older projects and build them and each case I got the “No build task” error.

Since it seemed to want a tasks.json file I looked for that and I found a hidden folder named “.vscode” with it and a file called launch.jason. There was several such folders, one in the directory that had all my project folders and in some but not all of the project folders. They are:

No%20Build%204

So I copied that into my new projects folder and then when I tried to build I got this after the “No build task error”:
No%20Build%206

It opened the file shown above but still when I tried to build I got the “No build task” error.

I have no clue what’s causing this or how to fix it.


#2

Have you tried the Lime extension? It auto-generates tasks for you if you’re in a directory with a Lime project file (project.xml).

https://marketplace.visualstudio.com/items?itemName=openfl.lime-vscode-extension


#3

I believe that I had it when I started using VSC for macOS. I tried removing and reinstalling it and I noticed it was responsible for Lime option in the bottom bar. Clicking on it gave me this:
No%20Build%207

I have no idea what does command-line tools are, let alone how to enter them.

If this extension gave me the build commands, why did they disappear?

I noticed that there was an update to 1.2.0 that was after my last successful build. I’m wondering if that caused the problem. I downloaded version 1.0.8 but have no idea how to install it. The instructions just confuse me.

It says to disable auto-updates with a reason “This will prevent an auto-update mechanism that will install a release version of vshaxe and lime-vscode-extension, breaking the development version.” Development version of what?

Don’t understand any of this:

Install and build this extension

In the “extensions” directory:

git clone --recursive https://github.com/openfl/lime-vscode-extension

Build the extension

If you do not want to debug the extension, you should build it at least once:

cd lime-vscode-extension
haxe build.hxml

What “extensions” directory? On my drive? There’s an extensions area in Preferences:Settings, Is that it?

If I installed it using VSC what’s the “Build the extension” for?


#4

I have no idea what does command-line tools are, let alone how to enter them.

The lime command should be available in the console. If it’s not, try running haxelib run lime setup.

If I installed it using VSC what’s the “Build the extension” for?

The instructions are just for installing the extension from source and aren’t needed when installing it from the marketplace as usual.

It says to disable auto-updates […]

Same here, this is also under the “Using Development Builds” section that doesn’t matter to you when using a marketplace version.


#5

The update of lime extension to 1.2.0 is the problem. Since the VSC extensions folder is invisible it took me awhile to search my Time Machine backups for older versions. After turning the extensions autoupdate off, I tried versions 1.0.8 and 1.1.0 and the build command was restored and worked for both of those.


#6

Hm, I can’t really think of anything in 1.2.0 that would break this / it’s working fine on my end… Is your Haxe extension up to date? Lime 1.2.0 requires at least 1.11.0 or newer, otherwise the extension would fail to activate.


#7

How do I find out what version of Haxe I have? VSC shows me openfl (7.0.0), lime (6.0.1) and std (3.4.4).


#8

Just updated to openfl (7.1.2), lime (6.2.0) and Haxe std (3.4.7). Updated lime extension to 1.2.0 and again build command disappeared. Reinstalled lime extension 1.1.0 and everything is back to normal.


#9

“std” (standard library) is your Haxe version, but that’s not what I meant - I was talking about the Haxe VSCode extension, which the Lime extension depends on:

https://marketplace.visualstudio.com/items?itemName=nadako.vshaxe

You should see it in your extension menu:


#10

What a bloody mess!!!

Nowhere in the description of the Lime extension does it say Haxe 1.11 is needed.

Doing a Marketplace search for Haxe inside VSC shows latest version is 1.9.3. Go to the web based Marketplace and see 1.11.0 so download that and try to install that. Doesn’t work. Installed it manually into the extensions folder and VSC still shows 1.9.3. Do a Check for Updates from the app menu bar and find nothing.

Had a hunch and check VSC website and see there’s a newer version. Never got an alert that there’s a newer version!!! Updated to new version and now Marketplace search in app shows Haxe 1.11.0. Nowhere in description of Haxe extensions does it say it needs a certain version of VSC.

Update to Lime 1.12.0 and now that works.

HOURS AND HOURS WASTED because of no real update mechanism for VSC and lack of pertinent info in descriptions of extensions.


#11

Calm down. :slight_smile: There shouldn’t really be any need for extensions to specify what version of VSCode or other extensions they require in the readme, as the user shouldn’t have to care about that. It’s specified in the package.json for VSCode.

It sounds like your Lime extension was able to auto-update to 1.2.0 because it only required vscode 1.14.0, but the Haxe extension stayed at the last version that supports vscode 1.9.3 - which is of course too old for Lime extension version 1.2.0. I think this situation can be improved simply by requiring the same VSCode version for the Lime extension as for the Haxe extension:

Keep an eye on the cog in the lower left corner, you get an indication there when a new VSCode version is available (which is fairly often due to monthly releases + patches).


#12

New version is up on the Visual Studio Code Marketplace. I am sorry for the trouble, but I am glad we have this resolved! :success:

Please try updating one more time


#13

Just bumped into the same problem today. Updating of extensions helped me. Thanks for your work!