Support .NET 5 prerelease on JCOBridge

Homepage Forum JCOBridge Technical Support Forum Support .NET 5 prerelease on JCOBridge

Questo argomento contiene 0 risposte, ha 1 partecipante, ed è stato aggiornato da  Support 5 mesi fa.

Stai vedendo 1 articolo (di 1 totali)
  • Autore
    Articoli
  • #784 Risposta

    Support
    Membro

    JCOBridge will not support officially .NET 5 until its official release declared on November 2020 (see https://devblogs.microsoft.com/dotnet/introducing-net-5/).
    A workaround to support .NET 5 on JCOBridge is the following one:

    1. browse the folder packages\jcobridge\2.2.1\build and open the file JCOBridge.targets
    2. replace its whole content with the following:
      <Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
          <ItemGroup>
              <net461 Include="$(MSBuildThisFileDirectory)\..\contentFiles\net461\*.*" />
          </ItemGroup>
          <ItemGroup>
              <netcoreapp31 Include="$(MSBuildThisFileDirectory)\..\contentFiles\netcoreapp3.1\*.*" />
              <netcoreapp31winx86 Include="$(MSBuildThisFileDirectory)\..\contentFiles\netcoreapp3.1\win-x86\*.*" />
              <netcoreapp31winx64 Include="$(MSBuildThisFileDirectory)\..\contentFiles\netcoreapp3.1\win-x64\*.*" />
              <netcoreapp31winarm Include="$(MSBuildThisFileDirectory)\..\contentFiles\netcoreapp3.1\win-arm\*.*" />
              <netcoreapp31winarm64 Include="$(MSBuildThisFileDirectory)\..\contentFiles\netcoreapp3.1\win-arm64\*.*" />
              <netcoreapp31linuxx64 Include="$(MSBuildThisFileDirectory)\..\contentFiles\netcoreapp3.1\linux-x64\*.*" />
              <netcoreapp31linuxarm Include="$(MSBuildThisFileDirectory)\..\contentFiles\netcoreapp3.1\linux-arm\*.*" />
              <netcoreapp31linuxarm64 Include="$(MSBuildThisFileDirectory)\..\contentFiles\netcoreapp3.1\linux-arm64\*.*" />
          </ItemGroup>
      
          <Target Condition="$(TargetFramework.Contains('net4'))" Name="CopyFiles461" BeforeTargets="Build"> 
              <Copy SourceFiles="@(net461)" DestinationFolder="$(TargetDir)" />
          </Target>
          <Target Condition="$(TargetFramework.Contains('netcoreapp')) Or $(TargetFramework.Contains('net5'))" Name="CopyFilesCore" BeforeTargets="Build">
              <Copy SourceFiles="@(netcoreapp31)" DestinationFolder="$(TargetDir)" />
              <Copy SourceFiles="@(netcoreapp31winx86)" DestinationFolder="$(TargetDir)/win-x86" />
              <Copy SourceFiles="@(netcoreapp31winx64)" DestinationFolder="$(TargetDir)/win-x64" />
              <Copy SourceFiles="@(netcoreapp31winarm)" DestinationFolder="$(TargetDir)/win-arm" />
              <Copy SourceFiles="@(netcoreapp31winarm64)" DestinationFolder="$(TargetDir)/win-arm64" />
              <Copy SourceFiles="@(netcoreapp31linuxx64)" DestinationFolder="$(TargetDir)/linux-x64" />
              <Copy SourceFiles="@(netcoreapp31linuxarm)" DestinationFolder="$(TargetDir)/linux-arm" />
              <Copy SourceFiles="@(netcoreapp31linuxarm64)" DestinationFolder="$(TargetDir)/linux-arm64" />
          </Target>
      </Project>
      	
    3. rebuild your project which targets .NET 5 (TFM: net5.0)
Stai vedendo 1 articolo (di 1 totali)
Rispondi a: Support .NET 5 prerelease on JCOBridge
Le tue informazioni: