yar229 / WebDavMailRuCloud

WebDAV cloud.mail.ru ...& Yandex.Disk | WebDAV Облако Mail.Ru Сетевой Диск
MIT License
485 stars 58 forks source link

Не собирается под mono #81

Closed powerman closed 6 years ago

powerman commented 7 years ago

Я только что попытался собрать 1.5.65 под тремя разными версиями mono (4.8.0.425, 4.8.0.524, 4.6.1.5-r1) и все упали с одной и той же ошибкой. Раньше 1.5.59 собиралась без проблем под 4.8.0.425.

Я запускаю:

nuget restore WebDAVMailRuCloud.sln
xbuild /property:Configuration=Release

и получаю:

>>> Preparing source in /var/tmp/portage/net-fs/wdmrc-1.5.65/work/wdmrc-1.5.65 ...
Installing 'log4net 2.0.7'.
Installing 'CommandLineParser 2.1.1-beta'.
Successfully installed 'CommandLineParser 2.1.1-beta'.
Successfully installed 'log4net 2.0.7'.
>>> Source prepared.
>>> Configuring source in /var/tmp/portage/net-fs/wdmrc-1.5.65/work/wdmrc-1.5.65 ...
>>> Source configured.
>>> Compiling source in /var/tmp/portage/net-fs/wdmrc-1.5.65/work/wdmrc-1.5.65 ...
XBuild Engine Version 14.0
Mono, Version 4.8.0.0
Copyright (C) 2005-2013 Various Mono authors

