tilialabs / tilia-phoenix-client-csharp

Fully fledged C# client for the tilia Phoenix REST API
Apache License 2.0
4 stars 2 forks source link

build.bat installation doesn't work #1

Open matthewkayy opened 3 years ago

matthewkayy commented 3 years ago

When trying to run the build.bat to install the client there are errors for files not being found, it looks like the bat file is referencing a src\IO.Swagger directory that doesn't exist in the repo:

Feeds used:

All packages listed in C:\Users\mkay\Desktop\tilia-phoenix-client-csharp\src\IO.Swagger\packages.config are already installed.
The system cannot find the path specified.
The system cannot find the path specified.
The system cannot find the path specified.
Microsoft (R) Visual C# Compiler version 4.8.4084.0
for C# 5
Copyright (C) Microsoft Corporation. All rights reserved.

This compiler is provided as part of the Microsoft (R) .NET Framework, but only supports language versions up to C# 5, which is no longer the latest version. For compilers that support newer versions of the C# programming language, see http://go.microsoft.com/fwlink/?LinkID=533240

warning CS2008: No source files specified
error CS0006: Metadata file 'bin\Newtonsoft.Json.dll' could not be found
error CS0006: Metadata file 'bin\JsonSubTypes.dll' could not be found
error CS0006: Metadata file 'bin\RestSharp.dll' could not be found
matthewkayy commented 2 years ago

I've been able to resolve the above error in the build.bat file by replacing IO.Swagger with TiliaLabs.Phoenix:

:: Generated by: https://github.com/swagger-api/swagger-codegen.git
::

@echo off

SET CSCPATH=%SYSTEMROOT%\Microsoft.NET\Framework\v4.0.30319

if not exist ".\nuget.exe" powershell -Command "(new-object System.Net.WebClient).DownloadFile('https://dist.nuget.org/win-x86-commandline/latest/nuget.exe', '.\nuget.exe')"
.\nuget.exe install src\TiliaLabs.Phoenix\packages.config -o packages

if not exist ".\bin" mkdir bin

copy packages\Newtonsoft.Json.10.0.3\lib\net45\Newtonsoft.Json.dll bin\Newtonsoft.Json.dll
copy packages\JsonSubTypes.1.2.0\lib\net45\JsonSubTypes.dll bin\JsonSubTypes.dll
copy packages\RestSharp.105.1.0\lib\net45\RestSharp.dll bin\RestSharp.dll
%CSCPATH%\csc  /reference:bin\Newtonsoft.Json.dll;bin\JsonSubTypes.dll;bin\RestSharp.dll;System.ComponentModel.DataAnnotations.dll  /target:library /out:bin\TiliaLabs.Phoenix.dll /recurse:src\TiliaLabs.Phoenix\*.cs /doc:bin\TiliaLabs.Phoenix.xml

However now I'm getting new errors and still not able to get the TiliaLabs.Phoenix.dll to build, the errors are as below:

Microsoft (R) Visual C# Compiler version 4.8.4084.0
for C# 5
Copyright (C) Microsoft Corporation. All rights reserved.

This compiler is provided as part of the Microsoft (R) .NET Framework, but only supports language versions up to C# 5, which is no longer the latest version. For compilers that support newer versions of the C# programming language, see http://go.microsoft.com/fwlink/?LinkID=533240

src\TiliaLabs.Phoenix\Model\BoundPart.cs(152,48): error CS1519: Invalid token '=' in class, struct, or interface member
        declaration
src\TiliaLabs.Phoenix\Model\BoundPart.cs(152,64): error CS1519: Invalid token ';' in class, struct, or interface member
        declaration
src\TiliaLabs.Phoenix\Model\CustomTiling.cs(36,48): error CS1519: Invalid token '=' in class, struct, or interface
        member declaration
src\TiliaLabs.Phoenix\Model\CustomTiling.cs(36,71): error CS1519: Invalid token ';' in class, struct, or interface
        member declaration
src\TiliaLabs.Phoenix\Model\DateProperty.cs(35,48): error CS1519: Invalid token '=' in class, struct, or interface
        member declaration
src\TiliaLabs.Phoenix\Model\DateProperty.cs(35,63): error CS1519: Invalid token ';' in class, struct, or interface
        member declaration
