1

I got lots of assembly not found errors when compiling the Spire project via dotnet build so I installed the package mono-complete as stated here and also exported the variable FrameworkPathOverride=/lib/mono/4.5 as suggested here.Overriding the framework path solved the first assembly not found problems but generated new ones:

CSC : error CS0006: Metadata file '/mscorlib.dll' could not be found [blah-blah-blah.csproj]

The file mscorelib.dll is in /usr/lib/mono/4.5/ and is not a symlink but I don't know why it cannot find that.Also if I change FrameworkPathOverride=/lib/mono/4.5 to FrameworkPathOverride=/usr/lib/mono/4.5 that error disappears and these errors show up:

Spire.cs(19,12): error CS0234: The type or namespace name 'Options' does not exist in the namespace 'Mono' (are you missing an assembly reference?) [Spire-master/Spire/Spire.csproj]
Synthesize.cs(17,17): error CS0234: The type or namespace name 'Z3' does not exist in the namespace 'Microsoft' (are you missing an assembly reference?) [Spire-master/Spire/Spire.csproj]

I've installed both Z3 and Mono.Options before,so the absence of those is not the problem.

BTW I use ubuntu 18.04.

I have little experience using .NET and mono so any help is much appreciated.

Thanks.


EDIT: If I run the build.sh script , I get:

WARNING: Error: SecureChannelFailure (The authentication or decryption has failed.)
Unable to find version '5.3.0.1' of package 'Mono.Options'.
./build.sh: line 4: msbuild: command not found
Parsa Mousavi
  • 1,052
  • 1
  • 13
  • 31
  • Read its build shell script please. It requires Mono, not .NET Core, so you cannot use ˋdotnet build`. – Lex Li Jul 28 '20 at 22:05
  • @LexLi Running ```xbuild``` also throws errors such as ```The type `System.IO.TextWriter' is defined in an assembly that is not referenced. Consider adding a reference to assembly `System.IO```.But ```System.IO``` is already installed by nuget,but is not present in the ```/usr/lib/mono/4.5/``` directory. – Parsa Mousavi Jul 28 '20 at 22:51
  • Please edit the question to show the output when you run `build.sh`. Don't invent your own steps when you have little idea what you are doing. – Lex Li Jul 28 '20 at 23:27
  • @LexLi Added the output. – Parsa Mousavi Jul 29 '20 at 08:20
  • That output indicates a lot of issues. 1) You don't have the latest Mono, so you must upgrade https://www.mono-project.com/download/preview/#download-lin-ubuntu 2) NuGet restore seems to fail, which prevents the actual references from being downloaded. Once you have the latest Mono installed, run `build.sh` again and post its output. – Lex Li Jul 29 '20 at 16:30

0 Answers0