Sass failing to compile - Web Essentials 2013 Update 4 - visual-studio

I'm currently using Web Essentials 2013 update 4 to provide support for compiling .scss files in Visual Studio.
The tool has worked fine for me in the past however I have just created a new .scss file and have copied the bootstrap un-minified css into this new file.
Upon saving, the compilation window on the right hand side of the screen fails to update or display the compiled css or any error messages. Meanwhile, the blue bar at the bottom of my Visual Studio screen is stuck on
Compiling 0 dependent file for bootstrap.scss
Usually I would expect a bootstrap.css file to be generated from this as well as a bootstrap.min.css file but this is not happening.
Does anyone have any ideas how I can restore this back to normal working conditions?

This was to do with the settings I had in my WebEssentials-Settings.json file. In version 3, the 'UseRubyRuntime' parameter needed to be marked as true to allow it to auto compile into the relevant files. Since version 4 this can be marked as false as WE now has a built in compiler which I believe may have been conflicting with the RubyRuntime version I was trying to use.

I had a similar problem, after installing Web Essentials 2013 Update 4 the .scss files started throwing errors like this to the output:
Something went wrong reaching: ...
SCSS: Site.scss compilation failed: The service failed to respond to this request
Possible cause: Syntax Error!
The only solution for me was this:
Uninstall Web Essentials
Delete %AppData%\Local\Microsoft\VisualStudio\12.0
Delete %AppData%\Roaming\Microsoft\VisualStudio\12.0
Repair VS 2013.4
Reinstall Web Essentials
Source: https://visualstudiogallery.msdn.microsoft.com/56633663-6799-41d7-9df7-0f2a504ca361/view/Discussions/1#15143
And a heads-up: If you import other .scss files, make sure they are in the correct location. When I updated Twitter.Bootstrap.Sass 3.3.3 via NuGet, the related .scss files were moved to a different folder and I had to update references. For example:
Before:
#import "../sass/bootstrap/_utilities.scss";
After:
#import "../stylesheets/bootstrap/_utilities.scss";

I had the same problem, and spent some time uninstalling and re-installing Web Essentials. I tried deleting the parts of AppData that seemed to be related to Web Essential, all with no success at compiling the scss file.
So I created a new .scss with minimal content, that compiled. Then I started copying over pieces from the failing one. After a couple of copies, the new one failed too. I was able to zero in on the failure.
It was caused by this line:
$highlightcolor: #67a0f;
Do you see the problem? the hex color code is missing a digit. it should have been 67a0f5. Fixing this fixed the problem with the original file.
I had gone over the file looking for syntax errors, but didn't spot the short color def.
I hope this saves someone some time and frustration.

I had the same problem; in order to help diagnose it I created a minimal .scss file with dummy CSS rules - it generated the same error.
Then I went to my long-time tested and fully working legacy .scss file - it generated the same error. Something is wrong here, I thought.
After tinkering with the issue for a while, somehow it got fixed by closing Visual Studio, reloading and reopening the solution.

Referencing the changelog, as of 2.5 for update 4 of Web Essentials:
Removed all node.js based tools ◦Sass/LESS compilers
JSHint/JSCS
linters CSS AutoPrefixer Handlebars compiler SweetJS/LiveScript
compilers
http://vswebessentials.com/changelog
So my understanding is, that it no longer compiles.

I am having the same problem and have eliminated actual syntax errors and incorrect path references. I have found two things out about this.
This happens when there is a file that only specifies variables and
has no actual scss or css markup. This is more of a hack as you
may have to put unwanted css in a variables file.
Turning off Autoprefixer will resolve the issue entirely, but at the cost of not using this feature.

I had this problem and determined that when I was running a Compile All SASS Files, the plugin was trying to compile files found in the /obj directory of the project which failed, and consequently caused subsequent compilation to fail. Deleting the /obj directory and restarting VS fixed the issue.

I had a similar issue and turn out to be a reference to a SASS variable before it was declared. There were no warnings or errors. Once I move the reference to the right place it all worked fine.

Going off of what others have said about Web Essentials. Looking at the change log, it states that for versions 2013 update 4 and up (meaning version 2015 as well),
Important! Bundling, minification and compilation of LESS, Sass and
CoffeeScript is not longer part of Web Essentials 2015. Install the
new extensions Bundler & Minifier and Web Compiler instead. Also, see
this list of other web development extensions that might be of
interest to you.
I found this neat little extension for visual studio, that compiles the SCSS file(s) on save into a CSS file (along with minification for that file).
You can get it here.
The guy that created this extension also talks about the Web Essential issue as well, found here.

