madskristensen/webcompiler

A Visual Studio extension that compiles LESS, Sass Stylus, JSX, ES6 and CoffeeScript

Download the extension at the

Web Compiler

A Visual Studio extension that compiles LESS, Sass Stylus, JSX, ES6 and CoffeeScript files.

Download the extension at the VS Gallery or get the nightly build

See the changelog for changes and roadmap.

Features

  • Compilation of LESS, Scss, Stylus, JSX, ES6 and (Iced)CoffeeScript files
  • Saving a source file triggers re-compilation automatically
  • Specify compiler options for each individual file
  • Error List integration
  • MSBuild support for CI scenarios
  • Minify the compiled output
  • Minification options for each language is customizable
  • Shows a watermark when opening a generated file
  • Shortcut to compile all specified files in solution
  • Task Runner Explorer integration
  • Command line interface
  • Integrates with Web Analyzer

Getting started

Right-click any .less, .scss, .styl, .jsx, .es6 or .coffee file in Solution Explorer to setup compilation.

A file called compilerconfig.json is created in the root of the project. This file lets you modify the behavior of the compiler.

Right-clicking the compilerconfig.json file lets you easily run all the configured compilers.

Compile on save

Any time a .less, .scss, .styl, .jsx, .es6 or .coffee file is modified within Visual Studio, the compiler runs automatically to produce the compiled output file.

The same is true when saving the compilerconfig.json file where all configured files will be compiled.

Compile on build / CI support

In ASP.NET MVC and WebForms projects you can enable compilation as part of the build step. Simply right-click the compilerconfig.json file to enable it.

Clicking the menu item will prompt you with information about what will happen if you click the OK button.

A NuGet package will be installed into the packages folder without adding any files to the project itself. The NuGet package contains an MSBuild task that will run the exact same compilers on the compilerconfig.json file in the root of the project.

Compile all

You can run the compiler on all compilerconfig.json files in the solution by using the keyboard shortcut Shift+Alt+Y or by using the button on the top level Build menu.

Task Runner Explorer

Get a quick overview of the files you've specified or execute a compilation directly in Task Runner Explorer.

You can even set bindings so that compilation happens automatically during certain Visual Studio events, such as BeforeBuild and Project Open.

Error list

When a compiler error occurs, the error list in Visual Studio will show the error and its exact location in the source file.

Source maps

Source maps are supported for .scss files only for now, but the plan is to have source map support for all languages. Web Compiler differs from it's predecesor, Web Essentials, in that it inlines a base64 encoded version of the map in the generated .css file rather than producing a separate .map file.

compilerconfig.json

The extension adds a compilerconfig.json file at the root of the project which is used to configure all compilation.

Here's an example of what that file looks like:

Default values for compilerconfig.json can be found in the compilerconfig.json.defaults file in the same location.

Issues

Quick list of the latest Issues we found

Konntroll

Konntroll

Icon For Comments0

Installed product versions

  • Visual Studio: 2019
  • This extension: 1.12.394

Description

Recently, compiling SASS files started introducing unnecessary / unwanted changes to previously generated files. These changes include the following:

becomes

in every rule block of every re-compiled CSS file.

Furthermore:

  • @charset "UTF-8"; is added at the top of the re-compiled CSS files,]
  • Leading 0s in decimal values are dropped, i.e. 0.5em becomes .5em
  • "" get replaced with ''
  • Character codes like "\f144" are replaced with "".

This introduces extensive yet largely meaningless changes that cause conflicts, look confusing on PRs and, in the latter case, could introduce issues.

Steps to recreate

  1. Compile SASS
  2. Observe the differences in generated CSS files

Current behavior

Compiled CSS files display unnecessary changes.

Expected behavior

Compiled CSS files only display deliberately introduced changes.

mushu999

mushu999

Icon For Comments0

Installed product versions

  • Visual Studio 2017
  • Visual Studio 2019

Description

3/18/2022 12:17:18 PM - Searching for applicable products... 3/18/2022 12:17:18 PM - Found installed product - Global Location 3/18/2022 12:17:18 PM - Found installed product - ssms 3/18/2022 12:17:18 PM - Found installed product - Visual Studio Professional 2017 3/18/2022 12:17:18 PM - Found installed product - Visual Studio Professional 2019 3/18/2022 12:17:18 PM - VSIXInstaller.NoApplicableSKUsException: This extension is not installable on any currently installed products.

Steps to recreate

Download and install version 1.2 from here.

Current behavior

Launch installer from here and it dies with error message.

Expected behavior

It should install latest version of web compiler into visual studio environments.

mwi812

mwi812

Icon For Comments0

Installed product versions

  • Visual Studio: Compile on build / CI support
  • This extension: 1.12.405

Description

Issue with JS compiling on Safari. Tests on Safari MacBook (v 14.0.1) / Safari iPhone (v. 12.5.5).

Steps to recreate ### Current behavior

Safari has some issues with the compiled Code from Vanilla JS. When a function call another function inside, safari can't handle the compiled JS code. (most, there is no log in the Safari console). In contrast to, if the whole code is handled by one function, Safari can handle the compiled code also. We noticed that there are also issue related XHRrequests with Fromdata.

BootprojectStore

BootprojectStore

Icon For Comments3

Installed product versions

  • Windows 11
  • Visual Studio 2022 Professional
  • Web Compiler 2022

Description

Minification fails .icon:before { content: ""; }

Steps to recreate

  1. Create a new web project in VS 2022
  2. Add a test.scss file
  3. Write in scss file: .icon:before { content: "\ea02"; }

Current behavior

The unminified .css file is correct.

The minified css file produces .icon:before{ content:""; }

Expected behavior

.icon:before{content"\ea02";}