src\TiliaLabs.Phoenix\Model\DoubleProperty.cs(35,48): error CS1519: Invalid token '=' in class, struct, or interface
        member declaration
src\TiliaLabs.Phoenix\Model\DoubleProperty.cs(35,65): error CS1519: Invalid token ';' in class, struct, or interface
        member declaration
src\TiliaLabs.Phoenix\Model\FixedNumberRule.cs(36,48): error CS1519: Invalid token '=' in class, struct, or interface
        member declaration
src\TiliaLabs.Phoenix\Model\FixedNumberRule.cs(36,70): error CS1519: Invalid token ';' in class, struct, or interface
        member declaration
src\TiliaLabs.Phoenix\Model\FixedSizeRule.cs(36,48): error CS1519: Invalid token '=' in class, struct, or interface
        member declaration
src\TiliaLabs.Phoenix\Model\FixedSizeRule.cs(36,68): error CS1519: Invalid token ';' in class, struct, or interface
        member declaration
src\TiliaLabs.Phoenix\Model\FlatPart.cs(35,48): error CS1519: Invalid token '=' in class, struct, or interface member
        declaration
src\TiliaLabs.Phoenix\Model\FlatPart.cs(35,63): error CS1519: Invalid token ';' in class, struct, or interface member
        declaration
src\TiliaLabs.Phoenix\Model\FoldedPart.cs(35,48): error CS1519: Invalid token '=' in class, struct, or interface member
        declaration
src\TiliaLabs.Phoenix\Model\FoldedPart.cs(35,65): error CS1519: Invalid token ';' in class, struct, or interface member
        declaration
src\TiliaLabs.Phoenix\Model\GapTiling.cs(60,48): error CS1519: Invalid token '=' in class, struct, or interface member
        declaration
src\TiliaLabs.Phoenix\Model\GapTiling.cs(60,62): error CS1519: Invalid token ';' in class, struct, or interface member
        declaration
src\TiliaLabs.Phoenix\Model\IntegerProperty.cs(35,48): error CS1519: Invalid token '=' in class, struct, or interface
        member declaration
src\TiliaLabs.Phoenix\Model\IntegerProperty.cs(35,66): error CS1519: Invalid token ';' in class, struct, or interface
        member declaration
src\TiliaLabs.Phoenix\Model\OverlapTiling.cs(64,48): error CS1519: Invalid token '=' in class, struct, or interface
        member declaration
src\TiliaLabs.Phoenix\Model\OverlapTiling.cs(64,66): error CS1519: Invalid token ';' in class, struct, or interface
        member declaration
src\TiliaLabs.Phoenix\Model\StandardTiling.cs(102,48): error CS1519: Invalid token '=' in class, struct, or interface
        member declaration
src\TiliaLabs.Phoenix\Model\StandardTiling.cs(102,73): error CS1519: Invalid token ';' in class, struct, or interface
        member declaration
src\TiliaLabs.Phoenix\Model\StringProperty.cs(27,48): error CS1519: Invalid token '=' in class, struct, or interface
        member declaration
src\TiliaLabs.Phoenix\Model\StringProperty.cs(27,65): error CS1519: Invalid token ';' in class, struct, or interface
        member declaration
src\TiliaLabs.Phoenix\Model\TextListProperty.cs(35,48): error CS1519: Invalid token '=' in class, struct, or interface
        member declaration
src\TiliaLabs.Phoenix\Model\TextListProperty.cs(35,67): error CS1519: Invalid token ';' in class, struct, or interface
        member declaration
src\TiliaLabs.Phoenix\Model\TiledPart.cs(35,48): error CS1519: Invalid token '=' in class, struct, or interface member
        declaration
src\TiliaLabs.Phoenix\Model\TiledPart.cs(35,64): error CS1519: Invalid token ';' in class, struct, or interface member
        declaration
src\TiliaLabs.Phoenix\Model\VariableSizesRule.cs(36,48): error CS1519: Invalid token '=' in class, struct, or interface
        member declaration
src\TiliaLabs.Phoenix\Model\VariableSizesRule.cs(36,72): error CS1519: Invalid token ';' in class, struct, or interface
        member declaration

Does anybody know how I can resolve this?

matthewkayy commented 2 years ago

Raised PR to fix the original error: https://github.com/tilialabs/tilia-phoenix-client-csharp/pull/2