dotnet-apiport icon indicating copy to clipboard operation
dotnet-apiport copied to clipboard

Instructions to build on Linux

Open ghost opened this issue 5 years ago • 5 comments
trafficstars

Hello, from what I've read in the README file the ApiPort Console application should be compatible with Linux but I'm having an hard time looking for the instructions to build the application on a Linux platform. I'm currently on Ubuntu 19.10.

Thanks for your help.

ghost avatar Jun 10 '20 11:06 ghost

Would be helpful if you added some specifics about the issues you're having.

For example, I was able to get it to build by adding this to ApiPort.props

  <ItemGroup Condition="'$(OS)' == 'Unix'">
    <PackageReference Include="Microsoft.NETFramework.ReferenceAssemblies" PrivateAssets="All" Version="1.0.0" />
  </ItemGroup>

Source

I also had to install dotnet sdks 3.1.201 and 2.1.805

wget https://dot.net/v1/dotnet-install.sh && chmod +x ./dotnet-install.sh
./dotnet-install.sh --version 3.1.201 # for build
./dotnet-install.sh --version 2.1.805 # for runtime

bashenk avatar Jun 16 '20 18:06 bashenk

@bashenk did you use dotnet build dotnet build PortabilityTools.sln to build?

Lxiamail avatar Jun 17 '20 00:06 Lxiamail

@Lxiamail No. And trying dotnet build PortabilityTools.sln right now gives me many the following error:

$HOME/.dotnet/sdk/3.1.201/Microsoft.Common.CurrentVersion.targets(1177,5): error MSB3644: The reference assemblies for .NETFramework,Version=v4.6.1 were not found. To resolve this, install the Developer Pack (SDK/Targeting Pack) for this framework version or retarget your application

I was building using dotnet build src/ApiPort/ApiPort/ApiPort.csproj per the main README.md

bashenk avatar Jun 17 '20 15:06 bashenk

@bashenk sorry, I meant apiproject.csproj. PortabilityTools.sln contains VS extension projects, which are full .NET Framework projects and are not supported on Linux.

Lxiamail avatar Jun 17 '20 17:06 Lxiamail

Command dotnet build -f netcoreapp2.1 src/ApiPort/ApiPort/ApiPort.csproj works for me

pro2s avatar Jul 08 '20 12:07 pro2s

Closing as API Port was deprecated in favor of binary analysis in .NET Upgrade Assistant.

terrajobst avatar Nov 15 '22 23:11 terrajobst