I tested the same code with several online tools like: https://www.sassmeister.com/ , to prove that my sass is correct. I also tested to minify the code provided at for eg: https://www.toptal.com/developers/cssminifier/ The result is as expected and correct.

Any idea what causes this?

fpavlic

fpavlic

Icon For Comments0

Hi, not sure if anyone else has same issue, but my VS2019 started to crash because of extension. Everything worked fine couple months ago (can't say because I haven't used extension in any project since).

VS reported Web Compiler as reason of crash, which is legit becuse there is no crash after extension is disabled. Web compile works fine, it compiles files, but I just cannot add anything new to project as VS just hangs and crashes.

image

Is there a way to investigate this futher?

Notes: Using Web Compiler to compile scss to css, compilerconfig.js has ~13 scss files. Project is not that big, but has a lot of scss files to compile.

kmuthukumar23

kmuthukumar23

Icon For Comments0

Hi

Thanks in advance.

How can I import the SCSS file from the NuGet package’s static assets folder in the application’s SCSS file? For example, I have created one blazor server application and create the abc.scss file under the ‘wwwroot/styles/’ folder. In that file, I need to import the other test.scss from NuGet package (_content/<>/scss/test.scss).

Like,

abc.scss:

@import '_content/<<library name>>/scss/test.scss';

How can I achieve this? is this possible? Please help me on this.

Thanks

I have used .net 6 preview 7 and Microsoft Visual Studio Professional 2019 Preview Version 16.11.2 Preview 1.0

djwia

djwia

Icon For Comments6

Installed product versions

  • Visual Studio: Community 2019
  • This extension: [example 1.1.21]

Description

This compiler cannot seem to compile Bootstrap SASS into css by leaving the get-function in the compiled CSS. See below:

.bg-light { --bs-bg-opacity: 1; background-color: get-function(rgba-css-var)("light", "bg") !important; }

custom.scss has the following content:

@import "../lib/bootstrap/scss/bootstrap.scss";

Please let me know why this isn't working. I'm using the latest version of VS.

Steps to recreate

  1. Install Web Compiler
  2. Install Bootstrap
  3. Create custom.scss
  4. Add full bootstrap to custom.scss
  5. Automatic compilation

Current behavior

get-function is generated inside the CSS and the CSS fails when viewing the website

I think it is leaving the get-function inside the CSS by not compiling it to an actual CSS code

Expected behavior

get-function should not be inside CSS file.

scottkuhl

scottkuhl

Icon For Comments17

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.

moisk

moisk

Icon For Comments0

Installed product versions

  • Visual Studio: VS 2017
  • This extension:Web Compiler 1.12.394

Description

Is there a way to prevent Hex values turning to HSL? e.g. background-color: #f6f8f8; to background-color: hsl(202, 15%, 97%); when compiling Less files to CSS because it is easier to interpret hex when debugging/checking rather the hsl

Julien-Marpault

Julien-Marpault

Icon For Comments0

Actualy using Web Essentials 2019, I found something that could be enhanced:

Modifying my scss style sheet in chrome dev tools, it doesn't fire scss compilation.

Sass compilation based on node.js do that, is it possible to add this ?

thanks.

John0King

John0King

Icon For Comments0

webcompiler version : 1.12.394

Does the vs markplace version is latest? how do I get the latest version for vs ? and when will the marketplace version update ?

Darkicorn

Darkicorn

Icon For Comments2

Installed product versions

Visual Studio 2017 Visual Studio 2019 Web Compiler 1.12.394

Description

Every time I update Visual Studio 2017/2019, the Web Compiler extension stops working.

Steps to recreate

  1. Update Visual Studio.

Current behavior

After an update, trying to use "Web Compiler" -> "Recompile file" in Solution Explorer gives an error of:

Severity Code Description Project File Line Suppression State Error module.js:471 throw err; ^

Error: Cannot find module 'C:\Users\Andrew\AppData\Local\Temp\WebCompiler1.12.394\node_modules\less\bin\lessc' at Function.Module._resolveFilename (module.js:469:15) at Function.Module._load (module.js:417:25) at Module.runMain (module.js:604:10) at run (bootstrap_node.js:390:7) at startup (bootstrap_node.js:150:9) at bootstrap_node.js:505:3 LHRPL E:\inetpub\wwwroot\LHRPL\LHRPL\css\LHRPL.less 0

Expected behavior

There should be no error: Web Compiler should still work.

Temporary remedy

  1. Uninstall the Web Compiler extension.
  2. Delete* the directory C:\Users\Andrew\AppData\Local\Temp\WebCompiler1.12.394
  3. Install the Web Compiler extension.

* Adjust the username as required.

Corroborating evidence

The issue is also reported on Stack Overflow:
https://stackoverflow.com/questions/62792048/less-in-web-compiler-for-visual-studio-2019-stopped-to-work

mgSDBB

mgSDBB

Icon For Comments0

Installed product versions

Azure DevOps Server dotnet version 2.2.207

Description

We use WebCompiler to transform our SCSS (SASS) files to .CSS files and BundlerMinifier to minify and group our CSS and JS files.

BundlerMinifier and WebCompiler both use a .dll NUgligy but with a different version which causes the Azure DevOps and dotnet command line build to fail with the error

Bundler & Minifier error 0: Could not load file or assembly 'NUglify, Version=1.5.14.0, Culture=neutral, PublicKeyToken=15bc7810aec21b5e'. Could not find or load a specific file. (Exception from HRESULT: 0x80131621)

Could you please upgrade the WebCompiler to use at lease the same version of NUgligy as the BundleMinifier in order to be able to have both versions running.

Note : When building using Visual Studio 2019 or the MSBUILD.EXE command line, the error is not occuring.

Expected behavior