Build started 05/05/2017 16:41:31.
__________________________________________________
/var/tmp/portage/net-fs/wdmrc-1.5.65/work/wdmrc-1.5.65/WebDAVMailRuCloud.sln:  warning : /var/tmp/portage/net-fs/wdmrc-1.5.65/work/wdmrc-1.5.65/NWebDAV/NWebDav.Server/NWebDav.Server.csproj: The default XML namespace of the project must be the MSBuild XML namespace. If the project is authored in the MSBuild 2003 format, please add xmlns="http://schemas.microsoft.com/developer/msbuild/2003" to the <Project> element. If the project has been authored in the old 1.0 or 1.2 format, please convert it to MSBuild 2003 format.  
/var/tmp/portage/net-fs/wdmrc-1.5.65/work/wdmrc-1.5.65/WebDAVMailRuCloud.sln:  warning : /var/tmp/portage/net-fs/wdmrc-1.5.65/work/wdmrc-1.5.65/NWebDAV/NWebDav.Server.HttpListener/NWebDav.Server.HttpListener.csproj: The default XML namespace of the project must be the MSBuild XML namespace. If the project is authored in the MSBuild 2003 format, please add xmlns="http://schemas.microsoft.com/developer/msbuild/2003" to the <Project> element. If the project has been authored in the old 1.0 or 1.2 format, please convert it to MSBuild 2003 format.  
Project "/var/tmp/portage/net-fs/wdmrc-1.5.65/work/wdmrc-1.5.65/WebDAVMailRuCloud.sln" (default target(s)):
    Target ValidateSolutionConfiguration:
        Building solution configuration "Release|Any CPU".
    Target Build:
        Project "/var/tmp/portage/net-fs/wdmrc-1.5.65/work/wdmrc-1.5.65/MailRuNetCloudClient/MailRuCloudApi/MailRuCloudApi.csproj" (default target(s)):
            Target PrepareForBuild:
                Configuration: Release Platform: AnyCPU
                Created directory "bin/Release/"
                Created directory "obj/Release/"
            Target CopyFilesMarkedCopyLocal:
                Copying file from '/var/tmp/portage/net-fs/wdmrc-1.5.65/work/wdmrc-1.5.65/MailRuNetCloudClient/MailRuCloudApi/Packages/Json.NET/Newtonsoft.Json.dll' to '/var/tmp/portage/net-fs/wdmrc-1.5.65/work/wdmrc-1.5.65/MailRuNetCloudClient/MailRuCloudApi/bin/Release/Newtonsoft.Json.dll'
            Target GenerateSatelliteAssemblies:
            No input files were specified for target GenerateSatelliteAssemblies, skipping.
            Target CoreCompile:
                Tool /usr/lib64/mono/4.5/mcs.exe execution started with arguments: /noconfig /debug:pdbonly /optimize+ /out:obj/Release/MailRuCloudApi.dll AccountInfo.cs Api/Account.cs Api/ConstSettings.cs Api/DownloadStream.cs Api/Requests/LoginRequest.cs Api/SplittedUploadStream.cs Api/UploadStream.cs CarotCryptStream.cs DiskUsage.cs Entry.cs Extensions/DtoImport.cs Extensions/Extensions.cs File.cs FileSize.cs Folder.cs MailRuCloudApi.cs Api/CloudApi.cs Api/Requests/AccountInfoRequest.cs Api/Requests/AuthTokenRequest.cs Api/Requests/CloneItemRequest.cs Api/Requests/CreateFileRequest.cs Api/Requests/CreateFolderRequest.cs Api/Requests/EnsureSdcCookieRequest.cs Api/Requests/FolderInfoRequest.cs Api/Requests/BaseRequest.cs Api/Requests/MoveOrCopyRequest.cs Api/Requests/RemoveRequest.cs Api/Requests/RenameRequest.cs Api/Requests/ShardInfoRequest.cs Api/Requests/Types/AccountInfoResult.cs Api/Requests/Types/AuthTokenResult.cs Api/Requests/Types/CloneItemResult.cs Api/Requests/Types/FolderInfoResult.cs Api/Requests/RequestException.cs Api/Requests/RequestResponse.cs Api/Requests/Types/MoveOrCopyResult.cs Api/Requests/Types/ShardInfoResult.cs Api/Requests/Types/UnknownResult.cs Api/RingBufferedStream.cs ShardType.cs SpecialCommand.cs Properties/AssemblyInfo.cs ShardInfo.cs SplittedCloud.cs SplittedFile.cs WebDavPath.cs obj/Release/.NETFramework,Version=v4.5.AssemblyAttribute.cs /target:library /define:TRACE /nostdlib /reference:Packages/Json.NET/Newtonsoft.Json.dll /reference:/usr/lib64/mono/4.5-api/System.dll /reference:/usr/lib64/mono/4.5-api/System.Core.dll /reference:/usr/lib64/mono/4.5-api//mscorlib.dll /warn:4