Related

Missing maui_colors.xml and maui_splash_image.xml

I've been developing a .NET MAUI app on my Windows 11 machine which works perfectly.
When I try to compile and run it on a Mac, running the latest version of Visual Studio for Mac - 17.3 Preview build 1038, I get two errors -- see below:
Source file 'obj/Debug/net6.0-android/resizetizer/sp/maui_splash_image.xml' could not be found (XA2001)
Source file 'obj/Debug/net6.0-android/resizetizer/sp/maui_colors.xml' could not be found (XA2001)
Any idea what's causing this and how to fix it?
P.S. I started this project from scratch on my PC so it's not a conversion from Xamarin.
Cleaning and building the Solution (not the single project) fixed it for me.
UPDATE: Rebuild also works. Sometimes you'll have to do this twice it to work.
Cleaning, and then building the solution then resulted in error code = "AMM000" on File "AndroidManifest.xml". I found virtually nothing on that code.
Ultimately, I spent a few hours creating a new project and moved my code over to the new project, line-by-line.
Not a great bug. I believe all that I did was change my icon file, but I guess I'll rename my actual icon to the sample "bot" icon that comes in the sample project and leave it at that.
I had this problem when creating the APK for my MAUI app. Cleaning and rebuilding as the other answers suggested did not work.
I solved it by creating a new MAUI project and going through the deployment process to generate the files; and then replace my actual project files (my problem was in the resizetizer folder) with the generated ones. This got rid of the error.

PhpStorm - Disable generation of '.sass-cache' on compilation (file-watcher)

So, the compilation of (_)file.scss files to *.css files works great. Just one thing: For each file the watcher encounters, it creates a cache file. It does this right next to the file being compiled, e.g.:
_partial.scss
style.scss
Generates:
/.sass-cache/C0mpl1cat3dh4sh/_partial.scss
/.sass-cache/C0mpl1cat3dh4sh/style.scss
style.css
Of course I could simple delete the files when they're generated. Could add them to .gitignore. But these are work-arounds.
How to disable the generation of these cache files?
In the options I could not find an option to do this when searching "cache", "file watcher" or "watch".
Extra info:
Running 2018.3.3, built 9th January 2019
Have not seen this before, though haven't mucked around with scss in a while (2 - 3 months), so not sure if it's a recent addition to PhpStorm
Launch a terminal and find out the command-line switches offered by your SASS implementation, typically with:
sass --help
You appear to be using old Ruby SASS. If I recall correctly, the switch was:
--no-cache
Add it to the Arguments input box and you should be done.
As already mentioned, Ruby SASS is no longer being developed so it can be a good moment to switch to Dart SASS, which does not have any cache to care about.
Ruby sass is deprecated already for a while, development is moved towards Dart implementation while LibSass is also actual implementation, but may step behind Dart implementation in some aspects. LibSass have plenty of integrations for various languages, please refer documentation by link above.
Both of these implementations are much faster then Ruby sass and doesn't produce any additional cache directories.

Configuration Babel for Webstorm 11 on Windows

I'm having trouble getting Babel to work on my current installation of Webstorm 11 on Windows. For some background I'm currently using Webstorm to do Angular development with a Microsoft MVC project (constraints of the project). For the most part it has gone well but I've wanted to move to es2015. I'm already using node package manager and the LESS transpiler with no issues. In trying to figure out what to install I went through a number of packages:
Babel
Babel-cli
Grunt-cli
Grunt-babel
Babel-preset-es2015
It this stage I'm okay with not using grunt; I just want to get a file to transpile before moving on to that. I actually have Webstorm thinking the file watcher is there but it doesn't actually transpile the code. I figured out es2015 was no longer on by default so I installed the last preset and it totally through my machine into a grind of processing tasks that maxes out my machine and only ended with an exception looking trying to for path under my project. That path is indeed valid. If I re-enable the file watcher it will max out my machine again.
All these seems pretty abnormal to me given I just want to enable the damn es2015 processing. Somewhere I'm obviously doing something wrong so I'm hoping someone can give me some input in what I truly to setup Babel properly.
Thanks!
Sieg

#import causes parse issue: "could not build module"

