ikvmnet / ikvm

A Java Virtual Machine and Bytecode-to-IL Converter for .NET
Other
1.15k stars 110 forks source link

How do I configure IKVM to only output Windows x64 folders? #449

Closed catmanjan closed 7 months ago

catmanjan commented 7 months ago

Hello, we have an IKVM project which is running well - we only support Windows but I noticed in our bin folder there is a folder for all sorts of targets - what do I need to do so that only windows x64 folders are emitted?

image

wasabii commented 7 months ago

Publish the project with a specific RID.

catmanjan commented 7 months ago

RID

Thanks, here is a snippet of the csproj file:


  <PropertyGroup>
    <TargetFramework>net6.0</TargetFramework>
    <Nullable>enable</Nullable>
    <ImplicitUsings>enable</ImplicitUsings>
    <UserSecretsId>afca5226-877e-4029-9cf5-e1450727a22e</UserSecretsId>
    <DockerDefaultTargetOS>Windows</DockerDefaultTargetOS>
    <ErrorOnDuplicatePublishOutputFiles>false</ErrorOnDuplicatePublishOutputFiles>
    <RuntimeIdentifier>win-x64</RuntimeIdentifier>
  </PropertyGroup>

However it still has all the IKVM runtimes

zznty commented 7 months ago

However it still has all the IKVM runtimes

specifying rid changes build path. by default it is bin/Debug/win-x64/

catmanjan commented 7 months ago

@zznty yes, but within that win-x64 folder is all of IKVMs supported architectures dependencies - how can I get these to be excluded?

wasabii commented 7 months ago

Hey. I do believe this was fixed on the main branch. But I haven't been able to do a release in awhile. Been pretty busy.

catmanjan commented 7 months ago

@wasabii thanks, I'll wait for the next release when you have time

wasabii commented 7 months ago

This should be resolved in 8.7.3.

Only the ikvm/ runtime image for the nearest compatible target RID should be included for publish output where the RID is known. With the exception of win-x86 with Prefer32Bit false. In that case, both win-x86 and win-x64 are included.