1 <Project DefaultTargets="Build">
3 <Import Project="Sdk.props" Sdk="Microsoft.NET.Sdk" />
5 <Import Project="$(MSBuildThisFileDirectory)directories.props" />
6 <Import Project="$(MSBuildThisFileDirectory)version.props" />
9 <TargetFramework>netstandard1.6</TargetFramework>
10 <GenerateDependencyFile>false</GenerateDependencyFile>
11 <DummyAssemblyVersion>$(VersionPrefix)</DummyAssemblyVersion>
12 <BaseIntermediateOutputPath>$(OutputBaseDir)obj\</BaseIntermediateOutputPath>
13 <OutDir>$(OutputDummyDir)</OutDir>
16 <!-- Properties for directories -->
18 <IntermediateLibDir>$(BaseIntermediateOutputPath)_ref_lib\</IntermediateLibDir>
19 <IntermediateAPIDir>$(BaseIntermediateOutputPath)_ref_api\</IntermediateAPIDir>
22 <!-- Properties for GenAPI tool -->
24 <GenAPICommand>dotnet $(GenAPIDir)GenAPI.exe</GenAPICommand>
27 <!-- Source assemblies -->
29 <TizenAssemblies Include="$(OutputPublicDir)\*.dll" />
30 <TizenAssemblies Include="$(OutputPlatformDir)\*.dll" />
33 <Import Project="Sdk.targets" Sdk="Microsoft.NET.Sdk" />
35 <Target Name="Compile" />
36 <Target Name="CopyFilesToOutputDirectory" />
38 <!-- Target for preparing reference lib directory -->
39 <Target Name="Prepare">
41 <ReferencePath Include="@(TizenAssemblies)" />
43 <MakeDir Directories="$(IntermediateLibDir);$(IntermediateAPIDir)" />
44 <Copy SourceFiles="@(ReferencePath)" DestinationFolder="$(IntermediateLibDir)" />
45 <RemoveDir Directories="$(OutputDummyDir)" />
46 <MakeDir Directories="$(OutputDummyDir)" />
49 <!-- Target for generating *.AssemblyInfo.cs files -->
50 <Target Name="GenerateAsmInfo"
51 Inputs="@(TizenAssemblies)" Outputs="$(IntermediateAPIDir)%(Filename).AssemblyInfo.cs">
54 <GeneratedAssemblyInfoSource>$(IntermediateAPIDir)%(TizenAssemblies.Filename).AssemblyInfo.cs</GeneratedAssemblyInfoSource>
58 <AssemblyInfoLines Include="[assembly:System.Reflection.AssemblyVersion("$(DummyAssemblyVersion)")]" />
62 File="$(GeneratedAssemblyInfoSource)"
63 Lines="@(AssemblyInfoLines)"
67 <FileWrites Include="$(GeneratedAssemblyInfoSource)" />
72 <!-- Target for generating reference source files using GenAPI -->
73 <Target Name="GenerateAPI"
74 Inputs="@(TizenAssemblies)" Outputs="$(IntermediateAPIDir)%(Filename).cs">
76 <GeneratedReferenceAssemblySource>$(IntermediateAPIDir)%(TizenAssemblies.Filename).cs</GeneratedReferenceAssemblySource>
79 <Message Text="[GenAPI] %(TizenAssemblies.Filename) -> $(GeneratedReferenceAssemblySource)" Importance="High" />
81 <Exec Command='$(GenAPICommand) -assembly:"%(TizenAssemblies.Identity)" -libPath:"$(IntermediateLibDir)" -out:"$(GeneratedReferenceAssemblySource)" -throw:"Not Supported Feature" -global' />
85 <Target Name="GenerateDummy"
86 DependsOnTargets="GenerateAsmInfo;GenerateAPI"
87 Inputs="@(TizenAssemblies)" Outputs="$(OutputDummyDir)%(TizenAssemblies.Filename).dll">
89 <ThisAssemblyFilename>%(TizenAssemblies.Filename)</ThisAssemblyFilename>
90 <GeneratedAssemblyInfoSource>$(IntermediateAPIDir)%(TizenAssemblies.Filename).AssemblyInfo.cs</GeneratedAssemblyInfoSource>
91 <GeneratedReferenceAssemblySource>$(IntermediateAPIDir)%(TizenAssemblies.Filename).cs</GeneratedReferenceAssemblySource>
92 <GeneratedReferenceAssembly>$(OutputDummyDir)%(TizenAssemblies.Filename).dll</GeneratedReferenceAssembly>
95 <Message Text="[Compile] %(TizenAssemblies.Filename) -> $(GeneratedReferenceAssembly)" Importance="High" />
98 <FilteredReferencePath Include="@(ReferencePath)" Condition="%(Filename) != $(ThisAssemblyFilename)" />
102 Sources="$(GeneratedReferenceAssemblySource);$(GeneratedAssemblyInfoSource)"
103 OutputAssembly="$(GeneratedReferenceAssembly)"
104 AdditionalLibPaths="$(AdditionalLibPaths)"
105 AllowUnsafeBlocks="true"
106 DefineConstants="$(DefineConstants)"
107 DisabledWarnings="$(NoWarn)"
108 TargetType="$(OutputType)"
109 NoStandardLib="$(NoCompilerStandardLib)"
110 References="@(FilteredReferencePath)"
112 ToolExe="$(CscToolExe)"
113 ToolPath="$(CscToolPath)" />
117 <Target Name="AfterBuild" DependsOnTargets="Prepare;GenerateDummy">