user6401682
user6401682

Reputation:

MSBuild LibSass Error

Compiling Sass files using gulp-sass to css locally with no problem. On build machine, node modules are installed and when compiling .net code, getting error:

node_modules\node-sass\src\libsass\win\libsass.sln.metaproj:The specified solution configuration "debug|any cpu" is invalid. Please specify a valid solution configuration using the Configuration and Platform properties (e.g. MSBuild.exe Solution.sln /p:Configuration=Debug /p:Platform="Any CPU") or leave those properties blank to use the default solution configuration.

I just want to be able to compile my sass into css. I'd rather not install Ruby on the build server.

Upvotes: 4

Views: 1176

Answers (1)

RikRak
RikRak

Reputation: 963

I've just had the same (or similar) issue. In my case the build was being controlled by an Azure Devops pipeline and the Build Solution task was targeting "**/*.sln". Changing this to "SOLUTION_NAME.sln" fixed the issue.

The reason the error happens is that after a npm install the node_modules folder contains some .sln files, which match the filter on the Build Solution task, so an attempt is made to build them.

Upvotes: 4

Related Questions