Fix AssetTargetFallback property in Tizen.NET.targets
[platform/core/csapi/tizenfx.git] / pkg / build / tizen40 / Tizen.NET.targets
index e323041..24a95b6 100644 (file)
@@ -4,23 +4,50 @@
     <MSBuildAllProjects>$(MSBuildAllProjects);$(MSBuildThisFileFullPath)</MSBuildAllProjects>
   </PropertyGroup>
 
+  <PropertyGroup>
+    <BundledNETStandardPackageVersion Condition="'$(BundledNETStandardPackageVersion)' == ''">2.0.0</BundledNETStandardPackageVersion>
+    <BundledNETCoreAppPackageVersion Condition="'$(BundledNETCoreAppPackageVersion)' == ''">2.0.0</BundledNETCoreAppPackageVersion>
+  </PropertyGroup>
+
+  <PropertyGroup>
+    <DisableStandardFrameworkResolution>true</DisableStandardFrameworkResolution>
+    <AutoUnifyAssemblyReferences>true</AutoUnifyAssemblyReferences>
+    <TargetExt Condition="'$(TargetExt)' == ''">.dll</TargetExt>
+    <GenerateDependencyFile Condition=" '$(GenerateDependencyFile)' == '' ">true</GenerateDependencyFile>
+    <CopyLocalLockFileAssemblies Condition="'$(CopyLocalLockFileAssemblies)' == ''">false</CopyLocalLockFileAssemblies>
+  </PropertyGroup>
+
   <!--
     Tizen4.0 TFM supports NETStandard2.0. However NETStandard.Library does not
     provide reference assemblies when referenced by other TFMs.
     So, the same reference assemblies are provided directly from Tizen.NET.
     These reference assemblies came from NETStandard.Library 2.0.0.
   -->
-
-  <ItemGroup>
+  <ItemGroup  Condition="'$(OutputType)' != 'Exe'">
     <Reference Include="$(MSBuildThisFileDirectory)\ref\*.dll">
       <Private>false</Private>
       <Visible>false</Visible>
       <Facade Condition="'%(FileName)' != 'netstandard'">true</Facade>
-      <NuGetPackageId>$(TizenNETPackageName)</NuGetPackageId>
-      <NuGetPackageVersion>$(TizenNETPackageVersion)</NuGetPackageVersion>
+      <NuGetPackageId>NETStandard.Library</NuGetPackageId>
+      <NuGetPackageVersion>$(BundledNETStandardPackageVersion)</NuGetPackageVersion>
     </Reference>
   </ItemGroup>
 
-  <Import Project="$(MSBuildThisFileDirectory)..\Tizen.NET.targets" />
+  <ItemGroup Condition="'$(OutputType)' != 'Exe'">
+    <PackageReference Include="NETStandard.Library" Version="$(BundledNETStandardPackageVersion)" IsImplicitlyDefined="true" />
+  </ItemGroup>
+
+  <!--
+    Tizen platform supports .NETCore 2.0 runtime.
+    In application, NETCoreApp2.0 APIs are also available.
+  -->
+  <PropertyGroup Condition="'$(OutputType)' == 'Exe'">
+    <NoWarn>$(NoWarn);NU1701</NoWarn>
+    <AssetTargetFallback>$(AssetTargetFallback);netcoreapp2.0</AssetTargetFallback>
+  </PropertyGroup>
+
+  <ItemGroup Condition="'$(OutputType)' == 'Exe'">
+    <PackageReference Include="Microsoft.NETCore.App" Version="$(BundledNETCoreAppPackageVersion)" IsImplicitlyDefined="true" />
+  </ItemGroup>
 
 </Project>
\ No newline at end of file