diff options
Diffstat (limited to '.nuspec/Xamarin.Forms.Debug.targets')
-rw-r--r-- | .nuspec/Xamarin.Forms.Debug.targets | 80 |
1 files changed, 80 insertions, 0 deletions
diff --git a/.nuspec/Xamarin.Forms.Debug.targets b/.nuspec/Xamarin.Forms.Debug.targets new file mode 100644 index 00000000..c3d21c23 --- /dev/null +++ b/.nuspec/Xamarin.Forms.Debug.targets @@ -0,0 +1,80 @@ +<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.XamlCTask" AssemblyFile="Xamarin.Forms.Build.Tasks.dll"/> + <UsingTask TaskName="Xamarin.Forms.Build.Tasks.DebugXamlCTask" AssemblyFile="Xamarin.Forms.Build.Tasks.dll"/> + <UsingTask TaskName="Xamarin.Forms.Build.Tasks.FixedCreateCSharpManifestResourceName" AssemblyFile="Xamarin.Forms.Build.Tasks.dll"/> + + <PropertyGroup> + <PrepareResourcesDependsOn> + XamlG; + $(PrepareResourcesDependsOn); + </PrepareResourcesDependsOn> + </PropertyGroup> + + <PropertyGroup> + <CompileDependsOn> + $(CompileDependsOn); + GenerateDebugCode; + 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'"/> + </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> + + <!-- duplicate legacy InitializeComponent, create a ctor with bool param --> + <Target Name="GenerateDebugCode"> + <DebugXamlCTask + Assembly = "$(IntermediateOutputPath)$(TargetFileName)" + ReferencePath = "@(ReferencePath)" + DebugSymbols = "$(DebugSymbols)" /> + </Target> + + <Target Name="XamlC"> + <XamlCTask + Assembly = "$(IntermediateOutputPath)$(TargetFileName)" + ReferencePath = "@(ReferencePath)" + DebugSymbols = "$(DebugSymbols)" + Verbosity = "4" + KeepXamlResources = "true" + OptimizeIL = "true" /> + </Target> +</Project> |