Both BundlerMinfier and WebCompiler should use the same version of NUgligy in order to avoid conflicts.

eku1s

eku1s

Icon For Comments0

Installed product versions

  • Visual Studio: Visual Studio 2019 16.7.3
  • This extension: 1.12.405

Description

If you paste the unicode character U+201C (for example, from Windows Character Map), the compiler replaces it with a question mark symbol.

Steps to recreate

The compiler does not compile the unicode U+201C character correctly: .span:before {content: '“';)

Current behavior

Compiles to: .span:before {content: '�';}

Expected behavior

Compile with character intact.

ttaylor29

ttaylor29

Icon For Comments0

Installed product versions

  • Visual Studio: VS 2019
  • This extension: 1.12.394

Description

We use web compiler in our project and I'm setting up my new computer. I am running into this error after I installed web compiler from the extenstion tab of VS

Severity Code Description Project File Line Suppression State Error Error: [object Object] is not a PostCSS plugin at Processor.normalize (C:\Users\username\AppData\Local\Temp\WebCompiler1.12.394\node_modules\postcss\lib\processor.js:168:15) at new Processor (C:\Users\username\AppData\Local\Temp\WebCompiler1.12.394\node_modules\postcss\lib\processor.js:52:25) at postcss (C:\Users\username\AppData\Local\Temp\WebCompiler1.12.394\node_modules\postcss\lib\postcss.js:55:10) at rc.then.config (C:\Users\username\AppData\Local\Temp\WebCompiler1.12.394\node_modules\postcss-cli\index.js:209:14) at process._tickCallback (internal/process/next_tick.js:109:7) MyProject.MVC C:\Users\username\source\repos\git\mysolution\myproject\Content\styles\areas\import\import.scss 0

I can't seem to figure it out. Other co-workers appear to not have the issue. I've tried to install on older version we have used in the past, but removing it and re-adding it isn't fixing it.

hnpvqve

hnpvqve

Icon For Comments0

Installed product versions

  • Microsoft Visual Studio Community 2019
  • This extension: WebCompiler 1.12.394

Description

this error close soft pop up"There is an error in the compilerconfig.json file .This could be due to a change in format after this extension was updated. "Dialog

Steps to recreate

[ { "outputFile": "app.css", "inputFile": "app.less" } ]

hnpvqve

hnpvqve

Icon For Comments0

Activity Monitor Log

infos | 106 warnings | 0 errors | 4

