Instructions to build on Linux
Opened this issue · 6 comments
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.
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>
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
@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 sorry, I meant apiproject.csproj. PortabilityTools.sln contains VS extension projects, which are full .NET Framework projects and are not supported on Linux.
Command dotnet build -f netcoreapp2.1 src/ApiPort/ApiPort/ApiPort.csproj
works for me
Closing as API Port was deprecated in favor of binary analysis in .NET Upgrade Assistant.