No less `csc` works on Mono

Asked

Viewed 115 times

0

Mono is a set of build tools. Before and after version 5.0, the Mono tools never worked, except csc. To clarify, although the version is not related to the problem, since the version 5.0 Mono has integrated tools from . NET, such as msbuild, nuget etc. and obsoleting some (xbuild and maybe more). Mono also has the tool mkbundle that does not work properly today... Everything from Windows 8(.1) to Windows 10, to me Mono has never done anything.

The mkbundle exports applications to executables, installers, etc.. Now it works instead of giving export error, but it generates failed executables that print Error mapping file: No error instead of Olá, mundo!.

msbuild failure to:

TurboCS.csproj(11,9): error MSB6006: "csc.exe" foi encerrado com o código 1.

Full log:

Compilação de 28/10/2018 08:03:33 iniciada.
Projeto "D:\home\hydroper\Sources\CS\MyTools\$Withdrawn-TurboCS\TurboCS.csproj" no nó 1 (destinos padrão).
Build:
  C:\Program Files\Mono\lib\mono\msbuild\15.0\bin\Roslyn\csc.exe /out:targetTurboCS.exe src\Entry.cs
D:\home\hydroper\Sources\CS\MyTools\$Withdrawn-TurboCS\TurboCS.csproj(11,9): error MSB6006: "csc.exe" foi encerrado com
 o código 1.
Projeto de compilação pronto "D:\home\hydroper\Sources\CS\MyTools\$Withdrawn-TurboCS\TurboCS.csproj" (destinos padrão)
-- FALHA.


FALHA da compilação.

"D:\home\hydroper\Sources\CS\MyTools\$Withdrawn-TurboCS\TurboCS.csproj" (destino padrão) (1) ->
(Build destino) ->
  D:\home\hydroper\Sources\CS\MyTools\$Withdrawn-TurboCS\TurboCS.csproj(11,9): error MSB6006: "csc.exe" foi encerrado c
om o código 1.

    0 Aviso(s)
    1 Erro(s)

Tempo Decorrido 00:00:00.98

And here my Csproj, according to the documentation:

<Project DefaultTargets='Build' xmlns='http://schemas.microsoft.com/developer/msbuild/2003'>
    <PropertyGroup>
        <AssemblyName>TurboCS</AssemblyName>
        <OutputPath>target</OutputPath>
    </PropertyGroup>
    <ItemGroup>
        <Compile Include='src/*.cs'/>
    </ItemGroup>
    <Target Name='Build'>
        <MakeDir Directories="$(OutputPath)" Condition="!Exists('$(OutputPath)')"/>
        <Csc Sources="@(Compile)" OutputAssembly="$(OutputPath)$(AssemblyName).exe"/>
    </Target>
    <Target Name='Clean'>
        <Delete Files="$(OutputPath)$(AssemblyName).exe"/>
    </Target>
    <Target Name='Rebuild' DependsOnTargets='Clean;Build'/>
</Project>

Any idea?

  • 1

    Did the answer resolve what was in doubt? Do you need something else to be improved? Do you think it is possible to accept it now?

1 answer

2

No, Mono is the equivalent of . NET originally created to run on other platforms, and have an alternative implementation with different features. Today it is less necessary because o . NET has virtually everything Mono had.

The way to build applications in Mono is different from . NET, there is no compromise with the compatibility between them, are different tools that should be used differently. Some things can be compatible. And of course, the code is compatible.

Important reading: The . NET Framework is dead?.

  • Yes, but Mono recently brought Visual Studio tools into it, like Msbuild, and marked Xbuild as obsolete, for example. Mono has nothing to do with . NET, I understand, but my project is not . NET in the case. :/

  • Which is not to say that it is all compatible, you have to understand the differences of how to operate in each one. You asked why.

  • Msbuild and all the other tools I mentioned are build tools, not execution tools etc. However, since the version 5.0.0, Mono brought tools from the . NET SDK to you, and deprecated the same Xbuild. Msbuild on Mono is exactly the same thing documented at Microsoft.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.