After updating with Xcode 6.3, I found something strange things with my projects.
Below codes causes parse issue that says "Could not build module 'AgendaFramework'", the AgendaFramework is my custom embedded framework for ios8:
#import MyEmbededFramework;
The error marker looks like this:
The issues is raised during indexing not building. Whole building can be performed successfully without any error or warning. I can build, archive, run on device, deploy, submit to App Store.
However the error marker shows up when I edit the classes that belongs to the extension. The the extension(widget) explicitly linked to the embedded framework. (I know that I don't have to do it when I use #import statement.)
In this state, I could not receive any valid content assistant, very annoying.
After I replace the import statement with old style, the problem was disappeared:
#import <AgendaFramework/AgendaFramework.h>
I have several other projects that have very similar topology with the project which causes this issue, But they are okay. Only one project causes this issue. I compared every detail build settings, I could not find any clue.
I tried:
Delete derived data
Full Clean
Reboot
Any clues are welcomed. Thanks!
It looks like turning on:
Allow Non-modular Includes In Framework Modules solved this issue for me.
Hi this is due to the fact that file which you are making it public in framework header must be public also.
Sometimes this issue can be solved by adding the framework to the same folder as the .xcodeproj file, no subfolders or anything.
Credits to Jonny who points it out as a comment in the question.
Solution that worked for me: diligence in framework header file orientation to system style imports... like #import <CoreXLib/CoreThreads.h> the story:
In my case my framework that I built came from the combination of several code bases as it became apparent that I could reuse some of the general design patterns across that code easer via Framework vs the fragile Xcode project pathnames.
As I built my framework "CoreXLib", I reorganized it into the Cocoa Framework typical of Xcode. I changed my imports from:
#import "CoreTypeAliases.h" // project local style
to
#import <CoreXLib/CoreTypeAliases.h> // system or framework style
appropriately. Several projects that used the CoreXLib.framework which includes the public headers in the lego-folder worked... so I thought I was good to go...
Unfortunately some of the headers that were public did not get fully updated. The classes in the framework built just fine in the local style. All projects using it worked up to this point and then I ran into one that didn't... and the error noted by #jeeeyul
So after finding this thread and finding #kwz 's solution, and not having it do anything in my case, I decided to polish the code up while I was trying to figure this problem out. In the polishing, I found that some of the #imports did not get changed like they should have in the Xcode search and replaces. Time for some hand-jamming...
After fixing all of those references in all of my CoreXLib project headers (not just the public ones, self defense), I dove back into the problem... I took the newly complied CoreXLib.framework over to the errant project that embedded it... and the problem had vanished! I checked the Allow Non-modular Includes... in both the framework project and the project that linked the framework in and both were "No". Flipping both to "Yes" and to "No" made no difference in several tests. The only other change was the #import "..." to #import <CoreXLib/...> modifications.
So sometimes polishing the apple 🍎 knocks the bugs🐞🐞off...
set YES in Build Active Architecture Only in build settings.
It worked for me.
Today I solved this problem by those steps,:
Chose the schema "MyEmbededFramework"
Press [Command + B] to build
From the build phase panel, add "MyEmbededFramework.framework" to Link Binary With Libraries
Try to build your project, the problem may disappear now.
you can try this, it's work for me. delete DerivedData dir that about your project.step by step
Turn off module's in build settings. That may work

Importing a project into Visual Studio. Why so many errors?

This isn't really coding specific, but we currently have a project that is live and working fine. I am tasked with making a few changes to it. I imported the ALL files of the project to Visual Studio 2010. I can't get any work done, because of all the errors!
Do you have any suggestions for me? The project doesn't have a source file, so I created a project and made one myself.
I tried another version of Visual Studio, and the errors continue. How in the world is this project even working?
Also, I have no way to speak with the creator.
Thanks for the help!
Josh
Without seeing the specific errors you're running into, I'm guessing that you are hitting one of two scenarios:
The source code references .NET assemblies that you do not have installed on your development machine. The only way to correct this is to get your hands on a copy of those assemblies to install them. The assembly names should be in the error messages, which would give you a good starting point to look from.
It's also possible that differences in the .NET framework versions that it was originally developed in and what you are trying to use now are accounting for a large number of errors. If the errors specifically reference the version number, this is most likely what you're experiencing. If this is the case, there are ways you can upgrade the individual file versions that your program references, but I honestly haven't done that in about 8 years, so I'm drawing a blank at the moment as to how to do it.
I don't understand ?
you have a "project" (what kind of project?) that you want to start working with with VS2010 ?
You add the files to a new VS2010 project and start building it and many errors occur ?
What kind of errors ? Language (C++/C#) errors ? missing include missing ? missing libraries ?
Can you show a some of the errors you get ?

Resources