Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SharpProj for platform target x64 #67

Open
torbjornd opened this issue May 27, 2024 · 1 comment
Open

SharpProj for platform target x64 #67

torbjornd opened this issue May 27, 2024 · 1 comment

Comments

@torbjornd
Copy link

Hi.
I'm trying to use this library in an ArcGIS Pro Add-in. The ArcGIS Pro SDK supports only x64, and I'm not able to use this library now. I first got the FileNotFoundException mentioned in #25 and after adding

<ItemGroup> <Content Include="$(NetCoreTargetingPackRoot)\Microsoft.NETCore.App.Host.$(NETCoreSdkRuntimeIdentifier)\$(BundledNETCoreAppPackageVersion)\runtimes\$(NETCoreSdkRuntimeIdentifier)\native\ijwhost.dll" Link="ijwhost.dll"> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> </ItemGroup>

and

<PropertyGroup> <UseIJWHost Condition="'$(TargetFramework)' == 'net8.0'">true</UseIJWHost> </PropertyGroup>

I now get an error saying

System.BadImageFormatException: Could not load file or assembly 'C:...\net8.0\runtimes\win-x64\lib\netcoreapp\SharpProj.dll'. Format of the executable (.exe) or library (.dll) is invalid.

Does SharpProj support x64, or are you going to add this support any time soon?

@silsoe
Copy link

silsoe commented Nov 14, 2024

I believe the reason why it does not support x64 is because this configuration is missing from the project file:
SharpProj.NetTopologySuite.csproj
This project only has the "any CPU". If the x64 configuration is added, the package runs fine on an x64 only project I have created. My project is only running net6.0, so I do not know if there are other net8.0 issues.
It will be really nice it this gets fixed, and a new version of the nuget package is release. This makes maintenance a lot easier in the future.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants