BundlerMinifier icon indicating copy to clipboard operation
BundlerMinifier copied to clipboard

Visual Studio 2022 Support

Open scottkuhl opened this issue 3 years ago • 35 comments

Installed product versions

  • Visual Studio: 2022 All Versions

Description

Make the extension available in Visual Studio 2022.

Steps to recreate

  1. Download the extension installer.
  2. Run the installer.

Current behavior

Message that it is already installed to all applicable products appears even though it is not installed in Visual Studio 2022. It is also not listed in Online Extensions in Manage Extensions Visual Studio 2022.

Expected behavior

Installs and works in Visual Studio 2022.

Note: Sorry for the all the extra details. I probably could have stopped with the title on this one.

scottkuhl avatar Jun 17 '21 20:06 scottkuhl

There's a definitive statement from the author here https://youtu.be/D3R3TlTPCt8?t=3793 - in short, there's not going to be any development for VS 2022, or any further development at all as far as I can tell.

silentdiverchris avatar Jul 05 '21 03:07 silentdiverchris

If anyone knows an alternative, purely for the bundling and minifying part, that would be great!

KoalaBear84 avatar Jul 05 '21 15:07 KoalaBear84

That's a huge blow. We have a lot of projects that rely on it. I wonder if Libman will go the same route. We just stop relying on the MVC bundling and minification because the organization has flagged WebGrease as an issue since it's not maintained anymore and MVC relies on it. We switched to these tools instead.

I'm seeing comments from a lot of authors that may not be updating their extensions. We could be seeing the start of a major problem with VS 2022.

scottkuhl avatar Jul 05 '21 15:07 scottkuhl

Yesterday I spent the afternoon setting up and experimenting with parcel-bundler v2, my initial fairly urgent need is to just get something to do what BundlerMinifier used to, even if just in the short-term so I can make a simple layout change (and the next simple layout change) without handcrafting 4 .min.css files or doing a laborious manual build of dozens of little _xxxxx.scss files imported in differing combinations into 4 main .min.css files, which BundlerMinifier did so well.

After that, looking for something more long-term that will still work with VS 2022.

I've tried extracting the /www/css structure and playing with parcelling it but while parcel is doing the job with small pieces of the real main.scss files, I am running into problems with it resolving paths. I'm not letting parcel get at the live files yet, which causes some problems with relative paths which I've resolved by extracting a wider set of the live files but some paths are slash-prefixed absolutes, and yep, that could change but I'd rather not alter the scss at all, this is a working system that I don't want to start making unwork.

I have raised a Stack Overflow issue here about not resolving paths, there doesn't seem to be any kind of --dontresolvepaths option at present.

It's not ideal, I'd rather not add hundreds of little .js dependencies to my build process, even if part of a respectable set of libraries so am still looking elsewhere.

If I get something working I'll post again here.

I wonder if Mads can be persuaded just to fix the extension as-is or at least add some diagnostics, does anyone know him to give him a nudge ? :)

silentdiverchris avatar Jul 06 '21 05:07 silentdiverchris

/cc @timheuer @sayedihashimi

madskristensen avatar Jul 06 '21 14:07 madskristensen

Is anyone planning on picking up this repo since @madskristensen has indicated he does not wish to maintain anymore.

What are the well-supported options for generating pre-compiled CSS/JS bundles in VS Code without a separate task runner? WebPack? Anything else?

Their LigerShark project is NOT an option as it appears to be runtime generated only, which is not nearly as fast and causes issues when you need to distribute files across a CDN.

eat-sleep-code avatar Jul 07 '21 17:07 eat-sleep-code

@eat-sleep-code -- we'd love to start seeing more up-voting of this need in the Visual Studio Developer Community to help prioritize the productization of things like this. @sayedhashimi I think we have some DevComm items here, but if not, maybe we should go ahead and create them at least and encourage upvoting/commentary there to help our planning.

timheuer avatar Jul 07 '21 19:07 timheuer

As I've heard the main reason of not supporting this for VS2022 was because of the tool windows. Does this mean 'context menus', or really the small 'tool windows'? What especially is the hard part, or why?

Curious because there is nothing written on the support page: https://docs.microsoft.com/en-us/visualstudio/extensibility/migration/update-visual-studio-extension?view=vs-2022 https://docs.microsoft.com/en-us/visualstudio/extensibility/migration/breaking-api-list?view=vs-2022

For me personally it's just about the bare minimum is what we use, purely the bundling and minifying based on the bundleconfig.json.

KoalaBear84 avatar Jul 07 '21 19:07 KoalaBear84

If I get something working I'll post again here.

Just to follow this up, albeit with a dead-end, I managed to get BundlerMinifer working again so abandoned my investigations into Parcel-Bundler, but I still need to find a solution for VS2022 and beyond.

silentdiverchris avatar Jul 14 '21 04:07 silentdiverchris

@eat-sleep-code -- we'd love to start seeing more up-voting of this need in the Visual Studio Developer Community to help prioritize the productization of things like this. @Sayedhashimi I think we have some DevComm items here, but if not, maybe we should go ahead and create them at least and encourage upvoting/commentary there to help our planning.

