[GH-ISSUE #516] Building fails in mono Docker container #470

Closed
opened 2026-02-26 00:32:44 +03:00 by kerem · 3 comments
Owner

Originally created by @keeferrourke on GitHub (Jul 19, 2018).
Original GitHub issue: https://github.com/hirschmann/nbfc/issues/516

After building nbfc failed due to claims of missing assembly references on my Fedora 28 Workstation laptop (Lenovo Yoga 710-15ISK), even after installing the mono runtime as suggested in the Wiki (instead of using the packaged runtime), I figured that building from within the Docker container would be the next best thing.

Turns out that building within mono:latest has the same issues. Note that I had issues with permissions mounting this repo's source code as a docker volume (the build script complained about being unable to access the packages directory), and ended up cloning this repo directly into the container at /opt/nbfc instead.

Log output below:

Build FAILED.

Warnings:

/opt/nbfc/nbfc/Windows/Setup/NbfcSetup/NbfcSetup.wixproj:  warning : Could not find project file /usr/lib/mono/xbuild/Microsoft/WiX/v3.x/Wix.targets, to import. Ignoring.
/opt/nbfc/nbfc/Windows/Setup/NbfcBootstrapper/NbfcBootstrapper.wixproj:  warning : Could not find project file /usr/lib/mono/xbuild/Microsoft/WiX/v3.x/Wix.targets, to import. Ignoring.
/opt/nbfc/nbfc/Windows/Setup/DriverSetupWixAction/DriverSetupWixAction.csproj:  warning : Could not find project file /usr/lib/mono/xbuild/Microsoft/WiX/v3.x/Wix.CA.targets, to import. Ignoring.

/opt/nbfc/nbfc/NoteBookFanControl.sln (Build) ->
(Build target) ->
/opt/nbfc/nbfc/Core/StagWare.Configurations/StagWare.FanControl.Configurations.csproj (default targets) ->
/usr/lib/mono/xbuild/14.0/bin/Microsoft.Common.targets (ResolveAssemblyReferences target) ->

	/usr/lib/mono/xbuild/14.0/bin/Microsoft.Common.targets:  warning : Reference 'System.IO.Abstractions, Version=2.1.0.175, Culture=neutral, PublicKeyToken=96bf224d23c43e59, processorArchitecture=MSIL' not resolved

Errors:

/opt/nbfc/nbfc/NoteBookFanControl.sln (Build) ->
(Build target) ->
/opt/nbfc/nbfc/Core/StagWare.Configurations/StagWare.FanControl.Configurations.csproj (default targets) ->
/usr/lib/mono/xbuild/14.0/bin/Microsoft.CSharp.targets (CoreCompile target) ->

	ConfigManager.cs(4,17): error CS0234: The type or namespace name 'Abstractions' does not exist in the namespace 'System.IO' (are you missing an assembly reference?)
	FanControlConfigManager.cs(8,17): error CS0234: The type or namespace name 'Abstractions' does not exist in the namespace 'System.IO' (are you missing an assembly reference?)
	ConfigManager.cs(69,81): error CS0246: The type or namespace name 'IFileSystem' could not be found (are you missing a using directive or an assembly reference?)
	FanControlConfigManager.cs(52,91): error CS0246: The type or namespace name 'IFileSystem' could not be found (are you missing a using directive or an assembly reference?)
	ConfigManager.cs(29,17): error CS0246: The type or namespace name 'IFileSystem' could not be found (are you missing a using directive or an assembly reference?)

	 4 Warning(s)
	 5 Error(s)

Time Elapsed 00:00:05.3159780

And since the Assembly references were still an issue, I checked out version 1.5.0 and got these errors instead...

Build FAILED.

Warnings:

/opt/nbfc/Windows/Setup/NbfcSetup/NbfcSetup.wixproj:  warning : Could notnbfc find project file /usr/lib/mono/xbuild/Microsoft/WiX/v3.x/Wix.targets, to import. Ignoring.
/opt/nbfc/Windows/Setup/NbfcBootstrapper/NbfcBootstrapper.wixproj:  warning : Could not find project file /usr/lib/mono/xbuild/Microsoft/WiX/v3.x/Wix.targets, to import. Ignoring.
/opt/nbfc/Windows/Setup/DriverSetupWixAction/DriverSetupWixAction.csproj:  warning : Could not find project file /usr/lib/mono/xbuild/Microsoft/WiX/v3.x/Wix.CA.targets, to import. Ignoring.

Errors:

/opt/nbfc/NoteBookFanControl.sln (Build) ->
(Build target) ->
/opt/nbfc/Tests/StagWare.FanControl.Tests/StagWare.FanControl.Tests.csproj (default targets) ->
(EnsureNuGetPackageBuildImports target) ->

	/opt/nbfc/Tests/StagWare.FanControl.Tests/StagWare.FanControl.Tests.csproj: error : This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them.  For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is ../../packages/xunit.runner.visualstudio.2.1.0/build/net20/xunit.runner.visualstudio.props.

/opt/nbfc/NoteBookFanControl.sln (Build) ->
(Build target) ->
/opt/nbfc/Tests/StagWare.FanControl.Tests/StagWare.FanControl.Tests.csproj (default targets) ->
/usr/lib/mono/xbuild/14.0/bin/Microsoft.Common.targets (_RecordCleanFile target) ->

	/usr/lib/mono/xbuild/14.0/bin/Microsoft.Common.targets: error : Could not find a part of the path "/opt/nbfc/Tests/StagWare.FanControl.Tests/obj/Release/StagWare.FanControl.Tests.csproj.FilesWrittenAbsolute.txt".  at System.IO.FileStream..ctor (System.String path, System.IO.FileMode mode, System.IO.FileAccess access, System.IO.FileShare share, System.Int32 bufferSize, System.Boolean anonymous, System.IO.FileOptions options) [0x00164] in <71d8ad678db34313b7f718a414dfcb25>:0 
  at System.IO.FileStream..ctor (System.String path, System.IO.FileMode mode, System.IO.FileAccess access, System.IO.FileShare share, System.Int32 bufferSize, System.IO.FileOptions options, System.String msgPath, System.Boolean bFromProxy, System.Boolean useLongPath, System.Boolean checkHost) [0x00000] in <71d8ad678db34313b7f718a414dfcb25>:0 
  at (wrapper remoting-invoke-with-check) System.IO.FileStream..ctor(string,System.IO.FileMode,System.IO.FileAccess,System.IO.FileShare,int,System.IO.FileOptions,string,bool,bool,bool)
  at System.IO.StreamWriter.CreateFile (System.String path, System.Boolean append, System.Boolean checkHost) [0x0001c] in <71d8ad678db34313b7f718a414dfcb25>:0 
  at System.IO.StreamWriter..ctor (System.String path, System.Boolean append, System.Text.Encoding encoding, System.Int32 bufferSize, System.Boolean checkHost) [0x00055] in <71d8ad678db34313b7f718a414dfcb25>:0 
  at System.IO.StreamWriter..ctor (System.String path, System.Boolean append, System.Text.Encoding encoding, System.Int32 bufferSize) [0x00000] in <71d8ad678db34313b7f718a414dfcb25>:0 
  at System.IO.StreamWriter..ctor (System.String path, System.Boolean append) [0x00008] in <71d8ad678db34313b7f718a414dfcb25>:0 
  at (wrapper remoting-invoke-with-check) System.IO.StreamWriter..ctor(string,bool)
  at Microsoft.Build.Tasks.WriteLinesToFile.Execute () [0x0002e] in <2c8cd2f40cfb41ccb654d47f8f82b706>:0 

	 3 Warning(s)
	 2 Error(s)

Time Elapsed 00:00:13.1279000

How can I build this thing on Linux?

Originally created by @keeferrourke on GitHub (Jul 19, 2018). Original GitHub issue: https://github.com/hirschmann/nbfc/issues/516 After building `nbfc` failed due to claims of missing assembly references on my Fedora 28 Workstation laptop (Lenovo Yoga 710-15ISK), even after installing the mono runtime as suggested in the Wiki (instead of using the packaged runtime), I figured that building from within the Docker container would be the next best thing. Turns out that building within `mono:latest` has the same issues. Note that I had issues with permissions mounting this repo's source code as a docker volume (the build script complained about being unable to access the `packages` directory), and ended up cloning this repo directly into the container at `/opt/nbfc` instead. Log output below: ``` Build FAILED. Warnings: /opt/nbfc/nbfc/Windows/Setup/NbfcSetup/NbfcSetup.wixproj: warning : Could not find project file /usr/lib/mono/xbuild/Microsoft/WiX/v3.x/Wix.targets, to import. Ignoring. /opt/nbfc/nbfc/Windows/Setup/NbfcBootstrapper/NbfcBootstrapper.wixproj: warning : Could not find project file /usr/lib/mono/xbuild/Microsoft/WiX/v3.x/Wix.targets, to import. Ignoring. /opt/nbfc/nbfc/Windows/Setup/DriverSetupWixAction/DriverSetupWixAction.csproj: warning : Could not find project file /usr/lib/mono/xbuild/Microsoft/WiX/v3.x/Wix.CA.targets, to import. Ignoring. /opt/nbfc/nbfc/NoteBookFanControl.sln (Build) -> (Build target) -> /opt/nbfc/nbfc/Core/StagWare.Configurations/StagWare.FanControl.Configurations.csproj (default targets) -> /usr/lib/mono/xbuild/14.0/bin/Microsoft.Common.targets (ResolveAssemblyReferences target) -> /usr/lib/mono/xbuild/14.0/bin/Microsoft.Common.targets: warning : Reference 'System.IO.Abstractions, Version=2.1.0.175, Culture=neutral, PublicKeyToken=96bf224d23c43e59, processorArchitecture=MSIL' not resolved Errors: /opt/nbfc/nbfc/NoteBookFanControl.sln (Build) -> (Build target) -> /opt/nbfc/nbfc/Core/StagWare.Configurations/StagWare.FanControl.Configurations.csproj (default targets) -> /usr/lib/mono/xbuild/14.0/bin/Microsoft.CSharp.targets (CoreCompile target) -> ConfigManager.cs(4,17): error CS0234: The type or namespace name 'Abstractions' does not exist in the namespace 'System.IO' (are you missing an assembly reference?) FanControlConfigManager.cs(8,17): error CS0234: The type or namespace name 'Abstractions' does not exist in the namespace 'System.IO' (are you missing an assembly reference?) ConfigManager.cs(69,81): error CS0246: The type or namespace name 'IFileSystem' could not be found (are you missing a using directive or an assembly reference?) FanControlConfigManager.cs(52,91): error CS0246: The type or namespace name 'IFileSystem' could not be found (are you missing a using directive or an assembly reference?) ConfigManager.cs(29,17): error CS0246: The type or namespace name 'IFileSystem' could not be found (are you missing a using directive or an assembly reference?) 4 Warning(s) 5 Error(s) Time Elapsed 00:00:05.3159780 ``` And since the Assembly references were *still* an issue, I checked out version `1.5.0` and got these errors instead... ``` Build FAILED. Warnings: /opt/nbfc/Windows/Setup/NbfcSetup/NbfcSetup.wixproj: warning : Could notnbfc find project file /usr/lib/mono/xbuild/Microsoft/WiX/v3.x/Wix.targets, to import. Ignoring. /opt/nbfc/Windows/Setup/NbfcBootstrapper/NbfcBootstrapper.wixproj: warning : Could not find project file /usr/lib/mono/xbuild/Microsoft/WiX/v3.x/Wix.targets, to import. Ignoring. /opt/nbfc/Windows/Setup/DriverSetupWixAction/DriverSetupWixAction.csproj: warning : Could not find project file /usr/lib/mono/xbuild/Microsoft/WiX/v3.x/Wix.CA.targets, to import. Ignoring. Errors: /opt/nbfc/NoteBookFanControl.sln (Build) -> (Build target) -> /opt/nbfc/Tests/StagWare.FanControl.Tests/StagWare.FanControl.Tests.csproj (default targets) -> (EnsureNuGetPackageBuildImports target) -> /opt/nbfc/Tests/StagWare.FanControl.Tests/StagWare.FanControl.Tests.csproj: error : This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is ../../packages/xunit.runner.visualstudio.2.1.0/build/net20/xunit.runner.visualstudio.props. /opt/nbfc/NoteBookFanControl.sln (Build) -> (Build target) -> /opt/nbfc/Tests/StagWare.FanControl.Tests/StagWare.FanControl.Tests.csproj (default targets) -> /usr/lib/mono/xbuild/14.0/bin/Microsoft.Common.targets (_RecordCleanFile target) -> /usr/lib/mono/xbuild/14.0/bin/Microsoft.Common.targets: error : Could not find a part of the path "/opt/nbfc/Tests/StagWare.FanControl.Tests/obj/Release/StagWare.FanControl.Tests.csproj.FilesWrittenAbsolute.txt". at System.IO.FileStream..ctor (System.String path, System.IO.FileMode mode, System.IO.FileAccess access, System.IO.FileShare share, System.Int32 bufferSize, System.Boolean anonymous, System.IO.FileOptions options) [0x00164] in <71d8ad678db34313b7f718a414dfcb25>:0 at System.IO.FileStream..ctor (System.String path, System.IO.FileMode mode, System.IO.FileAccess access, System.IO.FileShare share, System.Int32 bufferSize, System.IO.FileOptions options, System.String msgPath, System.Boolean bFromProxy, System.Boolean useLongPath, System.Boolean checkHost) [0x00000] in <71d8ad678db34313b7f718a414dfcb25>:0 at (wrapper remoting-invoke-with-check) System.IO.FileStream..ctor(string,System.IO.FileMode,System.IO.FileAccess,System.IO.FileShare,int,System.IO.FileOptions,string,bool,bool,bool) at System.IO.StreamWriter.CreateFile (System.String path, System.Boolean append, System.Boolean checkHost) [0x0001c] in <71d8ad678db34313b7f718a414dfcb25>:0 at System.IO.StreamWriter..ctor (System.String path, System.Boolean append, System.Text.Encoding encoding, System.Int32 bufferSize, System.Boolean checkHost) [0x00055] in <71d8ad678db34313b7f718a414dfcb25>:0 at System.IO.StreamWriter..ctor (System.String path, System.Boolean append, System.Text.Encoding encoding, System.Int32 bufferSize) [0x00000] in <71d8ad678db34313b7f718a414dfcb25>:0 at System.IO.StreamWriter..ctor (System.String path, System.Boolean append) [0x00008] in <71d8ad678db34313b7f718a414dfcb25>:0 at (wrapper remoting-invoke-with-check) System.IO.StreamWriter..ctor(string,bool) at Microsoft.Build.Tasks.WriteLinesToFile.Execute () [0x0002e] in <2c8cd2f40cfb41ccb654d47f8f82b706>:0 3 Warning(s) 2 Error(s) Time Elapsed 00:00:13.1279000 ``` How can I build this thing on Linux?
kerem 2026-02-26 00:32:44 +03:00
  • closed this issue
  • added the
    Stale
    label
Author
Owner

@mfdewit commented on GitHub (Oct 22, 2018):

I had the same error. On my machine this was caused by the wget binary not being present inside the docker container. After installing it (apt update && apt install wget), the error was gone.

<!-- gh-comment-id:431963140 --> @mfdewit commented on GitHub (Oct 22, 2018): I had the same error. On my machine this was caused by the wget binary not being present inside the docker container. After installing it (apt update && apt install wget), the error was gone.
Author
Owner

@JimboJoe commented on GitHub (Nov 24, 2018):

That did the trick for me, thanks (that should ideally be added to the wiki)!

<!-- gh-comment-id:441395250 --> @JimboJoe commented on GitHub (Nov 24, 2018): That did the trick for me, thanks (that should ideally be added to the wiki)!
Author
Owner

@github-actions[bot] commented on GitHub (Nov 25, 2019):

This issue is stale because it has been open more than 180 days with no activity. If nobody comments within 7 days, this issue will be closed

<!-- gh-comment-id:557943414 --> @github-actions[bot] commented on GitHub (Nov 25, 2019): This issue is stale because it has been open more than 180 days with no activity. If nobody comments within 7 days, this issue will be closed
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/nbfc-hirschmann#470
No description provided.