From 043018d9554ed7ff51987ee8fb5958aea81ed061 Mon Sep 17 00:00:00 2001 From: jooseppi12 Date: Mon, 28 Nov 2022 15:03:43 +0100 Subject: [PATCH] #1292 - Fix build issues --- build.fsx | 7 ++++--- msbuild/WebSharper.FSharp.Internal.targets | 2 +- src/compiler/WebSharper.Compiler.FSharp/Compile.fs | 4 +++- 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/build.fsx b/build.fsx index c094b64e..6bae6f1a 100644 --- a/build.fsx +++ b/build.fsx @@ -181,8 +181,9 @@ Target.create "RunCompilerTestsRelease" <| fun _ -> [ //"tests/WebSharper.Compiler.FSharp.Tests/WebSharper.Compiler.FSharp.Tests.fsproj" - "tests/WebSharper.Core.JavaScript.Tests/WebSharper.Core.JavaScript.Tests.fsproj" - "tests/WebSharper.CSharp.Analyzer.Tests/WebSharper.CSharp.Analyzer.Tests.fsproj" + yield "tests/WebSharper.Core.JavaScript.Tests/WebSharper.Core.JavaScript.Tests.fsproj" + if System.Runtime.InteropServices.RuntimeInformation.IsOSPlatform System.Runtime.InteropServices.OSPlatform.Windows then + yield "tests/WebSharper.CSharp.Analyzer.Tests/WebSharper.CSharp.Analyzer.Tests.fsproj" ] |> List.iter ( DotNet.test (fun t -> @@ -216,7 +217,7 @@ Target.create "RunSPATestsRelease" <| fun _ -> // failwith "Chutzpah test run failed for SPA tests" Target.create "RunMainTestsRelease" <| fun _ -> - if Environment.environVarAsBoolOrDefault "SKIP_CORE_TESTING" false then + if Environment.environVarAsBoolOrDefault "SKIP_CORE_TESTING" false || not <| System.Runtime.InteropServices.RuntimeInformation.IsOSPlatform System.Runtime.InteropServices.OSPlatform.Windows then Trace.log "Chutzpah testing skipped" else diff --git a/msbuild/WebSharper.FSharp.Internal.targets b/msbuild/WebSharper.FSharp.Internal.targets index df885c1b..ae4e6177 100644 --- a/msbuild/WebSharper.FSharp.Internal.targets +++ b/msbuild/WebSharper.FSharp.Internal.targets @@ -29,7 +29,7 @@ $(Root)/build/$(Configuration)/FSharp/netstandard2.0/WebSharper.MSBuild.FSharp.dll $(Root)/build/$(Configuration)/FSharp/net6.0/wsfsc.exe - $(Root)/build/$(Configuration)/FSharp/net6.0/wsfsc.exe + $(Root)/build/$(Configuration)/FSharp/net6.0/wsfsc.sh True $(MSBuildProjectDirectory)/wsconfig.$(MSBuildProjectName).json $(MSBuildProjectDirectory)/wsconfig.json diff --git a/src/compiler/WebSharper.Compiler.FSharp/Compile.fs b/src/compiler/WebSharper.Compiler.FSharp/Compile.fs index b4611808..6fb21513 100644 --- a/src/compiler/WebSharper.Compiler.FSharp/Compile.fs +++ b/src/compiler/WebSharper.Compiler.FSharp/Compile.fs @@ -87,7 +87,9 @@ let Compile (config : WsConfig) (warnSettings: WarnSettings) (logger: LoggerBase config.CompilerArgs |> Array.map (fun s -> s.Replace(@"net6.0\.NETCoreApp,Version=v6.0.AssemblyAttributes.fs", - @"netstandard2.0\.NETStandard,Version=v2.0.AssemblyAttributes.fs") + @"netstandard2.0\.NETStandard,Version=v2.0.AssemblyAttributes.fs" + ).Replace(@"net6.0/.NETCoreApp,Version=v6.0.AssemblyAttributes.fs", + @"netstandard2.0/.NETStandard,Version=v2.0.AssemblyAttributes.fs") ) File.WriteAllLines(mainProxiesFile, fixedArgs) MakeDummyDll config.AssemblyFile thisName