Api/DownloadStream.cs(50,36): warning CS1998: Async block lacks `await' operator and will run synchronously
Api/DownloadStream.cs(45,17): warning CS0219: The variable `t' is assigned but its value is never used
Api/UploadStream.cs(133,50): warning CS0168: The variable `ex' is declared but never used
            Target DeployOutputFiles:
                Copying file from '/var/tmp/portage/net-fs/wdmrc-1.5.65/work/wdmrc-1.5.65/MailRuNetCloudClient/MailRuCloudApi/obj/Release/MailRuCloudApi.dll.mdb' to '/var/tmp/portage/net-fs/wdmrc-1.5.65/work/wdmrc-1.5.65/MailRuNetCloudClient/MailRuCloudApi/bin/Release/MailRuCloudApi.dll.mdb'
                Copying file from '/var/tmp/portage/net-fs/wdmrc-1.5.65/work/wdmrc-1.5.65/MailRuNetCloudClient/MailRuCloudApi/obj/Release/MailRuCloudApi.dll' to '/var/tmp/portage/net-fs/wdmrc-1.5.65/work/wdmrc-1.5.65/MailRuNetCloudClient/MailRuCloudApi/bin/Release/MailRuCloudApi.dll'
        Done building project "/var/tmp/portage/net-fs/wdmrc-1.5.65/work/wdmrc-1.5.65/MailRuNetCloudClient/MailRuCloudApi/MailRuCloudApi.csproj".
/var/tmp/portage/net-fs/wdmrc-1.5.65/work/wdmrc-1.5.65/NWebDAV/NWebDav.Server/NWebDav.Server.csproj: error : /var/tmp/portage/net-fs/wdmrc-1.5.65/work/wdmrc-1.5.65/NWebDAV/NWebDav.Server/NWebDav.Server.csproj: The default XML namespace of the project must be the MSBuild XML namespace. If the project is authored in the MSBuild 2003 format, please add xmlns="http://schemas.microsoft.com/developer/msbuild/2003" to the <Project> element. If the project has been authored in the old 1.0 or 1.2 format, please convert it to MSBuild 2003 format.  
/var/tmp/portage/net-fs/wdmrc-1.5.65/work/wdmrc-1.5.65/NWebDAV/NWebDav.Server.HttpListener/NWebDav.Server.HttpListener.csproj: error : /var/tmp/portage/net-fs/wdmrc-1.5.65/work/wdmrc-1.5.65/NWebDAV/NWebDav.Server.HttpListener/NWebDav.Server.HttpListener.csproj: The default XML namespace of the project must be the MSBuild XML namespace. If the project is authored in the MSBuild 2003 format, please add xmlns="http://schemas.microsoft.com/developer/msbuild/2003" to the <Project> element. If the project has been authored in the old 1.0 or 1.2 format, please convert it to MSBuild 2003 format.  
    Task "MSBuild" execution -- FAILED
    Done building target "Build" in project "/var/tmp/portage/net-fs/wdmrc-1.5.65/work/wdmrc-1.5.65/WebDAVMailRuCloud.sln".-- FAILED
Done building project "/var/tmp/portage/net-fs/wdmrc-1.5.65/work/wdmrc-1.5.65/WebDAVMailRuCloud.sln".-- FAILED

Build FAILED.

Warnings:

/var/tmp/portage/net-fs/wdmrc-1.5.65/work/wdmrc-1.5.65/WebDAVMailRuCloud.sln:  warning : /var/tmp/portage/net-fs/wdmrc-1.5.65/work/wdmrc-1.5.65/NWebDAV/NWebDav.Server/NWebDav.Server.csproj: The default XML namespace of the project must be the MSBuild XML namespace. If the project is authored in the MSBuild 2003 format, please add xmlns="http://schemas.microsoft.com/developer/msbuild/2003" to the <Project> element. If the project has been authored in the old 1.0 or 1.2 format, please convert it to MSBuild 2003 format.  
/var/tmp/portage/net-fs/wdmrc-1.5.65/work/wdmrc-1.5.65/WebDAVMailRuCloud.sln:  warning : /var/tmp/portage/net-fs/wdmrc-1.5.65/work/wdmrc-1.5.65/NWebDAV/NWebDav.Server.HttpListener/NWebDav.Server.HttpListener.csproj: The default XML namespace of the project must be the MSBuild XML namespace. If the project is authored in the MSBuild 2003 format, please add xmlns="http://schemas.microsoft.com/developer/msbuild/2003" to the <Project> element. If the project has been authored in the old 1.0 or 1.2 format, please convert it to MSBuild 2003 format.  

/var/tmp/portage/net-fs/wdmrc-1.5.65/work/wdmrc-1.5.65/WebDAVMailRuCloud.sln (default targets) ->
(Build target) ->
/var/tmp/portage/net-fs/wdmrc-1.5.65/work/wdmrc-1.5.65/MailRuNetCloudClient/MailRuCloudApi/MailRuCloudApi.csproj (default targets) ->
/usr/lib64/mono/xbuild/14.0/bin/Microsoft.CSharp.targets (CoreCompile target) ->

    Api/DownloadStream.cs(50,36): warning CS1998: Async block lacks `await' operator and will run synchronously
    Api/DownloadStream.cs(45,17): warning CS0219: The variable `t' is assigned but its value is never used
    Api/UploadStream.cs(133,50): warning CS0168: The variable `ex' is declared but never used