1 |   | Microsoft Visual Studio 2019 version: 16.0.30411.121 |   |   | VisualStudio | 2020/08/29 03:25:54.458 2 |   | Log ID | {2877B590-EC8B-401D-BAFD-B66E8E029E3E} |   | VisualStudio | 2020/08/29 03:25:54.458 3 |   | Running in isolation mode. |   |   | VisualStudio | 2020/08/29 03:25:54.458 4 |   | Looking for master PkgDef file          C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\Common7\IDE\master.pkgdef |   |   | VisualStudio | 2020/08/29 03:25:54.473 5 |   | Creating PkgDefCacheNonVolatile |   |   | VisualStudio | 2020/08/29 03:25:54.473 6 |   | PkgDefCache flags |   | 00013801 | VisualStudio | 2020/08/29 03:25:54.473 7 |   | Double-checking master pkgdef file |   |   | VisualStudio | 2020/08/29 03:25:54.473 8 |   | PkgDefManagement initialized |   |   | VisualStudio | 2020/08/29 03:25:54.473 9 |   | RootFolder          C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\ |   |   | VisualStudio | 2020/08/29 03:25:54.473 10 |   | ShellFolder          C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\ |   |   | VisualStudio | 2020/08/29 03:25:54.473 551 |   | End package load [Microsoft.VisualStudio.Shell.Connected.AccountManagerService.AccountManagerPackage] | {9C987E78-F0BF-45CA-9BA5-96D3E4B2BAC6} |   | VisualStudio | 2020/08/29 03:26:11.785 552 |   | Entering AddItem. Persistence data for item: E:\cqwsc\Shop.less|00000000-0000-0000-0000-000000000000|0,0 |   |   | MruList | 2020/08/29 03:26:12.759 553 |   | Entering TryPromoteItem |   |   | MruList | 2020/08/29 03:26:12.759 554 |   | Entering PromoteItemAt and found the index of the item to be 0 |   |   | MruList | 2020/08/29 03:26:12.760 555 |   | Parsing compatibiliy list file for VS assemblies that should not be in GAC - C:\Users\hnpvq\AppData\Local\Microsoft\VisualStudio\16.0_4d19306a\Extensions\CompatibilityList.xml |   |   | VSPackage | 2020/08/29 03:26:13.333 556 |   | Automatically checking for an update is disabled |   |   | VSPackage | 2020/08/29 03:26:13.334 557 |   | IncompatibilityList - Call Servicehub for downloading compatibility list file. |   |   | Extension Manager | 2020/08/29 03:26:13.955 558 |   | IncompatibilityList - Did not look for incompatible extensions.Configuration or the user compatibility list file did not change |   |   | Extension Manager | 2020/08/29 03:26:15.315 559 |   | LastCompatibilityListCheck - 132431442028387340 |   |   | Extension Manager | 2020/08/29 03:26:15.315 560 |   | NewConfigurationChangedTimestamp - 132431441416162849 |   |   | Extension Manager | 2020/08/29 03:26:15.315 561 |   | UserCompatibilityListTimestamp - 132428855793620840 |   |   | Extension Manager | 2020/08/29 03:26:15.315 562 |   | Entering OnAddVerbInvoked |   |   | MruList | 2020/08/29 03:26:18.970 563 |   | Entering AddItem. Persistence data for item: E:\cqwsc\Shop.less |   |   | MruList | 2020/08/29 03:26:18.970 564 |   | Entering TryPromoteItem |   |   | MruList | 2020/08/29 03:26:18.970 565 |   | Entering PromoteItemAt and found the index of the item to be 0 |   |   | MruList | 2020/08/29 03:26:18.970 566 |   | Entering OnAddVerbInvoked |   |   | MruList | 2020/08/29 03:26:23.676 567 |   | Entering AddItem. Persistence data for item: E:\cqwsc\Shop.less |   |   | MruList | 2020/08/29 03:26:23.676 568 |   | Entering TryPromoteItem |   |   | MruList | 2020/08/29 03:26:23.676 569 |   | Entering PromoteItemAt and found the index of the item to be 0 |   |   | MruList | 2020/08/29 03:26:23.676 570 |   | Begin package load [WebCompilerInitPackage] | {F92F90B7-AD79-3C96-8A84-CC640B87E4C2} |   | VisualStudio | 2020/08/29 03:26:25.296 571 |   | Initialized ServiceProvider.GlobalProvider from SetSite. |   |   | Package Framework | 2020/08/29 03:26:25.306 572 |   | Initialized AsyncServiceProvider.GlobalProvider from SetSite. |   |   | Package Framework | 2020/08/29 03:26:25.306 573 |   | Begin package load [Microsoft.VisualStudio.Shell.Connected.ConnectedUser.ConnectedUserPackage] | {7F679D93-2EB6-47C9-85EB-F6AD16902662} |   | VisualStudio | 2020/08/29 03:26:25.394 574 |   | End package load [WebCompilerInitPackage] | {F92F90B7-AD79-3C96-8A84-CC640B87E4C2} |   | VisualStudio | 2020/08/29 03:26:25.603 575 |   | Entering OnAddVerbInvoked |   |   | MruList | 2020/08/29 03:26:26.017 576 |   | Entering AddItem. Persistence data for item: E:\cqwsc\Shop.less |   |   | MruList | 2020/08/29 03:26:26.017 577 |   | Entering TryPromoteItem |   |   | MruList | 2020/08/29 03:26:26.017 578 |   | Entering PromoteItemAt and found the index of the item to be 0 |   |   | MruList | 2020/08/29 03:26:26.017 579 |   | Running in User Groups: Users |   |   | VisualStudio | 2020/08/29 03:26:26.107 580 |   | Available Drive Space: C:\ drive has 50389618688 bytes; E:\ drive has 24930516992 bytes |   |   | VisualStudio | 2020/08/29 03:26:26.107 581 |   | Internet Explorer Version: 11.0.18362.1049 |   |   | VisualStudio | 2020/08/29 03:26:26.113 582 |   | .NET Framework Version: 10.0.18362.1 |   |   | VisualStudio | 2020/08/29 03:26:26.113 583 |   | MSXML Version: 6.30.18362.1049 |   |   | VisualStudio | 2020/08/29 03:26:26.113 584 |   | { "$schema": "./WellKnownCloudConfiguration.schema.json", "WellKnownClouds": [ { "DisplayName": "Azure In China", "AccountProviderIdentifier": "552afc90-145a-469c-8c31-943595db4a66", "SerializedConfiguration": { "AuthenticationQueryParameters": null, "AsmEndPoint": "https://management.core.chinacloudapi.cn", "Authority": "#404", "AzureResourceManagementEndpoint": "#404", "AzureResourceManagementAudienceEndpoints": [ "#404" ], "ClientIdentifier": "872cd9fa-d31f-45e0-9eab-6e460a02d1f1", "EnvironmentName": "Azure In China", "GraphEndpoint": "https://graph.chinacloudapi.cn", "MsaHomeTenantId": "00000000-0000-0000-0000-000000000000", "NativeClientRedirect": "urn:ietf:wg:oauth:2.0:oob", "PortalEndpoint": "https://manage.windowsazure.cn", "ResourceEndpoint": "#404", "ValidateAuthority": true, "VisualStudioOnlineEndpoint": null, "VisualStudioOnlineAudience": null }, "Authority": "#404", "AuthorizedVsEdition": 0, "Visible": true }, { "DisplayName": "Azure Germany", "AccountProviderIdentifier": "552afc90-145a-469c-8c31-943595db4a66", "SerializedConfiguration": { "AuthenticationQueryParameters": null, "AsmEndPoint": "#404", "Authority": "#404", "AzureResourceManagementEndpoint": "#404", "AzureResourceManagementAudienceEndpoints": [ "#404" ], "ClientIdentifier": "872cd9fa-d31f-45e0-9eab-6e460a02d1f1", "EnvironmentName": "Azure Germany", "GraphEndpoint": "https://graph.cloudapi.de", "MsaHomeTenantId": "00000000-0000-0000-0000-000000000000", "NativeClientRedirect": "urn:ietf:wg:oauth:2.0:oob", "PortalEndpoint": "#404", "ResourceEndpoint": "#404", "ValidateAuthority": true, "VisualStudioOnlineEndpoint": null, "VisualStudioOnlineAudience": null }, "Authority": "#404", "AuthorizedVsEdition": 0, "Visible": true }, { "DisplayName": "Azure U.S. Government", "AccountProviderIdentifier": "552afc90-145a-469c-8c31-943595db4a66", "SerializedConfiguration": { "AuthenticationQueryParameters": null, "AsmEndPoint": "https://management.core.usgovcloudapi.net/", "Authority": "https://login.microsoftonline.us/", "AzureResourceManagementEndpoint": "https://management.usgovcloudapi.net", "AzureResourceManagementAudienceEndpoints": [ "https://management.core.usgovcloudapi.net" ], "ClientIdentifier": "872cd9fa-d31f-45e0-9eab-6e460a02d1f1", "EnvironmentName": "Azure U.S. Government", "GraphEndpoint": "https://graph.microsoftazure.us", "MsaHomeTenantId": "00000000-0000-0000-0000-000000000000", "NativeClientRedirect": "https://login.microsoftonline.com/common/oauth2/nativeclient", "PortalEndpoint": "https://portal.azure.us/", "ResourceEndpoint": "https://management.core.usgovcloudapi.net", "ValidateAuthority": true, "VisualStudioOnlineEndpoint": null, "VisualStudioOnlineAudience": null }, "Authority": "https://login.microsoftonline.us/", "AuthorizedVsEdition": 0, "Visible": true }, { "DisplayName": "Azure U.S. Government Legacy", "AccountProviderIdentifier": "552afc90-145a-469c-8c31-943595db4a66", "SerializedConfiguration": { "AuthenticationQueryParameters": null, "AsmEndPoint": "https://management.core.usgovcloudapi.net/", "Authority": "https://login.microsoftonline.us/", "AzureResourceManagementEndpoint": "https://management.usgovcloudapi.net", "AzureResourceManagementAudienceEndpoints": [ "https://management.core.usgovcloudapi.net" ], "ClientIdentifier": "872cd9fa-d31f-45e0-9eab-6e460a02d1f1", "EnvironmentName": "Azure U.S. Government", "GraphEndpoint": "https://graph.windows.net", "MsaHomeTenantId": "f8cdef31-a31e-4b4a-93e4-5f571e91255a", "NativeClientRedirect": "urn:ietf:wg:oauth:2.0:oob", "PortalEndpoint": "https://portal.azure.us/", "ResourceEndpoint": "https://management.core.usgovcloudapi.net", "ValidateAuthority": true, "VisualStudioOnlineEndpoint": "https://app.vssps.visualstudio.com/", "VisualStudioOnlineAudience": "499b84ac-1321-427f-aa17-267ca6975798" }, "Authority": "https://login.microsoftonline.us/", "AuthorizedVsEdition": 0, "Visible": true }, { "DisplayName": "Azure Government Legacy Authority", "AccountProviderIdentifier": "552afc90-145a-469c-8c31-943595db4a66", "SerializedConfiguration": { "AuthenticationQueryParameters": null, "AsmEndPoint": "https://management.core.usgovcloudapi.net/", "Authority": "https://login-us.microsoftonline.com/", "AzureResourceManagementEndpoint": "https://management.usgovcloudapi.net", "AzureResourceManagementAudienceEndpoints": [ "https://management.core.usgovcloudapi.net" ], "ClientIdentifier": "872cd9fa-d31f-45e0-9eab-6e460a02d1f1", "EnvironmentName": "Azure U.S. Government", "GraphEndpoint": "https://graph.windows.net", "MsaHomeTenantId": "f8cdef31-a31e-4b4a-93e4-5f571e91255a", "NativeClientRedirect": "urn:ietf:wg:oauth:2.0:oob", "PortalEndpoint": "https://portal.azure.us/", "ResourceEndpoint": "https://management.core.usgovcloudapi.net", "ValidateAuthority": true, "VisualStudioOnlineEndpoint": "https://app.vssps.visualstudio.com/", "VisualStudioOnlineAudience": "499b84ac-1321-427f-aa17-267ca6975798" }, "Authority": "https://login-us.microsoftonline.com/", "AuthorizedVsEdition": 0, "Visible": false }, { "DisplayName": "Azure", "AccountProviderIdentifier": "552afc90-145a-469c-8c31-943595db4a66", "SerializedConfiguration": { "AuthenticationQueryParameters": null, "AsmEndPoint": "https://management.core.windows.net/", "Authority": "https://login.microsoftonline.com/", "AzureResourceManagementEndpoint": "#404", "AzureResourceManagementAudienceEndpoints": [ "https://management.core.windows.net/" ], "ClientIdentifier": "872cd9fa-d31f-45e0-9eab-6e460a02d1f1", "EnvironmentName": "AzureCloud", "GraphEndpoint": "#404", "MsaHomeTenantId": "f8cdef31-a31e-4b4a-93e4-5f571e91255a", "NativeClientRedirect": "urn:ietf:wg:oauth:2.0:oob", "PortalEndpoint": "https://portal.azure.com/", "ResourceEndpoint": "https://management.core.windows.net/", "ValidateAuthority": true, "VisualStudioOnlineEndpoint": "https://app.vssps.visualstudio.com/", "VisualStudioOnlineAudience": "499b84ac-1321-427f-aa17-267ca6975798" }, "Authority": "https://login.microsoftonline.com/", "AuthorizedVsEdition": 0, "Visible": false }, { "DisplayName": "Azure PPE", "AccountProviderIdentifier": "552afc90-145a-469c-8c31-943595db4a66", "SerializedConfiguration": { "AuthenticationQueryParameters": null, "AsmEndPoint": "https://management.core.windows.net/", "Authority": "https://login.windows-ppe.net/", "AzureResourceManagementEndpoint": "https://api-dogfood.resources.windows-int.net", "AzureResourceManagementAudienceEndpoints": [ "https://api-dogfood.resources.windows-int.net" ], "ClientIdentifier": "872cd9fa-d31f-45e0-9eab-6e460a02d1f1", "EnvironmentName": "Azure PPE", "GraphEndpoint": "#404", "MsaHomeTenantId": "ea8a4392-515e-481f-879e-6571ff2a8a36", "NativeClientRedirect": "urn:ietf:wg:oauth:2.0:oob", "PortalEndpoint": "https://portal.azure.com/", "ResourceEndpoint": "https://management.core.windows.net/", "ValidateAuthority": true, "VisualStudioOnlineEndpoint": "#404", "VisualStudioOnlineAudience": "499b84ac-1321-427f-aa17-267ca6975798" }, "Authority": "https://login.windows-ppe.net/", "AuthorizedVsEdition": 0, "Visible": false } ] } |   |   | BuiltInSettings | 2020/08/29 03:26:28.100 585 |   | Entering OnAddVerbInvoked |   |   | MruList | 2020/08/29 03:26:29.086 586 |   | Entering AddItem. Persistence data for item: E:\cqwsc\Shop.less |   |   | MruList | 2020/08/29 03:26:29.086 587 |   | Entering TryPromoteItem |   |   | MruList | 2020/08/29 03:26:29.086 588 |   | Entering PromoteItemAt and found the index of the item to be 0 |   |   | MruList | 2020/08/29 03:26:29.087 589 | ERROR | System.NullReferenceException: 未将对象引用设置到对象的实例。 在 WebCompilerVsix.Listeners.SourceFileCreationListener.DocumentSaved(Object sender, TextDocumentFileActionEventArgs e) 位置 C:\projects\webcompiler\src\WebCompilerVsix\FileListeners\SourceFileCreationListener.cs:行号 64 在 Microsoft.VisualStudio.Text.Utilities.GuardedOperations.RaiseEvent[TArgs](Object sender, EventHandler1 eventHandlers, TArgs args) --- 引发异常的上一位置中堆栈跟踪的末尾 --- 在 Microsoft.VisualStudio.Telemetry.WindowsErrorReporting.WatsonReport.GetClrWatsonExceptionInfo(Exception exceptionObject) |   |   | Editor or Editor Extension | 2020/08/29 03:26:29.831 590 | ERROR | System.NullReferenceException: 未将对象引用设置到对象的实例。 在 WebCompilerVsix.Listeners.SourceFileCreationListener.DocumentSaved(Object sender, TextDocumentFileActionEventArgs e) 位置 C:\projects\webcompiler\src\WebCompilerVsix\FileListeners\SourceFileCreationListener.cs:行号 64 在 Microsoft.VisualStudio.Text.Utilities.GuardedOperations.RaiseEvent[TArgs](Object sender, EventHandler1 eventHandlers, TArgs args) --- 引发异常的上一位置中堆栈跟踪的末尾 --- 在 Microsoft.VisualStudio.Telemetry.WindowsErrorReporting.WatsonReport.GetClrWatsonExceptionInfo(Exception exceptionObject) |   |   | Editor or Editor Extension | 2020/08/29 03:26:29.951 591 |   | End package load [Microsoft.VisualStudio.Shell.Connected.ConnectedUser.ConnectedUserPackage] | {7F679D93-2EB6-47C9-85EB-F6AD16902662} |   | VisualStudio | 2020/08/29 03:26:30.010 592 |   | Begin package load [Visual Studio Build Manager Package] | {B718A162-0361-4B0E-920B-D88D70BE609B} |   | VisualStudio | 2020/08/29 03:26:30.022 593 | ERROR | System.NullReferenceException: 未将对象引用设置到对象的实例。 在 WebCompilerVsix.Listeners.SourceFileCreationListener.DocumentSaved(Object sender, TextDocumentFileActionEventArgs e) 位置 C:\projects\webcompiler\src\WebCompilerVsix\FileListeners\SourceFileCreationListener.cs:行号 64 在 Microsoft.VisualStudio.Text.Utilities.GuardedOperations.RaiseEvent[TArgs](Object sender, EventHandler1 eventHandlers, TArgs args) --- 引发异常的上一位置中堆栈跟踪的末尾 --- 在 Microsoft.VisualStudio.Telemetry.WindowsErrorReporting.WatsonReport.GetClrWatsonExceptionInfo(Exception exceptionObject) |   |   | Editor or Editor Extension | 2020/08/29 03:26:30.023 594 | ERROR | System.NullReferenceException: 未将对象引用设置到对象的实例。 在 WebCompilerVsix.Listeners.SourceFileCreationListener.DocumentSaved(Object sender, TextDocumentFileActionEventArgs e) 位置 C:\projects\webcompiler\src\WebCompilerVsix\FileListeners\SourceFileCreationListener.cs:行号 64 在 Microsoft.VisualStudio.Text.Utilities.GuardedOperations.RaiseEvent[TArgs](Object sender, EventHandler1 eventHandlers, TArgs args) --- 引发异常的上一位置中堆栈跟踪的末尾 --- 在 Microsoft.VisualStudio.Telemetry.WindowsErrorReporting.WatsonReport.GetClrWatsonExceptionInfo(Exception exceptionObject) |   |   | Editor or Editor Extension | 2020/08/29 03:26:30.030 595 |   | Manager ServerUri 'https://go.microsoft.com/fwlink/?LinkID=660932' |   |   | UserConnection | 2020/08/29 03:26:30.103 596 |   | End package load [VS Setup Composition] | {F92174FD-F10D-418B-819A-7433DEA53833} |   | VisualStudio | 2020/08/29 03:26:30.279 597 |   | Begin package load [Microsoft.VisualStudio.Shell.Connected.Packages.OnlineLicensing.OnlineLicensingManagerPackage] | {A5C25D8F-4D74-4924-BD8C-F3C2B860F4EC} |   | VisualStudio | 2020/08/29 03:26:30.297 598 |   | End package load [Microsoft.VisualStudio.Shell.Connected.Packages.OnlineLicensing.OnlineLicensingManagerPackage] | {A5C25D8F-4D74-4924-BD8C-F3C2B860F4EC} |   | VisualStudio | 2020/08/29 03:26:30.301 599 |   | End package load [Visual Studio Build Manager Package] | {B718A162-0361-4B0E-920B-D88D70BE609B} |   | VisualStudio | 2020/08/29 03:26:30.313 600 |   | Begin package load [Microsoft.VisualStudio.Services.ToastNotifications.ToastNotificationsPackage] | {C931D979-CA1A-41E8-8A23-E86B85E3141B} |   | VisualStudio | 2020/08/29 03:26:30.445 601 |   | End package load [Microsoft.VisualStudio.Services.ToastNotifications.ToastNotificationsPackage] | {C931D979-CA1A-41E8-8A23-E86B85E3141B} |   | VisualStudio | 2020/08/29 03:26:30.453 602 |   | Begin package load [Microsoft.VisualStudio.Web.Project.WebProjectPackage, Microsoft.VisualStudio.Web.Project] | {AAB75614-2F8F-4DA6-B0A6-763C6DBB2969} |   | VisualStudio | 2020/08/29 03:26:30.551 603 |   | End package load [Microsoft.VisualStudio.Web.Project.WebProjectPackage, Microsoft.VisualStudio.Web.Project] | {AAB75614-2F8F-4DA6-B0A6-763C6DBB2969} |   | VisualStudio | 2020/08/29 03:26:30.699 604 |   | Begin package load [Shared Web Components] | {F285DF87-079E-47A6-80E1-B92CC9305E60} |   | VisualStudio | 2020/08/29 03:26:30.722 605 |   | End package load [Shared Web Components] | {F285DF87-079E-47A6-80E1-B92CC9305E60} |   | VisualStudio | 2020/08/29 03:26:30.754 606 |   | Begin package load [EurekaPackage] | {8C28E535-ABC9-4F92-B5C9-6C16617C8884} |   | VisualStudio | 2020/08/29 03:26:30.780 607 |   | End package load [EurekaPackage] | {8C28E535-ABC9-4F92-B5C9-6C16617C8884} |   | VisualStudio | 2020/08/29 03:26:30.829 608 |   | Begin package load [ConnectedServicesPackage] | {8E15F3DA-B303-4AF9-814A-1DC5C2583398} |   | VisualStudio | 2020/08/29 03:26:30.831 609 |   | End package load [ConnectedServicesPackage] | {8E15F3DA-B303-4AF9-814A-1DC5C2583398} |   | VisualStudio | 2020/08/29 03:26:30.845 610 |   | Begin package load [RestoreManagerPackage] | {2B52AC92-4551-426D-BD34-C6D7D9FDD1C5} |   | VisualStudio | 2020/08/29 03:26:30.848 611 |   | End package load [RestoreManagerPackage] | {2B52AC92-4551-426D-BD34-C6D7D9FDD1C5} |   | VisualStudio | 2020/08/29 03:26:30.884 612 |   | Begin package load [Scc Display Information] | {D7BB9305-5804-4F92-9CFE-119F4CB0563B} |   | VisualStudio | 2020/08/29 03:26:30.887 613 |   | End package load [Scc Display Information] | {D7BB9305-5804-4F92-9CFE-119F4CB0563B} |   | VisualStudio | 2020/08/29 03:26:30.934 614 |   | Begin package load [WebCompilerPackage] | {6E1B31B9-E1C1-4697-9B0A-E638EECE7765} |   | VisualStudio | 2020/08/29 03:26:30.944 615 |   | End package load [WebCompilerPackage] | {6E1B31B9-E1C1-4697-9B0A-E638EECE7765} |   | VisualStudio | 2020/08/29 03:26:30.955 616 |   | Begin package load [Microsoft.Publish.Framework.VisualStudio.PublishPackage, Microsoft.Publish.Framework] | {94FD8BFF-40F1-4EF2-8771-E6BFB05FCB18} |   | VisualStudio | 2020/08/29 03:26:30.959 617 |   | End package load [Microsoft.Publish.Framework.VisualStudio.PublishPackage, Microsoft.Publish.Framework] | {94FD8BFF-40F1-4EF2-8771-E6BFB05FCB18} |   | VisualStudio | 2020/08/29 03:26:30.963 618 |   | Begin package load [File Enumeration Service] | {ED8075A9-3E0C-45B3-83EE-C14B43BC3787} |   | VisualStudio | 2020/08/29 03:26:30.966 619 |   | End package load [File Enumeration Service] | {ED8075A9-3E0C-45B3-83EE-C14B43BC3787} |   | VisualStudio | 2020/08/29 03:26:30.998 620 |   | Client rights determined: {"CurrentClientRights":{"ActivityId":"02286f26-85c1-478b-a504-47ed7035aa98","AuthorizedVsEdition":0,"AuthorizedVsEdition2":200,"CrtokenDaysToExpire":362,"DaysSinceCreation":3,"DaysToExpire":362,"IsLicenseGood":true,"IsSubscriptionBased":true,"IsTrialLicense":false,"LicenseDescription":"Visual Studio Community","LicensedUserId":"48172514-281b-44f1-9c2b-4cf2877310d1","LicensedUserName":"

DarthSonic

DarthSonic

Icon For Comments0

Installed product versions

  • Visual Studio: 2019 Professional
  • This extension: [example 1.12.394]

Description

File to import not found or unreadable: tools/**/*.scss. Parent style sheet: C:/Source/Repos/CleverMatch/CleverMatch.Web/Content/Home/main.scss CleverMatch.Web C:\Source\Repos\CleverMatch\CleverMatch.Web\Content\Home\main.scss 43

Bootstrap is imported as is "vars". All other imports will fail and I can't see why.

Content of main.scss

image

Folder structure

image

SteinTheRuler

SteinTheRuler

Icon For Comments0

Installed product versions

  • Visual Studio: 2019 Community
  • This extension: 1.12.394

Description

Can't compile SASS files when using @use

How can I update the compiler to support the latest syntax??

deemyboy

deemyboy

Icon For Comments0

Installed product versions

  • Visual Studio: 2019 CE
  • This extension: 1.12.394

Description

How to add line numbers and src files as comments to compiled CSS

Steps to recreate

  1. Setup Web Compiler to compile CSS on build/save etc
  2. (Try) and setup options for required output | from other plugins used with Gulp and Grunt options include: OutputStyle: expanded, nested, compact; line-numbers: true/false etc.)

Current behavior

No matter which options I try I cannot produce line numbers as comments in my compiled CSS file

take 2 files

styles.scss - main SASS file) _navbar.scss (underscore shows it will be imported by styles.scss)

