net core referenced in GDAL

<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>

<OutputType>Exe</OutputType>

<TargetFramework>netcoreapp2.1</TargetFramework>

<!-- <RestoreSources>.\bin\Debug\</RestoreSources> -->

</PropertyGroup>

<ItemGroup>

<Reference Include="OSGeo.GDAL">

<HintPath>D:\Project\CSharp\Test\GDAL\Encoder\bin\gdalconst_wrap.dll</HintPath>

</Reference>

</ItemGroup>

<ItemGroup>

<Reference Include="OSGeo.GDAL">

<HintPath>D:\Project\CSharp\Test\GDAL\Encoder\bin\gdalconst_csharp.dll</HintPath>

</Reference>

</ItemGroup>

<ItemGroup>

<Reference Include="OSGeo.OSR">

<HintPath>D:\Project\CSharp\Test\GDAL\Encoder\bin\osr_wrap.dll</HintPath>

</Reference>

</ItemGroup>

<ItemGroup>

<Reference Include="OSGeo.OSR">

<HintPath>D:\Project\CSharp\Test\GDAL\Encoder\bin\osr_csharp.dll</HintPath>

</Reference>

</ItemGroup>

<ItemGroup>

<Reference Include="OSGeo.OGR">

<HintPath>D:\Project\CSharp\Test\GDAL\Encoder\bin\ogr_wrap.dll</HintPath>

</Reference>

</ItemGroup>

<ItemGroup>

<Reference Include="OSGeo.OGR">

<HintPath>D:\Project\CSharp\Test\GDAL\Encoder\bin\ogr_csharp.dll</HintPath>

</Reference>

</ItemGroup>

<ItemGroup>

<Reference Include="OSGeo.GDAL">

<HintPath>D:\Project\CSharp\Test\GDAL\Encoder\bin\gdal_wrap.dll</HintPath>

</Reference>

</ItemGroup>

<ItemGroup>

<Reference Include="OSGeo.GDAL">

<HintPath>D:\Project\CSharp\Test\GDAL\Encoder\bin\gdal_csharp.dll</HintPath>

</Reference>

</ItemGroup>

</Project>


Then copy all the dll gdal to the next bin \ Debug \ netcoreapp2.1 directory

Guess you like

Origin www.cnblogs.com/gispathfinder/p/11225686.html