madskristensen / WebCompiler

Visual Studio extension for compiling LESS and Sass files
Other
451 stars 172 forks source link

VSTS build failed with nuget buildwebcompiler #354

Open wangkanai opened 6 years ago

wangkanai commented 6 years ago

Hi @madskristensen Could you have look please

I enable compile on build as seen in the picture below. image My scss got compile nicely. image Then when i check in the code to source control for DevOps continuous deployment and the build failed.

How do fix this problem for CI in VSTS to work nicely with Web Compiler?

Thank you very much.

VSTS build logs .NET Core build definition 2.x

2018-01-24T04:37:32.0890590Z ##[section]Starting: Build
2018-01-24T04:37:32.0899118Z ==============================================================================
2018-01-24T04:37:32.0899358Z Task         : .NET Core
2018-01-24T04:37:32.0899596Z Description  : Build, test, package, or publish a dotnet application, or run a custom dotnet command. For package commands, supports NuGet.org and authenticated feeds like Package Management and MyGet.
2018-01-24T04:37:32.0899846Z Version      : 2.1.9
2018-01-24T04:37:32.0900008Z Author       : Microsoft Corporation
2018-01-24T04:37:32.0900340Z Help         : [More Information](https://go.microsoft.com/fwlink/?linkid=832194)
2018-01-24T04:37:32.0900571Z ==============================================================================
2018-01-24T04:37:33.2395898Z [command]"C:\Program Files\dotnet\dotnet.exe" build d:\a\3\s\RiverSync\RiverSync.csproj --configuration release
2018-01-24T04:37:33.5741584Z Microsoft (R) Build Engine version 15.5.180.51428 for .NET Core
2018-01-24T04:37:33.5742472Z Copyright (C) Microsoft Corporation. All rights reserved.
2018-01-24T04:37:33.5742794Z 
2018-01-24T04:37:36.7375627Z   Restoring packages for d:\a\3\s\RiverSync\RiverSync.csproj...
2018-01-24T04:37:36.7376596Z   Restoring packages for d:\a\3\s\RiverSync\RiverSync.csproj...
2018-01-24T04:37:36.7377067Z   Restore completed in 1.18 sec for d:\a\3\s\RiverSync\RiverSync.csproj.
2018-01-24T04:37:36.7377514Z   Restoring packages for d:\a\3\s\RiverSync\RiverSync.csproj...
2018-01-24T04:37:36.7377963Z   Generating MSBuild file d:\a\3\s\RiverSync\obj\RiverSync.csproj.nuget.g.props.
2018-01-24T04:37:36.7378360Z   Restore completed in 1.46 sec for d:\a\3\s\RiverSync\RiverSync.csproj.
2018-01-24T04:37:37.1145661Z   Restore completed in 768.05 ms for d:\a\3\s\RiverSync\RiverSync.csproj.
2018-01-24T04:37:38.0012277Z C:\Users\VssAdministrator\.nuget\packages\buildwebcompiler\1.11.326\build\BuildWebCompiler.targets(15,9): error MSB4062: The "WebCompiler.CompilerBuildTask" task could not be loaded from the assembly C:\Users\VssAdministrator\.nuget\packages\buildwebcompiler\1.11.326\build\..\tools\WebCompiler.exe. Could not load file or assembly 'Microsoft.Build.Utilities.v4.0, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. The system cannot find the file specified. Confirm that the <UsingTask> declaration is correct, that the assembly and all its dependencies are available, and that the task contains a public class that implements Microsoft.Build.Framework.ITask. [d:\a\3\s\RiverSync\RiverSync.csproj]
2018-01-24T04:37:38.0053186Z 
2018-01-24T04:37:38.0053535Z Build FAILED.
2018-01-24T04:37:38.0053717Z 
2018-01-24T04:37:38.0054302Z C:\Users\VssAdministrator\.nuget\packages\buildwebcompiler\1.11.326\build\BuildWebCompiler.targets(15,9): error MSB4062: The "WebCompiler.CompilerBuildTask" task could not be loaded from the assembly C:\Users\VssAdministrator\.nuget\packages\buildwebcompiler\1.11.326\build\..\tools\WebCompiler.exe. Could not load file or assembly 'Microsoft.Build.Utilities.v4.0, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. The system cannot find the file specified. Confirm that the <UsingTask> declaration is correct, that the assembly and all its dependencies are available, and that the task contains a public class that implements Microsoft.Build.Framework.ITask. [d:\a\3\s\RiverSync\RiverSync.csproj]
2018-01-24T04:37:38.0054981Z     0 Warning(s)
2018-01-24T04:37:38.0055356Z     1 Error(s)
2018-01-24T04:37:38.0055715Z 
2018-01-24T04:37:38.0056051Z Time Elapsed 00:00:04.34
2018-01-24T04:37:38.0707812Z ##[error]Error: C:\Program Files\dotnet\dotnet.exe failed with return code: 1
2018-01-24T04:37:38.0709109Z ##[error]Dotnet command failed with non-zero exit code on the following projects : d:\a\3\s\RiverSync\RiverSync.csproj
2018-01-24T04:37:38.0711329Z ##[section]Finishing: Build

VSTS build logs .NET Core build definition 1.x

First I think its was the preview build definition of 2.x, so I tried changing to 1.x and still got the same result.

2018-01-24T05:04:37.1283223Z ##[section]Starting: Build
2018-01-24T05:04:37.1289433Z ==============================================================================
2018-01-24T05:04:37.1289661Z Task         : .NET Core
2018-01-24T05:04:37.1289847Z Description  : Build, test and publish using dotnet core command-line.
2018-01-24T05:04:37.1290029Z Version      : 1.0.2
2018-01-24T05:04:37.1290219Z Author       : Microsoft Corporation
2018-01-24T05:04:37.1290453Z Help         : [More Information](https://go.microsoft.com/fwlink/?linkid=832194)
2018-01-24T05:04:37.1290688Z ==============================================================================
2018-01-24T05:04:38.2373919Z [command]"C:\Program Files\dotnet\dotnet.exe" build d:\a\3\s\RiverSync\RiverSync.csproj --configuration release
2018-01-24T05:04:38.5408377Z Microsoft (R) Build Engine version 15.5.180.51428 for .NET Core
2018-01-24T05:04:38.5412274Z Copyright (C) Microsoft Corporation. All rights reserved.
2018-01-24T05:04:38.5412647Z 
2018-01-24T05:04:40.1349804Z   Restore completed in 108.25 ms for d:\a\3\s\RiverSync\RiverSync.csproj.
2018-01-24T05:04:40.1351686Z   Restore completed in 51.64 ms for d:\a\3\s\RiverSync\RiverSync.csproj.
2018-01-24T05:04:40.1506368Z   Restore completed in 108.33 ms for d:\a\3\s\RiverSync\RiverSync.csproj.
2018-01-24T05:04:41.1976610Z C:\Users\VssAdministrator\.nuget\packages\buildwebcompiler\1.11.326\build\BuildWebCompiler.targets(15,9): error MSB4062: The "WebCompiler.CompilerBuildTask" task could not be loaded from the assembly C:\Users\VssAdministrator\.nuget\packages\buildwebcompiler\1.11.326\build\..\tools\WebCompiler.exe. Could not load file or assembly 'Microsoft.Build.Utilities.v4.0, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. The system cannot find the file specified. Confirm that the <UsingTask> declaration is correct, that the assembly and all its dependencies are available, and that the task contains a public class that implements Microsoft.Build.Framework.ITask. [d:\a\3\s\RiverSync\RiverSync.csproj]
2018-01-24T05:04:41.2022843Z 
2018-01-24T05:04:41.2028213Z Build FAILED.
2018-01-24T05:04:41.2028430Z 
2018-01-24T05:04:41.2029000Z C:\Users\VssAdministrator\.nuget\packages\buildwebcompiler\1.11.326\build\BuildWebCompiler.targets(15,9): error MSB4062: The "WebCompiler.CompilerBuildTask" task could not be loaded from the assembly C:\Users\VssAdministrator\.nuget\packages\buildwebcompiler\1.11.326\build\..\tools\WebCompiler.exe. Could not load file or assembly 'Microsoft.Build.Utilities.v4.0, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. The system cannot find the file specified. Confirm that the <UsingTask> declaration is correct, that the assembly and all its dependencies are available, and that the task contains a public class that implements Microsoft.Build.Framework.ITask. [d:\a\3\s\RiverSync\RiverSync.csproj]
2018-01-24T05:04:41.2029484Z     0 Warning(s)
2018-01-24T05:04:41.2029651Z     1 Error(s)
2018-01-24T05:04:41.2029768Z 
2018-01-24T05:04:41.2029923Z Time Elapsed 00:00:02.57
2018-01-24T05:04:41.2700261Z ##[error]Error: C:\Program Files\dotnet\dotnet.exe failed with return code: 1
2018-01-24T05:04:41.2701810Z ##[error]Dotnet command failed with non-zero exit code on the following projects : d:\a\3\s\RiverSync\RiverSync.csproj
2018-01-24T05:04:41.2734415Z ##[section]Finishing: Build
wangkanai commented 6 years ago

After add reference like #321 to <PackageReference Include="Microsoft.Build.Utilities.Core" Version="15.5.180" /> does not help with resolving the issue.

So I now not even sure if it the project structure.

<Project Sdk="Microsoft.NET.Sdk.Web">
  <PropertyGroup Label="Globals">
    <SccProjectName>SAK</SccProjectName>
    <SccProvider>SAK</SccProvider>
    <SccAuxPath>SAK</SccAuxPath>
    <SccLocalPath>SAK</SccLocalPath>
  </PropertyGroup>
  <PropertyGroup>
    <TargetFramework>netcoreapp2.0</TargetFramework>
  </PropertyGroup>
  <ItemGroup>
    <Compile Remove="Properties\PublishProfiles\**" />
    <Content Remove="Properties\PublishProfiles\**" />
    <EmbeddedResource Remove="Properties\PublishProfiles\**" />
    <None Remove="Properties\PublishProfiles\**" />
  </ItemGroup>
  <ItemGroup>
    <PackageReference Include="BuildBundlerMinifier" Version="2.6.362" />
    <PackageReference Include="BuildWebCompiler" Version="1.11.326" />
    <PackageReference Include="HtmlAgilityPack" Version="1.6.0" />
    <PackageReference Include="Microsoft.AspNetCore.All" Version="2.0.0" />
    <PackageReference Include="Microsoft.Build.Utilities.Core" Version="15.5.180" />
    <PackageReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Design" Version="2.0.0" />
  </ItemGroup>
  <ItemGroup>
    <DotNetCliToolReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Tools" Version="2.0.0" />
    <DotNetCliToolReference Include="BundlerMinifier.Core" Version="2.6.362" />
  </ItemGroup>
  <ItemGroup>
    <Folder Include="Pages\About\" />
    <Folder Include="Pages\Legal\" />
    <Folder Include="Pages\Investors\" />
    <Folder Include="Pages\Feedback\" />
    <Folder Include="Pages\Events\" />
    <Folder Include="Pages\News\" />
  </ItemGroup>
</Project>

VSTS build logs .NET Core build definition 2.x with Microsoft.Build.Utilities.Core

2018-01-24T06:53:27.8059496Z ##[section]Starting: Build
2018-01-24T06:53:27.8068306Z ==============================================================================
2018-01-24T06:53:27.8068511Z Task         : .NET Core
2018-01-24T06:53:27.8068742Z Description  : Build, test, package, or publish a dotnet application, or run a custom dotnet command. For package commands, supports NuGet.org and authenticated feeds like Package Management and MyGet.
2018-01-24T06:53:27.8069013Z Version      : 2.1.9
2018-01-24T06:53:27.8069160Z Author       : Microsoft Corporation
2018-01-24T06:53:27.8069399Z Help         : [More Information](https://go.microsoft.com/fwlink/?linkid=832194)
2018-01-24T06:53:27.8069623Z ==============================================================================
2018-01-24T06:53:28.9750341Z [command]"C:\Program Files\dotnet\dotnet.exe" build d:\a\3\s\RiverSync\RiverSync.csproj --configuration release
2018-01-24T06:53:29.3750691Z Microsoft (R) Build Engine version 15.5.180.51428 for .NET Core
2018-01-24T06:53:29.3754921Z Copyright (C) Microsoft Corporation. All rights reserved.
2018-01-24T06:53:29.3755302Z 
2018-01-24T06:53:31.8691880Z   Restoring packages for d:\a\3\s\RiverSync\RiverSync.csproj...
2018-01-24T06:53:31.8692830Z   Restoring packages for d:\a\3\s\RiverSync\RiverSync.csproj...
2018-01-24T06:53:31.8699465Z   Restore completed in 972.99 ms for d:\a\3\s\RiverSync\RiverSync.csproj.
2018-01-24T06:53:31.8703741Z   Restoring packages for d:\a\3\s\RiverSync\RiverSync.csproj...
2018-01-24T06:53:32.1935870Z   Generating MSBuild file d:\a\3\s\RiverSync\obj\RiverSync.csproj.nuget.g.props.
2018-01-24T06:53:32.2410558Z   Restore completed in 1.25 sec for d:\a\3\s\RiverSync\RiverSync.csproj.
2018-01-24T06:53:32.6282505Z   Restore completed in 744.53 ms for d:\a\3\s\RiverSync\RiverSync.csproj.
2018-01-24T06:53:33.2943920Z C:\Users\VssAdministrator\.nuget\packages\buildwebcompiler\1.11.326\build\BuildWebCompiler.targets(15,9): error MSB4062: The "WebCompiler.CompilerBuildTask" task could not be loaded from the assembly C:\Users\VssAdministrator\.nuget\packages\buildwebcompiler\1.11.326\build\..\tools\WebCompiler.exe. Could not load file or assembly 'Microsoft.Build.Utilities.v4.0, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. The system cannot find the file specified. Confirm that the <UsingTask> declaration is correct, that the assembly and all its dependencies are available, and that the task contains a public class that implements Microsoft.Build.Framework.ITask. [d:\a\3\s\RiverSync\RiverSync.csproj]
2018-01-24T06:53:33.2987760Z 
2018-01-24T06:53:33.2988112Z Build FAILED.
2018-01-24T06:53:33.2988241Z 
2018-01-24T06:53:33.2988769Z C:\Users\VssAdministrator\.nuget\packages\buildwebcompiler\1.11.326\build\BuildWebCompiler.targets(15,9): error MSB4062: The "WebCompiler.CompilerBuildTask" task could not be loaded from the assembly C:\Users\VssAdministrator\.nuget\packages\buildwebcompiler\1.11.326\build\..\tools\WebCompiler.exe. Could not load file or assembly 'Microsoft.Build.Utilities.v4.0, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. The system cannot find the file specified. Confirm that the <UsingTask> declaration is correct, that the assembly and all its dependencies are available, and that the task contains a public class that implements Microsoft.Build.Framework.ITask. [d:\a\3\s\RiverSync\RiverSync.csproj]
2018-01-24T06:53:33.2989286Z     0 Warning(s)
2018-01-24T06:53:33.2989740Z     1 Error(s)
2018-01-24T06:53:33.2989843Z 
2018-01-24T06:53:33.2989987Z Time Elapsed 00:00:03.80
2018-01-24T06:53:33.3505198Z ##[error]Error: C:\Program Files\dotnet\dotnet.exe failed with return code: 1
2018-01-24T06:53:33.3506329Z ##[error]Dotnet command failed with non-zero exit code on the following projects : d:\a\3\s\RiverSync\RiverSync.csproj
201
wangkanai commented 6 years ago

Fixed with NuGet updates

Also clean up dotnet cli tool reference

<ItemGroup>
  <PackageReference Include="Microsoft.AspNetCore.All" Version="2.0.5" />
  <PackageReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Design" Version="2.0.2" />
  <PackageReference Include="HtmlAgilityPack" Version="1.6.15" />
  <PackageReference Include="Microsoft.Build.Framework" Version="15.5.180" PrivateAssets="All" />
  <PackageReference Include="Microsoft.Build.Utilities.Core" Version="15.5.180" PrivateAssets="All" />
  <PackageReference Include="BuildBundlerMinifier" Version="2.6.362" />
  <PackageReference Include="BuildWebCompiler" Version="1.11.375" />
</ItemGroup>
<ItemGroup>
  <DotNetCliToolReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Tools" Version="2.0.0" />
</ItemGroup>

VSTS build logs .NET Core 2.X Build definition

2018-01-24T07:55:03.5173813Z ##[section]Starting: Build
2018-01-24T07:55:03.5183394Z ==============================================================================
2018-01-24T07:55:03.5183621Z Task         : .NET Core
2018-01-24T07:55:03.5183868Z Description  : Build, test, package, or publish a dotnet application, or run a custom dotnet command. For package commands, supports NuGet.org and authenticated feeds like Package Management and MyGet.
2018-01-24T07:55:03.5184130Z Version      : 2.1.9
2018-01-24T07:55:03.5184297Z Author       : Microsoft Corporation
2018-01-24T07:55:03.5184567Z Help         : [More Information](https://go.microsoft.com/fwlink/?linkid=832194)
2018-01-24T07:55:03.5184793Z ==============================================================================
2018-01-24T07:55:04.7024519Z [command]"C:\Program Files\dotnet\dotnet.exe" build d:\a\3\s\RiverSync\RiverSync.csproj --configuration release
2018-01-24T07:55:05.0352386Z Microsoft (R) Build Engine version 15.5.180.51428 for .NET Core
2018-01-24T07:55:05.0354242Z Copyright (C) Microsoft Corporation. All rights reserved.
2018-01-24T07:55:05.0355053Z 
2018-01-24T07:55:06.7338702Z   Restoring packages for d:\a\3\s\RiverSync\RiverSync.csproj...
2018-01-24T07:55:06.7339732Z   Restoring packages for d:\a\3\s\RiverSync\RiverSync.csproj...
2018-01-24T07:55:08.1782767Z   Generating MSBuild file d:\a\3\s\RiverSync\obj\RiverSync.csproj.nuget.g.props.
2018-01-24T07:55:08.1783741Z   Restore completed in 1.31 sec for d:\a\3\s\RiverSync\RiverSync.csproj.
2018-01-24T07:55:08.5511806Z   Restore completed in 1.87 sec for d:\a\3\s\RiverSync\RiverSync.csproj.
2018-01-24T07:55:40.2134365Z   
2018-01-24T07:55:40.2135248Z   WebCompiler: Begin compiling compilerconfig.json
2018-01-24T07:55:40.7141663Z   WebCompiler installing updated versions of the compilers...
2018-01-24T07:55:50.9323944Z    Compiled wwwroot/scss/riversync.css
2018-01-24T07:55:51.5944018Z    Minified wwwroot/scss/riversync.min.css
2018-01-24T07:55:51.5944686Z   WebCompiler: Done compiling compilerconfig.json
2018-01-24T07:55:51.5945394Z   
2018-01-24T07:55:51.5945768Z   Bundler: Begin processing bundleconfig.json
2018-01-24T07:55:51.6535608Z    Minified wwwroot/css/site.min.css
2018-01-24T07:55:51.6536306Z   Bundler: Done processing bundleconfig.json
2018-01-24T07:56:04.2846322Z   RiverSync -> d:\a\3\s\RiverSync\bin\release\netcoreapp2.0\RiverSync.dll
2018-01-24T07:56:04.2847027Z 
2018-01-24T07:56:04.2847425Z Build succeeded.
2018-01-24T07:56:04.2847757Z     0 Warning(s)
2018-01-24T07:56:04.2848105Z     0 Error(s)
2018-01-24T07:56:04.2848345Z 
2018-01-24T07:56:04.2848669Z Time Elapsed 00:00:59.13
2018-01-24T07:56:04.3934215Z ##[section]Finishing: Build
JonnyBooker commented 6 years ago

I'm still having this issue now using the latest DotNet SDK 2.1

root@2aa5d1e4275a:/repo/AppPath# dotnet build
Microsoft (R) Build Engine version 15.8.166+gd4e8d81a88 for .NET Core
Copyright (C) Microsoft Corporation. All rights reserved.

  Restore completed in 49.56 ms for /repo/AppPath/Application.csproj.
  Restoring packages for /repo/AppPath/Application.csproj...

  //.. Various package installs

  Generating MSBuild file /repo/AppPath/obj/Application.csproj.nuget.g.props.
  Generating MSBuild file /repo/AppPath/obj/Application.csproj.nuget.g.targets.
  Restore completed in 8.74 sec for /repo/AppPath/Application.csproj.

  WebCompiler: Begin compiling compilerconfig.json
  WebCompiler installing updated versions of the compilers...
/root/.nuget/packages/buildwebcompiler/1.11.375/build/BuildWebCompiler.targets(12,9): error : No such file or directory [/repo/AppPath/Application.csproj]

Build FAILED.

/root/.nuget/packages/buildwebcompiler/1.11.375/build/BuildWebCompiler.targets(12,9): error : No such file or directory [/repo/AppPath/Application.csproj]
    0 Warning(s)
    1 Error(s)

Time Elapsed 00:00:10.91

CSProj as Follows:

<Project Sdk="Microsoft.NET.Sdk.Web">

  <PropertyGroup>
    <TargetFramework>netcoreapp2.0</TargetFramework>
  </PropertyGroup>

  <ItemGroup>
    <DotNetCliToolReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Tools" Version="2.0.0" />
  </ItemGroup>

  <ItemGroup>
    <PackageReference Include="Microsoft.AspNetCore.All" Version="2.0.5" />
    <PackageReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Design" Version="2.0.2" />
    <PackageReference Include="HtmlAgilityPack" Version="1.6.15" />
    <PackageReference Include="Microsoft.Build.Framework" Version="15.5.180" PrivateAssets="All" />
    <PackageReference Include="Microsoft.Build.Utilities.Core" Version="15.5.180" PrivateAssets="All" />
    <PackageReference Include="BuildBundlerMinifier" Version="2.6.362" />
    <PackageReference Include="BuildWebCompiler" Version="1.11.375" />
  </ItemGroup>

  <ItemGroup>
    <Folder Include="wwwroot\images\" />
    <Folder Include="wwwroot\lib\bootstrap\" />
    <Folder Include="wwwroot\lib\superfish\" />
    <Folder Include="wwwroot\fonts\" />
  </ItemGroup>

</Project>

Has anyone found a solution/can advise me on a fix for this issue?

ajuch commented 5 years ago

Having this issue with the dotnet sdk 2.2 too. Software is being built in a docker container.

  WebCompiler: Begin compiling compilerconfig.json
  WebCompiler installing updated versions of the compilers...
/root/.nuget/packages/buildwebcompiler/1.12.394/build/BuildWebCompiler.targets(12,9): error : No such file or directory [/app/Wex.Web/Wex.Web.fsproj]
The command '/bin/sh -c dotnet publish -c Release -o out' returned a non-zero code: 1
ERROR: Job failed: exit code 1
michaelp commented 5 years ago

Same problem as above (see comment by @ajuch) What can I do to help to troubleshoot the issue? By the way, if I do export MSBUILDDISABLENODEREUSE=0 then the problem symptom is /root/.nuget/packages/buildwebcompiler/1.12.394/build/BuildWebCompiler.targets(12,9): error : MSB0001: Internal MSBuild Error: ContextID 72 should have been in the ID-to-project file mapping but wasn't! [/app/src/a/a.csproj]

Some info:

ajuch commented 5 years ago

I think the problem might be at CompilerServices.cs Line 81. On Linux the nodejs binary doesn't have the .exe suffix, so WebCompiler tries to install it, which won't work on linux?

michaelp commented 5 years ago

@ajuch this would be true for 7zip as well. and also ProcessStartInfo start = new ProcessStartInfo { WorkingDirectory = _path, CreateNoWindow = true, WindowStyle = ProcessWindowStyle.Hidden, FileName = "cmd.exe", Arguments = "/c prepare.cmd" }; would never work on linux for obvious reasons. Looks like windows specific code

michaelp commented 5 years ago

It looks like exception is going to be thrown and bubble up all the way to the main and then get lost without being logget See ConfigFileProcessor.Process and the chain. I don't understand how loggint works in this code , I will try to instrument the code and try to run it in docker

michaelp commented 5 years ago

after instrumenting the code the following is the exception stack System.ComponentModel.Win32Exception (2): No such file or directory at System.Diagnostics.Process.StartCore(ProcessStartInfo startInfo) at System.Diagnostics.Process.Start() at System.Diagnostics.Process.Start(ProcessStartInfo startInfo) at WebCompiler.CompilerService.Initialize() at WebCompiler.CompilerService.GetCompiler(Config config) at WebCompiler.ConfigFileProcessor.ProcessConfig(String baseFolder, Config config) at WebCompiler.ConfigFileProcessor.Process(String configFile, IEnumerable`1 configs, Boolean force) at WebCompiler.Program.Main(String[] args)

I tend to think, that my assumption was correct and WebCompiler, is not yet targeting Linux environments

JonnyBooker commented 5 years ago

I'm still experiencing this issue. Was there any true resolution/roadmap for a fix?

yjmrobert commented 5 years ago

@JonnyBooker this isn't quite a solution, but a workaround I've found is that you can target the package to only build on a Windows environment by modifying your csproj to

<PackageReference Condition="'$(OS)' == 'Windows_NT'" Include="BuildWebCompiler" Version="1.12.394" />

Unfortunately you still have to build and compile on Windows at some point, but this should grease the VSTS build along. In my case I just locally compile (using SASS compiler) and version control the output

dkadd commented 5 years ago

@yjmrobert Adding the packageReference has build sucessfully in Azure DevOps. But the published website has some missing sass/less functionality which is working in Visual Studios.

dkadd commented 5 years ago

@yjmrobert How to do this " locally compile (using SASS compiler) and version control the output"

yjmrobert commented 5 years ago

@dkadd I publish the compiled output style.min.css and have the WebCompiler extension set up to re-compile that file every time I make a change and save.

VictorioBerra commented 4 years ago

Same problem on Azure DevOps Ubuntu build agent.

vertonghenb commented 4 years ago

Same on Ubuntu Github Pages

Juloop commented 4 years ago

I got the same problem with a Jenkins Pipeline running on a Windows 10 VM. No solution found apart from including my css file in de repository...

szalapski commented 3 years ago

I have the same problem. No way to build in Linux?

michael-kaufman commented 3 years ago

Can somebody please suggest an alternative to using the WebCompiler extension? I'm not sure which tools to use or how to include that solution into the build. Thanks!

stefanloerwald commented 3 years ago

See https://github.com/madskristensen/WebCompiler/issues/468 for alternatives.