summaryrefslogtreecommitdiff
path: root/.nuspec/Xamarin.Forms.targets
diff options
context:
space:
mode:
authorJason Smith <jason.smith@xamarin.com>2016-03-22 13:02:25 -0700
committerJason Smith <jason.smith@xamarin.com>2016-03-22 16:13:41 -0700
commit17fdde66d94155fc62a034fa6658995bef6fd6e5 (patch)
treeb5e5073a2a7b15cdbe826faa5c763e270a505729 /.nuspec/Xamarin.Forms.targets
downloadxamarin-forms-17fdde66d94155fc62a034fa6658995bef6fd6e5.tar.gz
xamarin-forms-17fdde66d94155fc62a034fa6658995bef6fd6e5.tar.bz2
xamarin-forms-17fdde66d94155fc62a034fa6658995bef6fd6e5.zip
Initial import
Diffstat (limited to '.nuspec/Xamarin.Forms.targets')
-rw-r--r--.nuspec/Xamarin.Forms.targets69
1 files changed, 69 insertions, 0 deletions
diff --git a/.nuspec/Xamarin.Forms.targets b/.nuspec/Xamarin.Forms.targets
new file mode 100644
index 00000000..0bb724d3
--- /dev/null
+++ b/.nuspec/Xamarin.Forms.targets
@@ -0,0 +1,69 @@
+<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <UsingTask TaskName="Xamarin.Forms.Build.Tasks.XamlGTask" AssemblyFile="Xamarin.Forms.Build.Tasks.dll"/>
+ <UsingTask TaskName="Xamarin.Forms.Build.Tasks.FixedCreateCSharpManifestResourceName" AssemblyFile="Xamarin.Forms.Build.Tasks.dll"/>
+ <UsingTask TaskName="Xamarin.Forms.Build.Tasks.XamlCTask" AssemblyFile="Xamarin.Forms.Build.Tasks.dll"/>
+
+ <PropertyGroup>
+ <PrepareResourcesDependsOn>
+ XamlG;
+ $(PrepareResourcesDependsOn);
+ </PrepareResourcesDependsOn>
+ </PropertyGroup>
+
+ <PropertyGroup>
+ <CompileDependsOn>
+ $(CompileDependsOn);
+ XamlC;
+ </CompileDependsOn>
+ </PropertyGroup>
+
+ <Target Name="UpdateDesignTimeXaml" Condition="'$(UseHostCompilerIfAvailable)' == 'true'" DependsOnTargets="PrepareResources; Compile"/>
+
+ <Target Name="XamlG" DependsOnTargets="$(XamlGDependsOn)"/>
+
+ <PropertyGroup>
+ <XamlGDependsOn>
+ _PreXamlG;
+ _CollectXamlFiles;
+ _CoreXamlG;
+ </XamlGDependsOn>
+ </PropertyGroup>
+
+ <Target Name="_PreXamlG">
+ <MakeDir Directories="$(IntermediateOutputPath)"/>
+ </Target>
+
+ <Target Name="_CollectXamlFiles">
+ <ItemGroup>
+ <_XamlResources Include="@(EmbeddedResource)" Condition="'%(Extension)' == '.xaml' AND '$(DefaultLanguageSourceExtension)' == '.cs'"/>
+ </ItemGroup>
+ <FixedCreateCSharpManifestResourceName ResourceFiles="@(_XamlResources)" RootNamespace="$(RootNamespace)">
+ <Output TaskParameter="ResourceFilesWithManifestResourceNames" ItemName="XamlFiles" />
+ </FixedCreateCSharpManifestResourceName>
+ <ItemGroup>
+ <XamlGFiles Include="@(XamlFiles->'$(IntermediateOutputPath)%(ManifestResourceName).g$(DefaultLanguageSourceExtension)')"/>
+ <Compile Include="@(XamlGFiles)"/>
+ <FileWrites Include="@(XamlGFiles)"/>
+ </ItemGroup>
+ </Target>
+
+ <Target Name="_CoreXamlG"
+ Inputs = "@(XamlFiles)"
+ Outputs = "$(IntermediateOutputPath)%(ManifestResourceName).g$(DefaultLanguageSourceExtension)">
+ <XamlGTask
+ Source="@(XamlFiles)"
+ Language = "$(Language)"
+ AssemblyName = "$(AssemblyName)"
+ OutputFile = "$(IntermediateOutputPath)%(ManifestResourceName).g$(DefaultLanguageSourceExtension)">
+ </XamlGTask>
+ </Target>
+
+ <Target Name="XamlC">
+ <XamlCTask
+ Assembly = "$(IntermediateOutputPath)$(TargetFileName)"
+ ReferencePath = "@(ReferencePath)"
+ Verbosity = "2"
+ OptimizeIL = "true"
+ DebugSymbols = "$(DebugSymbols)" />
+ </Target>
+</Project>