styles.scss

_navbar.scss

Expected behavior

styles.css

Current output

styles.css

Any help would be appreciated.

PeterPann23

PeterPann23

Icon For Comments2

Installed product versions

  • Visual Studio: 2019
  • This extension: 1.12.394

Description

when compiling a non web project the web compiler generates error messages

Steps to recreate

  1. Solution,
  2. Have class lib as well as web application
  3. Publish lib as NuGet package

Current behavior

Not sure why but sometimes I get 2 sometimes I get more errors depending on the lib in my solution

Expected behavior

There clearly is an issue in ProjectHelpers.cs:line 227 that causes the error

Serdiev

Serdiev

Icon For Comments0

Installed product versions

  • Visual Studio: [example 2019 Professional 16.5.5]
  • This extension: [example 1.12.394]

Description

While in debug mode when the web compiler compiles it displays error box even though it does replace all files.

Structure: I have one class library with all scss files. It compiles into a few different projects. But if I have "OtherProject" in the compiler output it shows an error message. If I remove the output to "OtherProject" it works fine.

Steps to recreate

  1. Start 'OtherProject' in debug mode.
  2. Save .scss file.
  3. Error pops up "There is an error in the compilerconfig.json file. this could be due to a change in the format after this extension was updated."

Current behavior

Right now it does compile the files, but it still shows an error message which is annoying. My assumption is that the web compiler in the other class lib does not have the permissions to replace the file since it is in debug mode.

