Skip to content

Commit 016e1c3

Browse files
committed
[All] Disable .NET Welcome message when cracking project
1 parent d4541ba commit 016e1c3

File tree

3 files changed

+16
-3
lines changed

3 files changed

+16
-3
lines changed

src/Fable.Cli/CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77

88
## Unreleased
99

10+
## 5.0.0-alpha.7 - 2025-01-23
11+
12+
### Fixed
13+
14+
* [All] Disable .NET Welcome message when cracking project (#4014) (by @MangelMaxime)
15+
1016
## 5.0.0-alpha.6 - 2025-01-23
1117

1218
### Added

src/Fable.Compiler/CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77

88
## Unreleased
99

10+
## 5.0.0-alpha.7 - 2025-01-23
11+
12+
### Fixed
13+
14+
* [All] Disable .NET Welcome message when cracking project (#4014) (by @MangelMaxime)
15+
1016
## 5.0.0-alpha.6 - 2025-01-23
1117

1218
### Added

src/Fable.Compiler/MSBuildCrackerResolver.fs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,14 +31,16 @@ module private MSBuildCrackerResolver =
3131
let private dotnet_msbuild_with_defines (fsproj: FullPath) (args: string) (defines: string list) : Async<string> =
3232
backgroundTask {
3333
let psi = ProcessStartInfo "dotnet"
34-
let pwd = Assembly.GetEntryAssembly().Location |> Path.GetDirectoryName
3534

3635
psi.WorkingDirectory <- Environment.GetFolderPath(Environment.SpecialFolder.UserProfile)
3736

3837
psi.Arguments <- $"msbuild \"%s{fsproj}\" %s{args}"
3938
psi.RedirectStandardOutput <- true
4039
psi.RedirectStandardError <- true
4140
psi.UseShellExecute <- false
41+
// Disable Dotnet Welcome message
42+
// https://github.com/fable-compiler/Fable/issues/4014
43+
psi.Environment.Add("DOTNET_NOLOGO", "1")
4244

4345
if not (List.isEmpty defines) then
4446
let definesValue = defines |> String.concat ";"
@@ -52,10 +54,9 @@ module private MSBuildCrackerResolver =
5254
do! ps.WaitForExitAsync()
5355

5456
let fullCommand = $"dotnet msbuild %s{fsproj} %s{args}"
55-
// printfn "%s" fullCommand
5657

5758
if not (String.IsNullOrWhiteSpace error) then
58-
failwithf $"In %s{pwd}:\n%s{fullCommand}\nfailed with\n%s{error}"
59+
failwithf $"In %s{psi.WorkingDirectory}:\n%s{fullCommand}\nfailed with\n%s{error}"
5960

6061
return output.Trim()
6162
}

0 commit comments

Comments
 (0)