compomics / ThermoRawFileParser

Thermo RAW file parser that runs on Linux/Mac and all other platforms that support Mono
Apache License 2.0
183 stars 48 forks source link

v1.3.3 Fails Compilation on Linux #110

Open mwang87 opened 3 years ago

mwang87 commented 3 years ago

The following commands:

git clone -b master --single-branch https://github.com/compomics/ThermoRawFileParser --branch v1.3.3 /src
xbuild

Yield the following error


        Writer/MetadataWriter.cs(421,51): error CS0012: The type 'Enum' is defined in an assembly that is not referenced. You must add a reference to assembly 'netstandard, Version=2.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51'.
        Writer/MgfSpectrumWriter.cs(204,52): error CS0012: The type 'Enum' is defined in an assembly that is not referenced. You must add a reference to assembly 'netstandard, Version=2.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51'.
        Writer/MzMlSpectrumWriter.cs(1915,97): error CS0012: The type 'Enum' is defined in an assembly that is not referenced. You must add a reference to assembly 'netstandard, Version=2.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51'.
        Writer/MzMlSpectrumWriter.cs(40,37): error CS0012: The type 'Enum' is defined in an assembly that is not referenced. You must add a reference to assembly 'netstandard, Version=2.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51'.
        Writer/MzMlSpectrumWriter.cs(44,37): error CS0012: The type 'Enum' is defined in an assembly that is not referenced. You must add a reference to assembly 'netstandard, Version=2.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51'.
        Writer/OntologyMapping.cs(14,43): error CS0012: The type 'Enum' is defined in an assembly that is not referenced. You must add a reference to assembly 'netstandard, Version=2.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51'.
        Writer/OntologyMapping.cs(85,43): error CS0012: The type 'Enum' is defined in an assembly that is not referenced. You must add a reference to assembly 'netstandard, Version=2.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51'.
        Writer/OntologyMapping.cs(156,43): error CS0012: The type 'Enum' is defined in an assembly that is not referenced. You must add a reference to assembly 'netstandard, Version=2.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51'.
        Writer/ParquetSpectrumWriter.cs(25,37): error CS0012: The type 'Enum' is defined in an assembly that is not referenced. You must add a reference to assembly 'netstandard, Version=2.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51'.
        Writer/ParquetSpectrumWriter.cs(28,37): error CS0012: The type 'Enum' is defined in an assembly that is not referenced. You must add a reference to assembly 'netstandard, Version=2.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51'.

         2 Warning(s)
         10 Error(s)

v1.3.2 does not cause this issue.

nielshulstaert commented 3 years ago

Thanks for reporting this, I'll have a look at it and get back to you.

nielshulstaert commented 3 years ago

I have the same problem with an old mono version (4.6.2) from the Ubuntu repositories. It works with the latest mono version (6.12.0) from the official mono repository. I'll have a look to make it work again on older mono versions. Suggestions are welcome.

caetera commented 3 years ago

Can it be because Mono 4.6.2 do not support NET Standard 2.0?

https://docs.microsoft.com/en-us/dotnet/standard/net-standard

nielshulstaert commented 3 years ago

Yes indeed, there should be a version of the thermo libraries that don't use .net standard, I'll try to get it so it still works on older mono versions.

nielshulstaert commented 3 years ago

Hi I don't have access to the new version of the thermo libraries without .net standard, but it should work for mono 5 and higher. If you can't upgrade mono, I can make branch that use the previous thermo libraries, let me know.

zslastman commented 3 years ago

So I'm still getting this bug, and am using mono 6.12.0 (Installed with conda, though I get it if I use the mono .pkg installer on my mac laptop instead).

I also get issues with 1.3.2:


        /fast/home/d/dharnet/miniconda3/envs/mono/lib/mono/xbuild/14.0/bin/Microsoft.Common.targets:  warning : TargetFrameworkVersion 'v4.7.2' not supported by this toolset (ToolsVersion: 14.0).```

 though I do end up with a usable binary at `./bin/x64/Debug/ThermoRawFileParser.exe`
caetera commented 1 year ago

I have stumbled upon this issue and have a suggestion. Can it be that the compilation problem can be solved by switching from xbuild to msbuild? See #138