Expected behavior

Compiles without warning.

Possible solution?

Maybe introduce a flag in settings which will prevent any errors pop ups from being seen.

I'll be happy to provide any further information which might help.

Best regards, Fredrik

rich77926

rich77926

Icon For Comments1

Installed product versions

  • Visual Studio: [Microsoft Visual Studio Enterprise 2019]
  • This extension: [V1.12.394]

Description

Config file: { "compilers": { "sass": { "lineFeed": "crlf", // This is not working for .min.css file } }

Expected behavior

This function(WebCompiler.CssOptions.GetSettings) return a CssSettings object for Uglify as settings. I think it could be extended, and setting the "LineTerminator" property.

sfhaney

sfhaney

Icon For Comments0

Installed product versions

  • Visual Studio: 2019 Professional

Description

I've used WebCompiler within my MVC project and its very easy to use. I see that the overview mentions Command Line support. What I'm trying to do is the following and I'm wondering if command line would support this.

In a .net console app I'd like to be able to pass in parameters for a particular variable file (path would be dynamic) and then use that parameter in a global SCSS template that could generate the minified css purely through a console app. The console app would not contain the scss files but I'd like to be able to reference them via file path references. I was hoping there was a WebCompiler SDK I could use.

The "what I'm trying to do" here is create some branding/style off shoots of my main site theme while leveraging all the scss variables and imports that I already have.

alex-jitbit

alex-jitbit

Icon For Comments3

Installed product versions

  • Visual Studio: [example 2019 community 16.5.2]
  • This extension: [example 1.12.394]

Description

MinifyJS on save not working

Steps to recreate

  1. Add js file

  2. Add it to compilerconfig.json

  3. Not minifying on save

Versions

Quick list of the latest released versions

v1.2 - Aug 07, 2015

  • Shortcut to easily setup compilation of single files
  • LESS: Added StrictUnits and RootPath compiler support
  • LESS: Added relative URL compiler support (#63)
  • Use the official CoffeeScript compiler (#68)
  • Enable source maps for Iced CoffeeScript
  • Compile up the LESS @import chain (#67)

Library Stats (Aug 04, 2022)

Subscribers: 28
Stars: 432
Forks: 165
Issues: 225

Local file support for Blazor (Wasm only)

The LocalFiles library contains a Blazor component that makes it super simple to load local files into your

Local file support for Blazor (Wasm only)
JSON

318

JSON Flat File Data Store

Simple data store that saves the data in JSON format to a single file

JSON Flat File Data Store

unity-file-extension

Shows file extension in 1 column project window

unity-file-extension

Simple GUI Checksum hash file

Auto detect (the app will be detect automatically the engine)

Simple GUI Checksum hash file

Serilog Rolling File Sink (roll-on-file-size alternative)

This is a rolling file sink that allows you to specify roll over behaviour based on file size

Serilog Rolling File Sink (roll-on-file-size alternative)
JSON

156

Download source code: ZIP file

Download source code: CC0 Declaration

Download source code: ZIP file

's File Extractor)

KNFE (pronounced &quot;knife&quot;) is a C#-based GUI &amp; CLI program for extracting and decoding various file formats

's File Extractor)
Visual Studio C# program that loads grids using information from a json file

Visualization tool for Binary and ASCII formatted STL files

Click File-&gt;Import or use Drag-Drop to select and import Binary or ASCII formatted STL file

Visualization tool for Binary and ASCII formatted STL files

Reloaded-II File Emulation Framework

🎈 Let's screw with binaries 🎈

Reloaded-II File Emulation Framework