Errors:

/var/tmp/portage/net-fs/wdmrc-1.5.65/work/wdmrc-1.5.65/WebDAVMailRuCloud.sln (default targets) ->
(Build target) ->

    /var/tmp/portage/net-fs/wdmrc-1.5.65/work/wdmrc-1.5.65/NWebDAV/NWebDav.Server/NWebDav.Server.csproj: error : /var/tmp/portage/net-fs/wdmrc-1.5.65/work/wdmrc-1.5.65/NWebDAV/NWebDav.Server/NWebDav.Server.csproj: The default XML namespace of the project must be the MSBuild XML namespace. If the project is authored in the MSBuild 2003 format, please add xmlns="http://schemas.microsoft.com/developer/msbuild/2003" to the <Project> element. If the project has been authored in the old 1.0 or 1.2 format, please convert it to MSBuild 2003 format.  
    /var/tmp/portage/net-fs/wdmrc-1.5.65/work/wdmrc-1.5.65/NWebDAV/NWebDav.Server.HttpListener/NWebDav.Server.HttpListener.csproj: error : /var/tmp/portage/net-fs/wdmrc-1.5.65/work/wdmrc-1.5.65/NWebDAV/NWebDav.Server.HttpListener/NWebDav.Server.HttpListener.csproj: The default XML namespace of the project must be the MSBuild XML namespace. If the project is authored in the MSBuild 2003 format, please add xmlns="http://schemas.microsoft.com/developer/msbuild/2003" to the <Project> element. If the project has been authored in the old 1.0 or 1.2 format, please convert it to MSBuild 2003 format.  

     5 Warning(s)
     2 Error(s)

Time Elapsed 00:00:01.2376850
yar229 commented 7 years ago

В проект была включена библиотека под .NET Standart

Попробуйте Mono 5

powerman commented 7 years ago

Он вышел всего несколько дней назад, пакета для Gentoo пока нет, так что придётся ждать. Но если для сборки теперь нужен mono-5 то это не очень хорошая новость, потому что в большинстве дистрибутивов он может появиться года через полтора.

yar229 commented 6 years ago

Под Ubuntu 14.04.5 LTS и Mono 5.4.0.201 все ок. Так же случился переезд проекта под .NET Core 2.0

Надеюсь, Gentoo однажды догонит, а т.к. мосты обратно пожжены напрочь, то, к сожалению, закрываю тему.

gasinvein commented 6 years ago

случился переезд проекта под .NET Core 2.

@yar229 т.е. с Mono собрать невозможно? У меня на openSUSE с Mono 5.4.0 и xbuild 14.0 такие же ошибки:

/home/gasinvein/.local/src/WebDavMailRuCloud/MailRuCloud/MailRuCloudApi/MailRuCloudApi.csproj: error : /home/gasinvein/.local/src/WebDavMailRuCloud/MailRuCloud/MailRuCloudApi/MailRuCloudApi.csproj: The default XML namespace of the project must be the MSBuild XML namespace. If the project is authored in the MSBuild 2003 format, please add xmlns="http://schemas.microsoft.com/developer/msbuild/2003" to the <Project> element. If the project has been authored in the old 1.0 or 1.2 format, please convert it to MSBuild 2003 format.
yar229 commented 6 years ago

Попробуйте msbuild /t:"Restore;Build" /p:Configuration="Release" /p:Platform="Any CPU" WebDAVMailRuCloud.sln

yar229 commented 6 years ago

Вот здесь есть подробный лог, как собирается (и xbuild там тоже 14.0, и с ним тоже не работает)

yar229 commented 6 years ago

Вообще, рекомендую перейти под .NET Core