Bundler & Minifier, Microsoft Library Manager, and Web Compiler are so critical to the web development experience I was always surprised it was not baked into Visual Studio. I guess now we are seeing the reliance on Mads' extensions and it should be picked up by the Visual Studio team. These should also be included in Visual Studio for Mac.

scottkuhl avatar Jul 15 '21 22:07 scottkuhl

@scottkuhl libman is in the product, are you referring to something different? +1 on the others...

timheuer avatar Jul 15 '21 22:07 timheuer

@timheuer No, sorry. Microsoft Library Manager showed up as an extension in older versions, I did not realize it was included in 2022 already.

scottkuhl avatar Jul 15 '21 22:07 scottkuhl

There's a definitive statement from the author here https://youtu.be/D3R3TlTPCt8?t=3793 - in short, there's not going to be any development for VS 2022, or any further development at all as far as I can tell.

Big issue this announcement. Why Visual Studio doesn't embed this features? PLz @madskristensen give us a bit more information about this decision.

xrkolovos avatar Jul 17 '21 14:07 xrkolovos

I am maintaining a simplified fork of this library and have set it to make releases automatically with Nuglify nuget releases.

https://github.com/rwasef1830/BundlerMinifier

I removed the visual studio extension part and made it a dotnet tool only.

rwasef1830 avatar Aug 04 '21 21:08 rwasef1830

My org relied on this. Well, seems like we'll have to find an alternative solution and update the way we deal with minification of JS.

MaximPak avatar Aug 11 '21 20:08 MaximPak

TBH I've never really understood why this isn't built into Visual Studio's standard tooling. It seems like a very common requirement.

LaughingJohn avatar Aug 13 '21 10:08 LaughingJohn

Hey all, I upgraded Bundler & Minifier and WebCompiler to work in Visual Studio 2022

https://github.com/failwyn/BundlerMinifier https://github.com/failwyn/WebCompiler

https://marketplace.visualstudio.com/items?itemName=Failwyn.BundlerMinifier64 https://marketplace.visualstudio.com/items?itemName=Failwyn.WebCompiler64

@madskristensen If I missed changing anything in the Licenses, vsixmanifest, or AssemblyInfo just let me know and I'll take care of it; thanks again for everything you contribute to the community!

Hope it works for everyone!

failwyn avatar Aug 13 '21 16:08 failwyn

@failwyn thank you so much for this. You are a true open source hero!!

madskristensen avatar Aug 13 '21 16:08 madskristensen

Thank you @failwyn for upgrading these tools! @madskristensen Did you have any technical issues or concerns that you can share (besides the obvious time commitment required) that made you not want to continue to develop/support these extensions in VS 2022?

gpshonik avatar Aug 13 '21 17:08 gpshonik

@gpshonik no technical concerns or issues wen't into the decisions. I made the decision not to continue these projects for a few reasons:

  • I'm not using these tools myself anymore
  • I wrote LigerShark Web Optimizer long ago which is a far better solution IMHO
  • Something as important as compiling and bundling/minifying need better official support in VS - these extensions kept that from happening

madskristensen avatar Aug 13 '21 17:08 madskristensen

@madskristensen I think you're right. It is better to migrate from these tools.

mirshahreza avatar Aug 17 '21 04:08 mirshahreza

Migrate to what? I have spent many hours going through google looking for the best bundle and minify options for a new asp.net core 5.0 project and it's really depressing. There are no clear answers. Does anyone have an alternative? The official docs say use ligershark web optimizer but even that seems a little out of date.

Firegarden avatar Sep 03 '21 02:09 Firegarden

Yes, I test and review the ligershark web optimizer but it does not suitable :(

mirshahreza avatar Sep 03 '21 16:09 mirshahreza

@Firegarden @mirshahreza

If you're still interested in this extension, I forked and upgraded it with Mads' permission, see my comment above for links and details.

failwyn avatar Sep 03 '21 17:09 failwyn

Hey this is great thank you! I will try it out.

Firegarden avatar Sep 03 '21 19:09 Firegarden

Great, I am going to try

mirshahreza avatar Sep 06 '21 11:09 mirshahreza

@failwyn Is there a compiled version?

mirshahreza avatar Sep 06 '21 12:09 mirshahreza

@failwyn Is there a compiled version?

If you search for Jason Moore in Visual Studio in the Extension Gallery, both extensions will come up; there’s also links to the Visual Studio Marketplace a few posts up if you want to download the vsix file.

failwyn avatar Sep 06 '21 19:09 failwyn

Thank u @failwyn

mirshahreza avatar Sep 06 '21 20:09 mirshahreza

@failwyn Is there a compiled version?

If you search for Jason Moore in Visual Studio in the Extension Gallery, both extensions will come up; there’s also links to the Visual Studio Marketplace a few posts up if you want to download the vsix file.

@failwyn, did you also fix the issues with the latest ES updates? Constructs such as for..of, ?? and others didn't work with Mad's extension.

davidthegray avatar Oct 02 '21 08:10 davidthegray