171 changed files with 1644 additions and 16462 deletions
@ -1,13 +0,0 @@ |
|||||
<Project> |
|
||||
|
|
||||
<!-- |
|
||||
Note: the language targets necessary to build UWP applications are not included in the .NET SDK and require |
|
||||
installing Visual Studio. To work around this limitation, a local copy of these targets is embedded and used here. |
|
||||
--> |
|
||||
|
|
||||
<PropertyGroup |
|
||||
Condition=" '$(TargetFrameworkIdentifier)' == '.NETCore' And '$(TargetPlatformIdentifier)' == 'UAP' "> |
|
||||
<LanguageTargets>$(MSBuildThisFileDirectory)msbuild\uwp\Microsoft.Windows.UI.Xaml.CSharp.targets</LanguageTargets> |
|
||||
</PropertyGroup> |
|
||||
|
|
||||
</Project> |
|
||||
Binary file not shown.
@ -1,181 +0,0 @@ |
|||||
<!-- |
|
||||
*********************************************************************************************** |
|
||||
Microsoft.Windows.UI.Xaml.Cpp.targets |
|
||||
|
|
||||
WARNING: DO NOT MODIFY this file unless you are knowledgeable about MSBuild and have |
|
||||
created a backup copy. Incorrect changes to this file will make it |
|
||||
impossible to load or build your projects from the command-line or the IDE. |
|
||||
|
|
||||
Copyright (C) Microsoft Corporation. All rights reserved. |
|
||||
*********************************************************************************************** |
|
||||
--> |
|
||||
|
|
||||
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> |
|
||||
<PropertyGroup> |
|
||||
<BeforeClCompileTargets> |
|
||||
MarkupCompilePass1; |
|
||||
$(BeforeClCompileTargets) |
|
||||
</BeforeClCompileTargets> |
|
||||
|
|
||||
<ComputeCompileInputsTargets> |
|
||||
ComputeXamlGeneratedCompileInputs; |
|
||||
$(ComputeCompileInputsTargets) |
|
||||
</ComputeCompileInputsTargets> |
|
||||
|
|
||||
<AfterBuildCompileTargets> |
|
||||
$(ComputeLinkInputsTargets); |
|
||||
CreateWinMD; |
|
||||
ComputeGeneratedWinMD; |
|
||||
MarkupCompilePass2; |
|
||||
ComputeInvalidXamlGenerated; |
|
||||
CompileXamlGeneratedFiles; |
|
||||
$(AfterBuildCompileTargets) |
|
||||
</AfterBuildCompileTargets> |
|
||||
|
|
||||
<XamlPreLinkDependsOn> |
|
||||
$(XamlPreLinkDependsOn); |
|
||||
ComputeXamlGeneratedCLOutputs |
|
||||
</XamlPreLinkDependsOn> |
|
||||
|
|
||||
<GenerateProjectionAssembly>True</GenerateProjectionAssembly> |
|
||||
<OnlyCreateWinMD>true</OnlyCreateWinMD> |
|
||||
<ImplicitlyExpandTargetPlatform Condition="'$(ImplicitlyExpandTargetPlatform)' == '' ">true</ImplicitlyExpandTargetPlatform> |
|
||||
</PropertyGroup> |
|
||||
|
|
||||
<PropertyGroup> |
|
||||
<ValidatePresenceOfAppxManifestItemsDependsOn> |
|
||||
$(ValidatePresenceOfAppxManifestItemsDependsOn); |
|
||||
_CreateContentItemOutOfCustomAppxManifest |
|
||||
</ValidatePresenceOfAppxManifestItemsDependsOn> |
|
||||
</PropertyGroup> |
|
||||
|
|
||||
<ItemGroup> |
|
||||
<PropertyPageSchema Include="$(VCTargetsPath)$(LangID)\Xaml.xml" /> |
|
||||
</ItemGroup> |
|
||||
|
|
||||
<!-- This is a proxy target that holds stuff that runs before the final Link --> |
|
||||
<Target Name="XamlPreLink" BeforeTargets="Link" DependsOnTargets="$(XamlPreLinkDependsOn)" /> |
|
||||
|
|
||||
<Target Name="ComputeGeneratedWinMD" > |
|
||||
<PropertyGroup> |
|
||||
<LocalAssembly Condition="'$(LocalAssembly)' == '' and '%(Link.WindowsMetadataFile)' != ''">%(Link.WindowsMetadataFile)</LocalAssembly> |
|
||||
</PropertyGroup> |
|
||||
</Target> |
|
||||
|
|
||||
<!-- Change AppxManifest.xml override item to be of Content type. --> |
|
||||
<Target Name="_CreateContentItemOutOfCustomAppxManifest"> |
|
||||
<ItemGroup> |
|
||||
<Content Include="@(Xml)" Condition="'%(Identity)' == 'AppxManifest.xml'" /> |
|
||||
<Xml Remove="@(Xml)" Condition="'%(Identity)' == 'AppxManifest.xml'" /> |
|
||||
</ItemGroup> |
|
||||
</Target> |
|
||||
|
|
||||
<PropertyGroup> |
|
||||
<GeneratedFilesDir Condition=" '$(GeneratedFilesDir)' == ''">Generated Files\</GeneratedFilesDir> |
|
||||
<XamlGeneratedOutputPath>$(GeneratedFilesDir)</XamlGeneratedOutputPath> |
|
||||
<ExtensionsToDeleteOnClean>$(ExtensionsToDeleteOnClean);*.g.h;*.g.cpp;*.xaml</ExtensionsToDeleteOnClean> |
|
||||
</PropertyGroup> |
|
||||
|
|
||||
<Import Project="Microsoft.Windows.UI.Xaml.Common.targets" /> |
|
||||
|
|
||||
<ItemGroup> |
|
||||
<PropertyPageSchema Include="$(MSBuildThisFileDirectory)$(LangName)\Cpp.ProjectItemsSchema.xaml"/> |
|
||||
</ItemGroup> |
|
||||
|
|
||||
<!-- Generated files output group population --> |
|
||||
<PropertyGroup> |
|
||||
<GeneratedFilesOutputGroupDependsOn>XamlGeneratedFilesOutputGroup;$(GeneratedFilesOutputGroupDependsOn)</GeneratedFilesOutputGroupDependsOn> |
|
||||
</PropertyGroup> |
|
||||
|
|
||||
<Target Name="XamlGeneratedFilesOutputGroup" |
|
||||
DependsOnTargets="$(XamlGeneratedFilesOutputGroupDependsOn)" |
|
||||
Condition="'@(Page)@(ApplicationDefinition)' != ''"> |
|
||||
<ItemGroup> |
|
||||
<GeneratedFilesOutputGroup Condition="'%(Page.ExcludedFromBuild)'!='true'" Include="@(Page->'$(XamlGeneratedOutputPath)%(Filename).g.h')" /> |
|
||||
<GeneratedFilesOutputGroup Condition="'%(Page.ExcludedFromBuild)'!='true'" Include="@(Page->'$(XamlGeneratedOutputPath)%(Filename).g.cpp')" /> |
|
||||
<GeneratedFilesOutputGroup Condition="'%(ApplicationDefinition.ExcludedFromBuild)'!='true'" Include="@(ApplicationDefinition->'$(XamlGeneratedOutputPath)%(Filename).g.h')" /> |
|
||||
<GeneratedFilesOutputGroup Condition="'%(ApplicationDefinition.ExcludedFromBuild)'!='true'" Include="@(ApplicationDefinition->'$(XamlGeneratedOutputPath)%(Filename).g.cpp')" /> |
|
||||
</ItemGroup> |
|
||||
</Target> |
|
||||
|
|
||||
<Target Name="ComputeXamlGeneratedCompileInputs" |
|
||||
DependsOnTargets="$(ComputeXamlGeneratedCompileInputsDependsOn)" |
|
||||
Condition="'@(Page)@(ApplicationDefinition)' != ''"> |
|
||||
<ItemGroup> |
|
||||
<ClCompile Condition="'%(Page.ExcludedFromBuild)'!='true'" Include="@(Page->'$(XamlGeneratedOutputPath)%(Filename).g.cpp')" > |
|
||||
<CompilerIteration>XamlGenerated</CompilerIteration> |
|
||||
</ClCompile> |
|
||||
<ClCompile Condition="'%(ApplicationDefinition.ExcludedFromBuild)'!='true'" Include="@(ApplicationDefinition->'$(XamlGeneratedOutputPath)%(Filename).g.cpp')" > |
|
||||
<CompilerIteration>XamlGenerated</CompilerIteration> |
|
||||
</ClCompile> |
|
||||
<ClCompile Include="$(XamlGeneratedOutputPath)XamlTypeInfo.g.cpp" > |
|
||||
<CompilerIteration>XamlGenerated</CompilerIteration> |
|
||||
</ClCompile> |
|
||||
<ClCompile Include="$(XamlGeneratedOutputPath)XamlTypeInfo.Impl.g.cpp" /> |
|
||||
<ClCompile Condition="'$(OutputType)' == 'Library'" Include="$(XamlGeneratedOutputPath)XamlLibMetadataProvider.g.cpp" /> |
|
||||
</ItemGroup> |
|
||||
|
|
||||
<!-- The build only wants to generate winmd once, either during Link target or Createwinmd target, not both. |
|
||||
Link and Createwinmd targets will execute link.exe, so it is best to run link.exe only once. |
|
||||
However, there are two cases where that isn't possible. |
|
||||
1) when build is building XAML and |
|
||||
2) when building in passes. --> |
|
||||
<PropertyGroup> |
|
||||
<GenerateBuildCompilePassWinMD Condition="'$(GenerateBuildCompilePassWinMD)' == ''">true</GenerateBuildCompilePassWinMD> |
|
||||
</PropertyGroup> |
|
||||
</Target> |
|
||||
|
|
||||
<Target Name="ComputeInvalidXamlGenerated" > |
|
||||
<ItemGroup> |
|
||||
<!-- Some files dont exists because XAML files do not always generate .g.cpp --> |
|
||||
<ClCompile Remove="@(ClCompile)" Condition="'%(ClCompile.CompilerIteration)' == 'XamlGenerated' and !Exists('%(Identity)')"/> |
|
||||
</ItemGroup> |
|
||||
</Target> |
|
||||
|
|
||||
<!-- Add CL generates .obj files to Obj item group, it will be used by lib or link --> |
|
||||
<Target Name="ComputeXamlGeneratedCLOutputs" |
|
||||
DependsOnTargets="ComputeXamlGeneratedCompileInputs;ComputeInvalidXamlGenerated" |
|
||||
Condition="'@(ClCompile)' != ''"> |
|
||||
|
|
||||
<ItemGroup> |
|
||||
<!-- Some files dont exists because XAML files do not always generate .g.cpp --> |
|
||||
<ClCompile Remove="@(ClCompile)" Condition="'%(ClCompile.CompilerIteration)' == 'XamlGenerated' and !Exists('%(Identity)')"/> |
|
||||
<!-- No object file name defined: filename.obj --> |
|
||||
<Obj Condition="'%(ClCompile.ObjectFileName)'=='' and '%(ClCompile.ExcludedFromBuild)'!='true'" Include="@(ClCompile->'%(Filename).obj')" /> |
|
||||
<!-- Object file name is a directory (has trailing slash): ofn\filename.obj --> |
|
||||
<Obj Condition="HasTrailingSlash('%(ClCompile.ObjectFileName)') and '%(ClCompile.ExcludedFromBuild)'!='true'" Include="@(ClCompile->'%(ObjectFileName)%(Filename).obj')" /> |
|
||||
<!-- Object file name is a file (does not has trailing slash): ofn --> |
|
||||
<Obj Condition="'%(ClCompile.ObjectFileName)' != '' and !HasTrailingSlash('%(ClCompile.ObjectFileName)') and '%(ClCompile.ExcludedFromBuild)'!='true'" Include="@(ClCompile->'%(ObjectFileName)')" /> |
|
||||
|
|
||||
<Link Include="@(Obj->WithMetadataValue('CompilerIteration', 'XamlGenerated')->ClearMetadata())" /> |
|
||||
</ItemGroup> |
|
||||
</Target> |
|
||||
|
|
||||
<!-- Enable design time build as well as selected file(s) compile support --> |
|
||||
<PropertyGroup> |
|
||||
<EnableDesignTimeBuild>true</EnableDesignTimeBuild> |
|
||||
</PropertyGroup> |
|
||||
|
|
||||
<ItemDefinitionGroup> |
|
||||
<Page> |
|
||||
<GeneratorTarget>DesignTimeMarkupCompilation</GeneratorTarget> |
|
||||
</Page> |
|
||||
<ApplicationDefinition> |
|
||||
<GeneratorTarget>DesignTimeMarkupCompilation</GeneratorTarget> |
|
||||
</ApplicationDefinition> |
|
||||
</ItemDefinitionGroup> |
|
||||
|
|
||||
<PropertyGroup> |
|
||||
<MarkupCompilePass1DependsOn>CppDesignTimeMarkupCompilation;$(MarkupCompilePass1DependsOn)</MarkupCompilePass1DependsOn> |
|
||||
</PropertyGroup> |
|
||||
|
|
||||
<Target Name="CppDesignTimeMarkupCompilation" |
|
||||
DependsOnTargets="_SelectedFiles;SelectCustomBuild;ResolveReferences"> |
|
||||
<!-- Ideally we'd like to be able to build just the requested files (if it makes sense). --> |
|
||||
<!--<ItemGroup Condition="'@(SelectedFiles)'!=''"> |
|
||||
<Page Remove="@(Page)" Condition="'%(Identity)'!='@(SelectedFiles)'"/> |
|
||||
<ApplicationDefinition Remove="@(ApplicationDefinition)" Condition="'%(Identity)'!='@(SelectedFiles)'"/> |
|
||||
</ItemGroup>--> |
|
||||
</Target> |
|
||||
|
|
||||
</Project> |
|
||||
@ -1,47 +0,0 @@ |
|||||
<!-- |
|
||||
*********************************************************************************************** |
|
||||
Microsoft.Windows.UI.Xaml.CSharp.targets |
|
||||
|
|
||||
WARNING: DO NOT MODIFY this file unless you are knowledgeable about MSBuild and have |
|
||||
created a backup copy. Incorrect changes to this file will make it |
|
||||
impossible to load or build your projects from the command-line or the IDE. |
|
||||
|
|
||||
Copyright (C) Microsoft Corporation. All rights reserved. |
|
||||
*********************************************************************************************** |
|
||||
--> |
|
||||
|
|
||||
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> |
|
||||
|
|
||||
<PropertyGroup Condition=" '$(TargetPlatformIdentifier)' == 'WindowsPhoneApp' "> |
|
||||
<TargetPlatformVersion Condition="'$(TargetPlatformVersion)' == ''">8.1</TargetPlatformVersion> |
|
||||
<TargetFrameworkIdentifier Condition="'$(TargetFrameworkIdentifier)' == ''">WindowsPhoneApp</TargetFrameworkIdentifier> |
|
||||
<TargetFrameworkVersion Condition="'$(TargetFrameworkVersion)' == ''">v8.1</TargetFrameworkVersion> |
|
||||
</PropertyGroup> |
|
||||
|
|
||||
<PropertyGroup Condition=" '$(TargetPlatformIdentifier)' == 'windows' OR '$(TargetPlatformIdentifier)' == '' "> |
|
||||
<TargetPlatformVersion Condition="'$(TargetPlatformVersion)' == ''">8.1</TargetPlatformVersion> |
|
||||
<TargetFrameworkIdentifier Condition="'$(TargetFrameworkIdentifier)' == ''">.NETCore</TargetFrameworkIdentifier> |
|
||||
<TargetFrameworkVersion Condition="'$(TargetFrameworkVersion)' == ''">v4.5.1</TargetFrameworkVersion> |
|
||||
</PropertyGroup> |
|
||||
|
|
||||
<PropertyGroup> |
|
||||
<ImplicitlyExpandTargetPlatform Condition="'$(ImplicitlyExpandTargetPlatform)' == '' ">true</ImplicitlyExpandTargetPlatform> |
|
||||
<ImplicitlyExpandTargetFramework Condition="'$(ImplicitlyExpandTargetFramework)' == '' ">true</ImplicitlyExpandTargetFramework> |
|
||||
<NoStdLib Condition="'$(NoStdLib)' == ''">true</NoStdLib> |
|
||||
<UseVSHostingProcess>false</UseVSHostingProcess> |
|
||||
<WindowsAppContainer>true</WindowsAppContainer> |
|
||||
<AppxPackage Condition="'$(OutputType)' == 'AppContainerExe'">True</AppxPackage> |
|
||||
|
|
||||
<!-- Supress the warnings in the 1st pass so that warnings are not repeated twice --> |
|
||||
<SuppressWarningsInPass1 Condition="'$(SuppressWarningsInPass1)' == '' ">true</SuppressWarningsInPass1> |
|
||||
|
|
||||
</PropertyGroup> |
|
||||
|
|
||||
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" /> |
|
||||
<Import Project="Microsoft.Windows.UI.Xaml.Common.targets" /> |
|
||||
<Import Project="Microsoft.Windows.UI.Xaml.Cps.targets" /> |
|
||||
|
|
||||
<ItemGroup> |
|
||||
<PropertyPageSchema Include="$(MSBuildThisFileDirectory)$(LangName)\CSharp.ProjectItemsSchema.xaml"/> |
|
||||
</ItemGroup> |
|
||||
</Project> |
|
||||
@ -1,664 +0,0 @@ |
|||||
<!-- |
|
||||
*********************************************************************************************** |
|
||||
Microsoft.Windows.UI.Xaml.Common.targets |
|
||||
|
|
||||
WARNING: DO NOT MODIFY this file unless you are knowledgeable about MSBuild and have |
|
||||
created a backup copy. Incorrect changes to this file will make it |
|
||||
impossible to load or build your projects from the command-line or the IDE. |
|
||||
|
|
||||
Copyright (C) Microsoft Corporation. All rights reserved. |
|
||||
*********************************************************************************************** |
|
||||
--> |
|
||||
|
|
||||
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> |
|
||||
|
|
||||
<Import Project="ImportBefore\*"/> |
|
||||
|
|
||||
<!-- Need the path to vcmeta.dll --> |
|
||||
<PropertyGroup> |
|
||||
<VCInstallDir Condition="'$(VCInstallDir)' == ''">$(Registry:HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\14.0\Setup\VC@ProductDir)</VCInstallDir> |
|
||||
<VCInstallDir Condition="'$(VCInstallDir)' == ''">$(Registry:HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\VisualStudio\14.0\Setup\VC@ProductDir)</VCInstallDir> |
|
||||
<VCInstallDir Condition="'$(VCInstallDir)' == ''">$(Registry:HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VSWinExpress\14.0\Setup\VC@ProductDir)</VCInstallDir> |
|
||||
<VCInstallDir Condition="'$(VCInstallDir)' == ''">$(Registry:HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\VSWinExpress\14.0\Setup\VC@ProductDir)</VCInstallDir> |
|
||||
|
|
||||
<XAMLFingerprint Condition="'$(XAMLFingerprint)' == ''">true</XAMLFingerprint> |
|
||||
<DisableXbfGeneration Condition="'$(DisableXbfGeneration)' == '' AND '$(TargetPlatformVersion)' == '8.0'">true</DisableXbfGeneration> |
|
||||
<DisableXbfGeneration Condition="'$(DisableXbfGeneration)' == ''">false</DisableXbfGeneration> |
|
||||
|
|
||||
<XamlSavedStateFileName Condition="'$(XamlSavedStateFileName)' == ''">XamlSaveStateFile.xml</XamlSavedStateFileName> |
|
||||
<XamlSavedStateFilePath>$(IntermediateOutputPath)\$(XamlSavedStateFileName)</XamlSavedStateFilePath> |
|
||||
|
|
||||
<XAMLFingerprintIgnorePaths Condition="'$(XAMLFingerprintIgnorePaths)'==''"> |
|
||||
@(ReferenceAssemblyPaths); |
|
||||
$(WindowsSDK80Path) |
|
||||
</XAMLFingerprintIgnorePaths> |
|
||||
</PropertyGroup> |
|
||||
|
|
||||
<ItemGroup Condition="'$(BuildingInsideVisualStudio)'=='true'"> |
|
||||
<AvailableItemName Include="PRIResource" /> |
|
||||
<AvailableItemName Include="AppxManifest" /> |
|
||||
<AvailableItemName Include="ApplicationDefinition" /> |
|
||||
<AvailableItemName Include="Page" /> |
|
||||
<AvailableItemName Include="DesignData" /> |
|
||||
<AvailableItemName Include="DesignDataWithDesignTimeCreatableTypes" /> |
|
||||
</ItemGroup> |
|
||||
|
|
||||
<ItemGroup> |
|
||||
<ProjectCapability Include="WindowsXaml"/> |
|
||||
<ProjectCapability Include="WindowsXamlPage"/> |
|
||||
<ProjectCapability Include="WindowsXamlCodeBehind"/> |
|
||||
<ProjectCapability Include="WindowsXamlResourceDictionary"/> |
|
||||
<ProjectCapability Include="WindowsXamlUserControl"/> |
|
||||
</ItemGroup> |
|
||||
|
|
||||
<!-- For Managed Assemblies Create a XAML Roots Log --> |
|
||||
<PropertyGroup Condition="'$(ManagedAssembly)' != 'false'"> |
|
||||
<XamlRootsLog>$(AssemblyName).xr.xml</XamlRootsLog> |
|
||||
</PropertyGroup> |
|
||||
|
|
||||
<!-- Setting PRI index name. The XAML compiler use this in the LoadComponent() string. |
|
||||
It must match the name of the directoy the AppX Packaging system uses --> |
|
||||
<PropertyGroup> |
|
||||
<!-- Exe's don't have an PriIndexName --> |
|
||||
<PriIndexName Condition="'$(AppxPackage)' == 'true'"></PriIndexName> |
|
||||
<!-- Managed Dll's use the "safe" name of the project as the App Package Name --> |
|
||||
<PriIndexName Condition="'$(AppxPackage)' != 'true' and '$(ManagedAssembly)' != 'false' and '$(OutputType)' != 'winmdobj'">$(TargetName)</PriIndexName> |
|
||||
<!-- Winmd library targets (managed or native) use the default root namespace of the project for the App package name --> |
|
||||
<PriIndexName Condition="'$(AppxPackage)' != 'true' and '$(ManagedAssembly)' != 'false' and '$(OutputType)' == 'winmdobj'">$(RootNamespace)</PriIndexName> |
|
||||
<PriIndexName Condition="'$(AppxPackage)' != 'true' and '$(ManagedAssembly)' == 'false' and '$(RootNamespace)' != ''">$(RootNamespace)</PriIndexName> |
|
||||
<!-- If RootNamespace is empty fall back to TargetName --> |
|
||||
<PriIndexName Condition="'$(AppxPackage)' != 'true' and $(PriIndexName) == ''">$(TargetName)</PriIndexName> |
|
||||
</PropertyGroup> |
|
||||
|
|
||||
<PropertyGroup> |
|
||||
<AvailablePlatforms>$(AvailablePlatforms),ARM</AvailablePlatforms> |
|
||||
|
|
||||
<!-- this Property is used only for the Managed build. |
|
||||
See Microsoft.Windows.UI.Xaml.Cpp.targets for Native build rules --> |
|
||||
<PrepareResourcesDependsOn> |
|
||||
ResolveKeySource; |
|
||||
MarkupCompilePass1; |
|
||||
XamlPreCompile; |
|
||||
MarkupCompilePass2; |
|
||||
$(PrepareResourcesDependsOn) |
|
||||
</PrepareResourcesDependsOn> |
|
||||
|
|
||||
<Prefer32Bit Condition="'$(Prefer32Bit)' == '' and ('$(OutputType)' == 'exe' or '$(OutputType)' == 'winexe' or '$(OutputType)' == 'appcontainerexe')">true</Prefer32Bit> |
|
||||
<HighEntropyVA Condition="'$(HighEntropyVA)' == ''">true</HighEntropyVA> |
|
||||
<SubsystemVersion Condition="'$(SubsystemVersion)' == '' and ('$(PlatformTarget)' == 'ARM' or '$(OutputType)' == 'appcontainerexe' or '$(OutputType)' == 'winmdobj')">6.02</SubsystemVersion> |
|
||||
<SubsystemVersion Condition="'$(SubsystemVersion)' == ''">6.00</SubsystemVersion> |
|
||||
|
|
||||
<OnXamlPreCompileErrorTarget Condition="'$(OnXamlPreCompileErrorTarget)' == ''">_OnXamlPreCompileError</OnXamlPreCompileErrorTarget> |
|
||||
|
|
||||
<!-- Use Intermediate dir if XamlGeneratedOutputPath is not defined --> |
|
||||
<XamlGeneratedOutputPath Condition="'$(XamlGeneratedOutputPath)' == ''">$(IntermediateOutputPath)</XamlGeneratedOutputPath> |
|
||||
</PropertyGroup> |
|
||||
|
|
||||
<UsingTask TaskName="Microsoft.Windows.UI.Xaml.Build.Tasks.CompileXaml" AssemblyFile="Microsoft.Windows.UI.Xaml.81.Build.Tasks.dll" /> |
|
||||
<UsingTask TaskName="Microsoft.Windows.UI.Xaml.Build.Tasks.AddDefaultXamlLinkMetadata" AssemblyFile="Microsoft.Windows.UI.Xaml.81.Build.Tasks.dll" /> |
|
||||
<UsingTask TaskName="Microsoft.Windows.UI.Xaml.Build.Tasks.GetXamlCppIncludeDirectories" AssemblyFile="Microsoft.Windows.UI.Xaml.81.Build.Tasks.dll" /> |
|
||||
|
|
||||
<PropertyGroup> |
|
||||
<!--If the path to the sign tool is not set, assume the SDK path --> |
|
||||
<SignToolPath Condition="'$(SignToolPath)' == ''">$(FrameworkSDKRoot)bin</SignToolPath> |
|
||||
|
|
||||
<!--Integration with packaging for GeneratedXamlFilesOutputGroupOutput --> |
|
||||
<IncludeCustomOutputGroupForPackaging>true</IncludeCustomOutputGroupForPackaging> |
|
||||
</PropertyGroup> |
|
||||
|
|
||||
<ItemGroup> |
|
||||
<XamlIntermediateAssembly Condition="'$(ManagedAssembly)'!='false'" Include="$(XamlGeneratedOutputPath)intermediatexaml\$(TargetName)$(TargetExt)"/> |
|
||||
<XamlIntermediateAssembly Condition="'$(ManagedAssembly)'=='false'" Include="$(OutputPath)\$(TargetName).winmd"/> |
|
||||
</ItemGroup> |
|
||||
|
|
||||
<!-- |
|
||||
============================================================ |
|
||||
Adds all XAML Pages to the $(Resource) collection |
|
||||
============================================================ |
|
||||
--> |
|
||||
<ItemGroup Condition=" '$(ManagedAssembly)'=='' "> |
|
||||
<!-- Add XAML Page items to $(Resource) --> |
|
||||
<Resource Include="@(Page)" /> |
|
||||
<Resource Include="@(ApplicationDefinition)" /> |
|
||||
</ItemGroup> |
|
||||
|
|
||||
<!-- Manifest metadata items. --> |
|
||||
<!-- See Microsoft.AppxPackage.targets for details. --> |
|
||||
<ItemGroup Label="AppxManifestMetadata"> |
|
||||
<AppxManifestMetadata Include="$(MSBuildExtensionsPath)\Microsoft\WindowsXaml\v$(VisualStudioVersion)\$(TargetPlatformVersion)\Microsoft.Windows.UI.Xaml.81.Build.Tasks.dll" /> |
|
||||
</ItemGroup> |
|
||||
|
|
||||
<PropertyGroup> |
|
||||
<MarkupCompilePass1DependsOn> |
|
||||
GetXamlCppIncludeDirectories; |
|
||||
$(GetXamlCppIncludeDirectories) |
|
||||
</MarkupCompilePass1DependsOn> |
|
||||
|
|
||||
<MarkupCompilePass2DependsOn> |
|
||||
GetXamlCppIncludeDirectories; |
|
||||
$(GetXamlCppIncludeDirectories) |
|
||||
</MarkupCompilePass2DependsOn> |
|
||||
|
|
||||
<Prep_ComputeProcessXamlFilesDependsOn> |
|
||||
GetXamlCppIncludeDirectories; |
|
||||
$(Prep_ComputeProcessXamlFilesDependsOn) |
|
||||
</Prep_ComputeProcessXamlFilesDependsOn> |
|
||||
</PropertyGroup> |
|
||||
|
|
||||
<!-- In order for the XAML compiler to generated the correct relative paths for #includes in |
|
||||
the generated C++ code it needs to know the AdditionalIncludeDirectories of all the .cpp |
|
||||
files are DependentUpon XAML files.--> |
|
||||
<Target Name="GetXamlCppIncludeDirectories" Condition="'$(ManagedAssembly)'=='false' and '$(XamlCppIncludeDirectories)' == ''"> |
|
||||
<GetXamlCppIncludeDirectories ClCompile="@(ClCompile)"> |
|
||||
<Output PropertyName="XamlCppIncludeDirectories" TaskParameter="ComputedIncludeDirectories" /> |
|
||||
</GetXamlCppIncludeDirectories> |
|
||||
</Target> |
|
||||
|
|
||||
<!-- |
|
||||
================================================================ |
|
||||
DesignTimeMarkupCompilation |
|
||||
|
|
||||
Support for the Intellisense build |
|
||||
================================================================ |
|
||||
--> |
|
||||
<PropertyGroup> |
|
||||
<CoreCompileDependsOn Condition="'$(BuildingInsideVisualStudio)' == 'true' "> |
|
||||
DesignTimeMarkupCompilation; |
|
||||
$(CoreCompileDependsOn) |
|
||||
</CoreCompileDependsOn> |
|
||||
</PropertyGroup> |
|
||||
|
|
||||
<Target Name="DesignTimeMarkupCompilation"> |
|
||||
<!-- BuildingProject is used in Managed builds (always true in Native) --> |
|
||||
<!-- DesignTimeBuild is used in Native builds (always false in Managed) --> |
|
||||
<CallTarget Condition="'$(BuildingProject)' != 'true' Or $(DesignTimeBuild) == 'true'" Targets="DesignTimeMarkupCompilationCT" /> |
|
||||
</Target> |
|
||||
|
|
||||
<!-- A copy of the first pass, without the WarningLevel manipulation --> |
|
||||
<Target Name="DesignTimeMarkupCompilationCT" |
|
||||
DependsOnTargets="$(MarkupCompilePass1DependsOn)" |
|
||||
Condition="'@(Page)' != '' Or '@(ApplicationDefinition)' != '' " > |
|
||||
|
|
||||
<MakeDir Condition="'$(ManagedAssembly)'!='false'" Directories="$(XamlGeneratedOutputPath)intermediatexaml\" /> |
|
||||
|
|
||||
<CompileXaml |
|
||||
LanguageSourceExtension="$(DefaultLanguageSourceExtension)" |
|
||||
Language="$(Language)" |
|
||||
RootNamespace="$(RootNamespace)" |
|
||||
XamlPages="@(Page)" |
|
||||
XamlApplications="@(ApplicationDefinition)" |
|
||||
PriIndexName="$(PriIndexName)" |
|
||||
ProjectName="$(MsBuildProjectName)" |
|
||||
IsPass1="True" |
|
||||
CodeGenerationControlFlags="$(XamlCodeGenerationControlFlags)" |
|
||||
CIncludeDirectories="$(XamlCppIncludeDirectories)" |
|
||||
ProjectPath="$(MSBuildProjectFullPath)" |
|
||||
OutputPath="$(XamlGeneratedOutputPath)" |
|
||||
OutputType="$(OutputType)" |
|
||||
ReferenceAssemblyPaths="@(ReferenceAssemblyPaths)" |
|
||||
ReferenceAssemblies="@(ReferencePath)" |
|
||||
ForceSharedStateShutdown="False" |
|
||||
ContinueOnError="True" |
|
||||
CompileMode="DesignTimeBuild" |
|
||||
XAMLFingerprint="$(XAMLFingerprint)" |
|
||||
FingerprintIgnorePaths="$(XAMLFingerprintIgnorePaths)" |
|
||||
VCInstallDir="$(VCInstallDir)" |
|
||||
SavedStateFile="$(XamlSavedStateFilePath)" |
|
||||
SuppressWarnings="$(SuppressXamlWarnings)" |
|
||||
> |
|
||||
<Output Condition=" '$(ManagedAssembly)'!='false' " ItemName="Compile" TaskParameter="GeneratedCodeFiles" /> |
|
||||
|
|
||||
<!-- |
|
||||
Add to the list of files written. |
|
||||
It is used in Microsoft.Common.targets for a next clean build |
|
||||
--> |
|
||||
<Output ItemName="FileWrites" TaskParameter="GeneratedCodeFiles" /> |
|
||||
<Output ItemName="FileWrites" TaskParameter="GeneratedXamlFiles" /> |
|
||||
<Output ItemName="_GeneratedCodeFiles" TaskParameter="GeneratedCodeFiles" /> |
|
||||
</CompileXaml> |
|
||||
|
|
||||
<ItemGroup> |
|
||||
<FileWrites Include="$(XamlSavedStateFilePath)" /> |
|
||||
</ItemGroup> |
|
||||
|
|
||||
<Message Text="(Out) ISenseCodeFiles: '@(_GeneratedCodeFiles)'" /> |
|
||||
<Message Text="(Out) ISenseXamlFiles: '@(_GeneratedXamlFiles)'" /> |
|
||||
<Message Text="(Out) ClCompile: '@(ClCompile)'" Condition="'%(ClCompile.CompilerIteration)' != 'XamlGenerated'"/> |
|
||||
<Message Text="(Out) Compile: '@(Compile)'" /> |
|
||||
</Target> |
|
||||
|
|
||||
<!-- |
|
||||
================================================================ |
|
||||
MarkupCompilePass1 |
|
||||
================================================================ |
|
||||
--> |
|
||||
|
|
||||
<Target Name="MarkupCompilePass1" |
|
||||
DependsOnTargets="$(MarkupCompilePass1DependsOn)" |
|
||||
Condition="'@(Page)' != '' Or '@(ApplicationDefinition)' != '' " > |
|
||||
|
|
||||
<MakeDir Condition="'$(ManagedAssembly)'!='false'" Directories="$(XamlGeneratedOutputPath)intermediatexaml\" /> |
|
||||
|
|
||||
<CompileXaml |
|
||||
LanguageSourceExtension="$(DefaultLanguageSourceExtension)" |
|
||||
Language="$(Language)" |
|
||||
RootNamespace="$(RootNamespace)" |
|
||||
XamlPages="@(Page)" |
|
||||
XamlApplications="@(ApplicationDefinition)" |
|
||||
PriIndexName="$(PriIndexName)" |
|
||||
ProjectName="$(MsBuildProjectName)" |
|
||||
IsPass1="True" |
|
||||
CodeGenerationControlFlags="$(XamlCodeGenerationControlFlags)" |
|
||||
ProjectPath="$(MSBuildProjectFullPath)" |
|
||||
CIncludeDirectories="$(XamlCppIncludeDirectories)" |
|
||||
OutputPath="$(XamlGeneratedOutputPath)" |
|
||||
OutputType="$(OutputType)" |
|
||||
ReferenceAssemblyPaths="@(ReferenceAssemblyPaths)" |
|
||||
ReferenceAssemblies="@(ReferencePath)" |
|
||||
ForceSharedStateShutdown="False" |
|
||||
CompileMode="RealBuildPass1" |
|
||||
XAMLFingerprint="$(XAMLFingerprint)" |
|
||||
FingerprintIgnorePaths="$(XAMLFingerprintIgnorePaths)" |
|
||||
VCInstallDir="$(VCInstallDir)" |
|
||||
SavedStateFile="$(XamlSavedStateFilePath)" |
|
||||
SuppressWarnings="$(SuppressXamlWarnings)" |
|
||||
> |
|
||||
|
|
||||
<Output Condition=" '$(ManagedAssembly)'!='false' " ItemName="Compile" TaskParameter="GeneratedCodeFiles" /> |
|
||||
|
|
||||
<!-- |
|
||||
FileWrites is used in Microsoft.Common.targets for "Clean" build |
|
||||
--> |
|
||||
<Output ItemName="FileWrites" TaskParameter="GeneratedCodeFiles" /> |
|
||||
<Output ItemName="FileWrites" TaskParameter="GeneratedXamlFiles" /> |
|
||||
<Output ItemName="FileWrites" TaskParameter="GeneratedXbfFiles" /> |
|
||||
<Output ItemName="_GeneratedCodeFiles" TaskParameter="GeneratedCodeFiles" /> |
|
||||
</CompileXaml> |
|
||||
|
|
||||
<ItemGroup> |
|
||||
<FileWrites Include="$(XamlSavedStateFilePath)" /> |
|
||||
</ItemGroup> |
|
||||
|
|
||||
<Message Text="(Out) GeneratedCodeFiles: '@(_GeneratedCodeFiles)'" /> |
|
||||
<Message Text="(Out) ClCompile: '@(ClCompile)'" Condition="'$(ManagedAssembly)'=='false' and '%(ClCompile.CompilerIteration)'!='XamlGenerated'"/> |
|
||||
<Message Text="(Out) Compile: '@(Compile)'" Condition="'$(ManagedAssembly)'!='false'"/> |
|
||||
|
|
||||
<PropertyGroup> |
|
||||
<PrevWarningLevel>$(WarningLevel)</PrevWarningLevel> |
|
||||
<WarningLevel Condition="'$(SuppressWarningsInPass1)'=='true'">0</WarningLevel> |
|
||||
</PropertyGroup> |
|
||||
</Target> |
|
||||
|
|
||||
<!-- |
|
||||
================================================================ |
|
||||
MarkupCompilePass2 |
|
||||
================================================================ |
|
||||
--> |
|
||||
|
|
||||
<Target Name="MarkupCompilePass2" |
|
||||
DependsOnTargets="$(MarkupCompilePass2DependsOn)" |
|
||||
Condition="'@(Page)' != '' Or '@(ApplicationDefinition)' != '' " > |
|
||||
|
|
||||
<PropertyGroup> |
|
||||
<WarningLevel>$(PrevWarningLevel)</WarningLevel> |
|
||||
<WarningLevel Condition="'$(WarningLevel)' == '' and '$(ExplicitResetWarningSuppression)' == 'true'">1</WarningLevel> |
|
||||
</PropertyGroup> |
|
||||
|
|
||||
<!-- The Name of the Local Assembly in Managed and Native --> |
|
||||
<PropertyGroup> |
|
||||
<LocalAssembly Condition="'$(LocalAssembly)' == '' and Exists(@(XamlIntermediateAssembly))"> |
|
||||
@(XamlIntermediateAssembly->'%(Identity)') |
|
||||
</LocalAssembly> |
|
||||
</PropertyGroup> |
|
||||
|
|
||||
<CallTarget Targets="SDKRedistOutputGroup" Condition="'$(IncludeSDKRedistOutputGroup)' == 'true'"> |
|
||||
<Output TaskParameter="TargetOutputs" ItemName="_SDKRedistOutputGroupOutput_xaml"/> |
|
||||
</CallTarget> |
|
||||
<ItemGroup> |
|
||||
<SdkXamlItems Include="@(_SDKRedistOutputGroupOutput_xaml)" Condition="'%(Extension)'=='.xaml'" /> |
|
||||
</ItemGroup> |
|
||||
|
|
||||
<ItemGroup> |
|
||||
<!-- C++ provides a filtered Item that eliminates any Managed Assemblies on the ReferencePath (from SDKs for example) --> |
|
||||
<XamlReferencesToCompile Condition="'$(Language)'=='C++'" Include="@(WinMDReferenceToCompile)" /> |
|
||||
<XamlReferencesToCompile Condition="'$(Language)'!='C++'" Include="@(ReferencePath)" /> |
|
||||
</ItemGroup> |
|
||||
|
|
||||
<CompileXaml |
|
||||
LanguageSourceExtension="$(DefaultLanguageSourceExtension)" |
|
||||
Language="$(Language)" |
|
||||
RootNamespace="$(RootNamespace)" |
|
||||
XamlPages="@(Page)" |
|
||||
XamlApplications="@(ApplicationDefinition)" |
|
||||
SdkXamlPages="@(SdkXamlItems)" |
|
||||
PriIndexName="$(PriIndexName)" |
|
||||
ProjectName="$(MsBuildProjectName)" |
|
||||
IsPass1="False" |
|
||||
DisableXbfGeneration="$(DisableXbfGeneration)" |
|
||||
CodeGenerationControlFlags="$(XamlCodeGenerationControlFlags)" |
|
||||
ClIncludeFiles="@(ClInclude)" |
|
||||
CIncludeDirectories="$(XamlCppIncludeDirectories)" |
|
||||
LocalAssembly="$(LocalAssembly)" |
|
||||
ProjectPath="$(MSBuildProjectFullPath)" |
|
||||
OutputPath="$(XamlGeneratedOutputPath)" |
|
||||
OutputType="$(OutputType)" |
|
||||
ReferenceAssemblyPaths="@(ReferenceAssemblyPaths)" |
|
||||
ReferenceAssemblies="@(XamlReferencesToCompile)" |
|
||||
ForceSharedStateShutdown="False" |
|
||||
CompileMode="RealBuildPass2" |
|
||||
XAMLFingerprint="$(XAMLFingerprint)" |
|
||||
FingerprintIgnorePaths="$(XAMLFingerprintIgnorePaths)" |
|
||||
VCInstallDir="$(VCInstallDir)" |
|
||||
SavedStateFile="$(XamlSavedStateFilePath)" |
|
||||
RootsLog="$(XamlRootsLog)" |
|
||||
SuppressWarnings="$(SuppressXamlWarnings)" |
|
||||
> |
|
||||
<Output Condition=" '$(ManagedAssembly)'!='false' " ItemName="Compile" TaskParameter="GeneratedCodeFiles" /> |
|
||||
<Output Condition=" '$(ManagedAssembly)'=='false' " ItemName="XamlGFiles" TaskParameter="GeneratedCodeFiles" /> |
|
||||
|
|
||||
<!-- |
|
||||
FileWrites is used in Microsoft.Common.targets for "Clean" build |
|
||||
--> |
|
||||
<Output ItemName="FileWrites" TaskParameter="GeneratedCodeFiles" /> |
|
||||
<Output ItemName="FileWrites" TaskParameter="GeneratedXamlFiles" /> |
|
||||
<Output ItemName="FileWrites" TaskParameter="GeneratedXbfFiles" /> |
|
||||
<Output ItemName="_GeneratedCodeFiles" TaskParameter="GeneratedCodeFiles" /> |
|
||||
<Output ItemName="_GeneratedXamlFiles" TaskParameter="GeneratedXamlFiles" /> |
|
||||
<Output ItemName="_GeneratedXbfFiles" TaskParameter="GeneratedXbfFiles" /> |
|
||||
</CompileXaml> |
|
||||
|
|
||||
<ItemGroup> |
|
||||
<FileWrites Include="$(XamlSavedStateFilePath)" /> |
|
||||
<FileWrites Condition="'$(XamlRootsLog)' != ''" Include="$(XamlRootsLog)" /> |
|
||||
</ItemGroup> |
|
||||
|
|
||||
<Message Text="(Out) GeneratedCodeFiles: '@(_GeneratedCodeFiles)'" /> |
|
||||
<Message Text="(Out) GeneratedXamlFiles: '@(_GeneratedXamlFiles)'" /> |
|
||||
<Message Text="(Out) GeneratedXbfFiles: '@(_GeneratedXbfFiles)'" /> |
|
||||
<Message Text="(Out) ClCompile: '@(ClCompile)'" Condition="'$(ManagedAssembly)'=='false'"/> |
|
||||
<Message Text="(Out) Compile: '@(Compile)'" Condition="'$(ManagedAssembly)'!='false'"/> |
|
||||
</Target> |
|
||||
|
|
||||
<Target Name="_OnXamlPreCompileError" |
|
||||
DependsOnTargets="$(_OnXamlPrecompileErrorDependsOn)" > |
|
||||
|
|
||||
<CompileXaml |
|
||||
ProjectPath="$(MSBuildProjectFullPath)" |
|
||||
Language="$(Language)" |
|
||||
LanguageSourceExtension="$(DefaultLanguageSourceExtension)" |
|
||||
OutputPath="$(XamlGeneratedOutputPath)" |
|
||||
ReferenceAssemblies="@(ReferencePath)" |
|
||||
ReferenceAssemblyPaths="@(ReferenceAssemblyPaths)" |
|
||||
XamlPages="@(Page)" |
|
||||
XamlApplications="@(ApplicationDefinition)" |
|
||||
ForceSharedStateShutdown="True" |
|
||||
CompileMode="OnErrorShutdown" |
|
||||
SavedStateFile="$(XamlSavedStateFilePath)" |
|
||||
> |
|
||||
</CompileXaml> |
|
||||
</Target> |
|
||||
|
|
||||
<Target Name="Prep_ComputeProcessXamlFiles" |
|
||||
Condition="'@(ApplicationDefinition)'!='' or '@(Page)'!=''" |
|
||||
DependsOnTargets="$(Prep_ComputeProcessXamlFilesDependsOn)" > |
|
||||
|
|
||||
<!-- collect all the XAML pages from the Project file into one Item --> |
|
||||
<ItemGroup> |
|
||||
<AllProjectXamlPages Condition="'%(ApplicationDefinition.ExcludedFromBuild)'!='true'" Include="@(ApplicationDefinition)" /> |
|
||||
<AllProjectXamlPages Condition="'%(Page.ExcludedFromBuild)'!='true'" Include="@(Page)" /> |
|
||||
</ItemGroup> |
|
||||
|
|
||||
<!-- For ttems are outside the project cone Link metadata tells us what the apparent project path should be. |
|
||||
C++ doesn't use Link data, so for C++ add implied DefaultXamlLink metadata based on the Include Path --> |
|
||||
<AddDefaultXamlLinkMetadata Condition="'$(ManagedAssembly)'=='false'" |
|
||||
ProjectPath="$(ProjectPath)" |
|
||||
XamlPages="@(AllProjectXamlPages)" |
|
||||
CIncludeDirectories ="$(XamlCppIncludeDirectories)"> |
|
||||
<Output TaskParameter="OutputItems" ItemName="_Temp" /> |
|
||||
</AddDefaultXamlLinkMetadata> |
|
||||
|
|
||||
<!-- Remove the Items named in _Temp, then add the actual items from _Temp, then clear _Temp --> |
|
||||
<ItemGroup> |
|
||||
<AllProjectXamlPages Remove="@(_Temp)" /> |
|
||||
<AllProjectXamlPages Include="@(_Temp)" /> |
|
||||
<_Temp Remove="@(_Temp)" /> |
|
||||
</ItemGroup> |
|
||||
|
|
||||
<!-- transfer the DefaultXamlLink data to the Link attribute --> |
|
||||
<ItemGroup> |
|
||||
<AllProjectXamlPages Condition="'%(AllProjectXamlPages.DefaultXamlLink)'!=''"> |
|
||||
<Link>%(AllProjectXamlPages.DefaultXamlLink)</Link> |
|
||||
</AllProjectXamlPages> |
|
||||
</ItemGroup> |
|
||||
|
|
||||
<!-- Compute the Generated XAML source path and the bin dir Destination path --> |
|
||||
<!-- If there is a Link use that, otherwise use the Given path from the Project file Item --> |
|
||||
<ItemGroup> |
|
||||
<GeneratedXamlSrc0 Condition="'%(AllProjectXamlPages.Link)'!=''" Include="@(AllProjectXamlPages->'$(XamlGeneratedOutputPath)%(Link)')" /> |
|
||||
<GeneratedXamlSrc0 Condition="'%(AllProjectXamlPages.Link)'==''" Include="@(AllProjectXamlPages->'$(XamlGeneratedOutputPath)%(Identity)')" /> |
|
||||
|
|
||||
<GeneratedXamlDest0 Condition="'%(AllProjectXamlPages.Link)'!=''" Include="@(AllProjectXamlPages->'$(OutputPath)\%(Link)')" /> |
|
||||
<GeneratedXamlDest0 Condition="'%(AllProjectXamlPages.Link)'==''" Include="@(AllProjectXamlPages->'$(OutputPath)\%(Identity)')" /> |
|
||||
</ItemGroup> |
|
||||
|
|
||||
<!-- Swap in the XBF suffix if appropriate. --> |
|
||||
<ItemGroup Condition="'$(DisableXbfGeneration)' == 'true'"> |
|
||||
<GeneratedXamlSrc Include="@(GeneratedXamlSrc0)" /> |
|
||||
<GeneratedXamlDest Include="@(GeneratedXamlDest0)" /> |
|
||||
</ItemGroup> |
|
||||
<ItemGroup Condition="'$(DisableXbfGeneration)' != 'true'"> |
|
||||
<GeneratedXamlSrc Include="%(GeneratedXamlSrc0.RelativeDir)%(GeneratedXamlSrc0.Filename).xbf" /> |
|
||||
<GeneratedXamlDest Include="%(GeneratedXamlDest0.RelativeDir)%(GeneratedXamlDest0.Filename).xbf" /> |
|
||||
</ItemGroup> |
|
||||
|
|
||||
<!-- if we converted SDK XAML into XBF, add the XBF to the list, and remove the XAML from the list --> |
|
||||
<ItemGroup Condition="'$(DisableXbfGeneration)' != 'true' and '@(SdkXamlItems)' != ''"> |
|
||||
<GeneratedSdkXamlSrc0 Include="@(SdkXamlItems->'$(XamlGeneratedOutputPath)%(TargetPath)')" /> |
|
||||
<GeneratedSdkXamlDest0 Include="@(SdkXamlItems->'$(OutputPath)\%(TargetPath)')" /> |
|
||||
|
|
||||
<GeneratedXamlSrc Include="%(GeneratedSdkXamlSrc0.RelativeDir)%(GeneratedSdkXamlSrc0.Filename).xbf" /> |
|
||||
<GeneratedXamlDest Include="%(GeneratedSdkXamlDest0.RelativeDir)%(GeneratedSdkXamlDest0.Filename).xbf" /> |
|
||||
<RemoveSdkFilesFromAppxPackage Include="@(SdkXamlItems)" /> |
|
||||
</ItemGroup> |
|
||||
|
|
||||
<ItemGroup Condition="'$(XamlRootsLog)' != ''"> |
|
||||
<GeneratedXamlSrc Include="$(XamlGeneratedOutputPath)\$(XamlRootsLog)" /> |
|
||||
<GeneratedXamlDest Include="$(OutputPath)\$(XamlRootsLog)" /> |
|
||||
</ItemGroup> |
|
||||
|
|
||||
<Message Importance="low" Text="(Out) Prep_GeneratedXamlSrc == @(GeneratedXamlSrc)" /> |
|
||||
<Message Importance="low" Text="(Out) Prep_GeneratedXamlDest == @(GeneratedXamlDest)" /> |
|
||||
</Target> |
|
||||
|
|
||||
<!-- if $GenerateLibraryLayout is True this is skipped and see the PrepareLibraryLayout target --> |
|
||||
<Target Name="CopyGeneratedXaml" BeforeTargets="CopyFilesToOutputDirectory" DependsOnTargets="Prep_ComputeProcessXamlFiles" |
|
||||
Condition="'$(GenerateLibraryLayout)' != 'true'"> |
|
||||
<Copy |
|
||||
SourceFiles="@(GeneratedXamlSrc)" |
|
||||
DestinationFiles="@(GeneratedXamlDest)" |
|
||||
SkipUnchangedFiles="$(SkipCopyUnchangedFiles)" |
|
||||
OverwriteReadOnlyFiles="$(OverwriteReadOnlyFiles)" |
|
||||
Retries="$(CopyRetryCount)" |
|
||||
RetryDelayMilliseconds="$(CopyRetryDelayMilliseconds)" |
|
||||
UseHardlinksIfPossible="$(CreateHardLinksForCopyFilesToOutputDirectoryIfPossible)" |
|
||||
/> |
|
||||
<ItemGroup> |
|
||||
<FileWrites Include="@(GeneratedXamlDest)" /> |
|
||||
</ItemGroup> |
|
||||
</Target> |
|
||||
|
|
||||
<Target Name="ComputeProcessXamlFiles" Returns="@(ProcessedXamlFiles)" DependsOnTargets="Prep_ComputeProcessXamlFiles"> |
|
||||
<ItemGroup > |
|
||||
<!-- In the normal (non-SDK) build, AppX Packaging picks up the files from the bin aka OutputPath folder --> |
|
||||
<ProcessedXamlFiles Condition="'$(GenerateLibraryLayout)' != 'true'" Include="@(GeneratedXamlDest)" /> |
|
||||
|
|
||||
<!-- In the SDK build, AppX Packaging picks up the files from the XamlGeneratedOutput folder --> |
|
||||
<!-- For SDK builds include both the XAML and XBF --> |
|
||||
<ProcessedXamlFiles Condition="'$(GenerateLibraryLayout)' == 'true'" Include="@(GeneratedXamlSrc)" /> |
|
||||
<ProcessedXamlFiles Condition="'$(GenerateLibraryLayout)' == 'true' and '$(DisableXbfGeneration)' != 'true'" |
|
||||
Include="@(GeneratedXamlSrc0)" /> |
|
||||
</ItemGroup> |
|
||||
<Message Importance="Low" Text="(Out) GeneratedXamlDest == @(GeneratedXamlDest)" /> |
|
||||
<Message Importance="Low" Text="(Out) GeneratedXamlSrc == @(GeneratedXamlSrc)" /> |
|
||||
<Message Text="(Out) ProcessedXamlFiles == @(ProcessedXamlFiles)" /> |
|
||||
</Target> |
|
||||
|
|
||||
<Target Name="CustomOutputGroupForPackaging" |
|
||||
DependsOnTargets="ComputeProcessXamlFiles" |
|
||||
Returns="@(CustomOutputGroupForPackagingOutput)" |
|
||||
> |
|
||||
<ItemGroup> |
|
||||
<ProcessedXamlFilesFullPath Include="@(ProcessedXamlFiles->'%(FullPath)')" /> |
|
||||
</ItemGroup> |
|
||||
<PropertyGroup> |
|
||||
<XamlPackagingRootFolder Condition="'$(GenerateLibraryLayout)' == 'true'">$(XamlGeneratedOutputPath)</XamlPackagingRootFolder> |
|
||||
<XamlPackagingRootFolder Condition="'$(GenerateLibraryLayout)' != 'true'">$(OutputPath)\</XamlPackagingRootFolder> |
|
||||
</PropertyGroup> |
|
||||
|
|
||||
<AssignTargetPath Files="@(ProcessedXamlFilesFullPath)" RootFolder="$(XamlPackagingRootFolder)"> |
|
||||
<Output TaskParameter="AssignedFiles" ItemName="CustomOutputGroupForPackagingOutput" /> |
|
||||
</AssignTargetPath> |
|
||||
|
|
||||
<Message Text="(Out) Project='$(MsBuildProjectName)' ProcessedXamlFiles == @(ProcessedXamlFiles)" /> |
|
||||
<Message Text="(Out) XamlPackagingRootFolder == $(XamlPackagingRootFolder)" /> |
|
||||
<Message Text="(Out) ProcessedXamlFilesFullPath == @(ProcessedXamlFilesFullPath)" /> |
|
||||
<Message Text="(Out) Project='$(MsBuildProjectName)' CustomOutputGroupForPackagingOutput == @(CustomOutputGroupForPackagingOutput)" /> |
|
||||
|
|
||||
</Target> |
|
||||
|
|
||||
<PropertyGroup> |
|
||||
<PrepareLibraryLayoutDependsOn> |
|
||||
GetPackagingOutputs; |
|
||||
$(PrepareLibraryLayoutDependsOn) |
|
||||
</PrepareLibraryLayoutDependsOn> |
|
||||
</PropertyGroup> |
|
||||
|
|
||||
<!-- This builds the Bin Folder for DLL's that wish to have the SDK type layout --> |
|
||||
<Target Name="PrepareLibraryLayout" |
|
||||
Condition="'$(GenerateLibraryLayout)' == 'true'" |
|
||||
DependsOnTargets="$(PrepareLibraryLayoutDependsOn)" |
|
||||
BeforeTargets="CopyFilesToOutputDirectory" |
|
||||
> |
|
||||
|
|
||||
<ItemGroup> |
|
||||
<_LayoutFile Include="@(PackagingOutputs)" Condition="'%(OutputGroup)' == 'ContentFilesProjectOutputGroup'" /> |
|
||||
<_LayoutFile Include="@(PackagingOutputs)" Condition="'%(OutputGroup)' == 'CustomOutputGroupForPackaging'" /> |
|
||||
</ItemGroup> |
|
||||
|
|
||||
<Copy SourceFiles="@(_LayoutFile)" |
|
||||
DestinationFiles="@(_LayoutFile->'$(OutputPath)\%(TargetPath)')" |
|
||||
SkipUnchangedFiles="$(SkipCopyUnchangedFiles)" |
|
||||
OverwriteReadOnlyFiles="$(OverwriteReadOnlyFiles)" |
|
||||
Retries="$(CopyRetryCount)" |
|
||||
RetryDelayMilliseconds="$(CopyRetryDelayMilliseconds)" |
|
||||
UseHardlinksIfPossible="$(CreateHardLinksForCopyFilesToOutputDirectoryIfPossible)" |
|
||||
/> |
|
||||
</Target> |
|
||||
|
|
||||
<!-- |
|
||||
============================================================ |
|
||||
Properties and Targets Common to Managed .NETCore projects |
|
||||
============================================================ |
|
||||
--> |
|
||||
|
|
||||
<!-- |
|
||||
The ImplicitlyExpandTargetFramework target will expand all |
|
||||
of the dll reference assemblies in the TargetFrameworkDirectory |
|
||||
for the project and place the items into the ReferencePath itemgroup |
|
||||
which contains resolved items. |
|
||||
--> |
|
||||
<PropertyGroup> |
|
||||
<ResolveReferencesDependsOn> |
|
||||
$(ResolveReferencesDependsOn); |
|
||||
ImplicitlyExpandTargetFramework; |
|
||||
ImplicitlyExpandTargetPlatform |
|
||||
</ResolveReferencesDependsOn> |
|
||||
|
|
||||
<ImplicitlyExpandTargetFrameworkDependsOn> |
|
||||
$(ImplicitlyExpandTargetFrameworkDependsOn); |
|
||||
GetReferenceAssemblyPaths |
|
||||
</ImplicitlyExpandTargetFrameworkDependsOn> |
|
||||
</PropertyGroup> |
|
||||
|
|
||||
<Target Name="ImplicitlyExpandTargetFramework" |
|
||||
Condition="'$(ImplicitlyExpandTargetFramework)' == 'true'" |
|
||||
DependsOnTargets="$(ImplicitlyExpandTargetFrameworkDependsOn)" |
|
||||
> |
|
||||
<ItemGroup> |
|
||||
<ReferenceAssemblyPaths Include="$(_TargetFrameworkDirectories)"/> |
|
||||
<ReferencePath Include="%(ReferenceAssemblyPaths.Identity)*.dll"> |
|
||||
<WinMDFile>false</WinMDFile> |
|
||||
<CopyLocal>false</CopyLocal> |
|
||||
<ReferenceGroupingDisplayName>.NET for Windows Store apps</ReferenceGroupingDisplayName> |
|
||||
<ReferenceGrouping>$(TargetFrameworkMoniker)</ReferenceGrouping> |
|
||||
<ResolvedFrom>ImplicitlyExpandTargetFramework</ResolvedFrom> |
|
||||
<IsSystemReference>True</IsSystemReference> |
|
||||
</ReferencePath> |
|
||||
</ItemGroup> |
|
||||
|
|
||||
<Message Importance="Low" Text="TargetMonikerDisplayName: $(TargetFrameworkMonikerDisplayName) ReferenceAssemblyPaths: @(ReferenceAssemblyPaths)"/> |
|
||||
|
|
||||
<Message Importance="Low" Text="Including @(ReferencePath)" |
|
||||
Condition="'%(ReferencePath.ResolvedFrom)' == 'ImplicitlyExpandTargetFramework'"/> |
|
||||
|
|
||||
<ItemGroup> |
|
||||
<_ResolveAssemblyReferenceResolvedFiles Include="@(ReferencePath)" |
|
||||
Condition="'%(ReferencePath.ResolvedFrom)' == 'ImplicitlyExpandTargetFramework'"/> |
|
||||
</ItemGroup> |
|
||||
</Target> |
|
||||
|
|
||||
<!-- |
|
||||
The ImplicitlyExpandTargetPlatform target will expand all |
|
||||
of the winmd files in the windowsSDK and add them the the |
|
||||
ReferencePath item which is the itemgroup which contains |
|
||||
resolved items. |
|
||||
--> |
|
||||
<Target Name="ImplicitlyExpandTargetPlatform" |
|
||||
Condition="'$(ImplicitlyExpandTargetPlatform)' == 'true'" |
|
||||
> |
|
||||
<ItemGroup> |
|
||||
<ReferencePath Include="$(TargetPlatformWinMDLocation)\*.winmd"> |
|
||||
<WinMDFile>true</WinMDFile> |
|
||||
<CopyLocal>false</CopyLocal> |
|
||||
<ReferenceGrouping>$(TargetPlatformMoniker)</ReferenceGrouping> |
|
||||
<ReferenceGroupingDisplayName>$(TargetPlatformDisplayName)</ReferenceGroupingDisplayName> |
|
||||
<ResolvedFrom>ImplicitlyExpandTargetPlatform</ResolvedFrom> |
|
||||
<IsSystemReference>True</IsSystemReference> |
|
||||
</ReferencePath> |
|
||||
</ItemGroup> |
|
||||
|
|
||||
<Warning Condition="!Exists($(TargetPlatformWinMDLocation))" |
|
||||
Text="The path to the $(TargetPlatformIdentifier) SDK [$(TargetPlatformWinMDLocation)] was not found!"/> |
|
||||
|
|
||||
<Message Importance="Low" Text="Including @(ReferencePath)" |
|
||||
Condition="'%(ReferencePath.ResolvedFrom)' == 'ImplicitlyExpandTargetPlatform'"/> |
|
||||
|
|
||||
<ItemGroup> |
|
||||
<_ResolveAssemblyReferenceResolvedFiles Include="@(ReferencePath)" |
|
||||
Condition="'%(ReferencePath.ResolvedFrom)' == 'ImplicitlyExpandTargetPlatform'"/> |
|
||||
</ItemGroup> |
|
||||
</Target> |
|
||||
|
|
||||
<!-- |
|
||||
Enable warning when referenced projects have higher version than the current project |
|
||||
for Windows Store projects |
|
||||
--> |
|
||||
<PropertyGroup> |
|
||||
<FindInvalidProjectReferences Condition="'$(TargetPlatformIdentifier)' == 'Windows' and |
|
||||
'$(TargetPlatformVersion)' >= '8.0'">true</FindInvalidProjectReferences> |
|
||||
</PropertyGroup> |
|
||||
|
|
||||
<!-- |
|
||||
Enable warning when referenced ESDKs do not have MaxPlatformVersion |
|
||||
specified for Windows Store projects |
|
||||
--> |
|
||||
<PropertyGroup> |
|
||||
<SDKReferenceWarnOnMissingMaxPlatformVersion Condition="'$(SDKReferenceWarnOnMissingMaxPlatformVersion)' == '' and |
|
||||
'$(TargetPlatformIdentifier)' == 'Windows' and |
|
||||
'$(TargetPlatformVersion)' >= '8.0'">true</SDKReferenceWarnOnMissingMaxPlatformVersion> |
|
||||
</PropertyGroup> |
|
||||
|
|
||||
|
|
||||
<Import Project="ImportAfter\*"/> |
|
||||
|
|
||||
</Project> |
|
||||
@ -1,52 +0,0 @@ |
|||||
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> |
|
||||
<ItemGroup Condition=" '$(IsCodeSharingProject)' != 'true' "> |
|
||||
<!-- SDK references --> |
|
||||
<PropertyPageSchema Include="$(MSBuildThisFileDirectory)$(LangName)\SDKReference.xaml"> |
|
||||
<Context>;BrowseObject</Context> |
|
||||
</PropertyPageSchema> |
|
||||
<PropertyPageSchema Include="$(MSBuildThisFileDirectory)$(LangName)\ResolvedSDKReference.xaml"> |
|
||||
<Context>ProjectCapabilitySubscriptionService;BrowseObject</Context> |
|
||||
</PropertyPageSchema> |
|
||||
<ProjectCapability Include="SDKReferences" /> |
|
||||
|
|
||||
<!-- WinRT references --> |
|
||||
<!-- No need for WinRTReference.xaml because we share an item type with AssemblyReference.xaml --> |
|
||||
<ProjectCapability Include="WinRTReferences" /> |
|
||||
</ItemGroup> |
|
||||
<ItemGroup> |
|
||||
<!-- Xaml item types --> |
|
||||
<PropertyPageSchema Include=" |
|
||||
$(MSBuildThisFileDirectory)$(LangName)\PRIResource.xaml; |
|
||||
$(MSBuildThisFileDirectory)$(LangName)\ApplicationDefinition.xaml; |
|
||||
$(MSBuildThisFileDirectory)$(LangName)\Page.xaml; |
|
||||
$(MSBuildThisFileDirectory)$(LangName)\AppxManifest.xaml; |
|
||||
$(MSBuildThisFileDirectory)$(LangName)\DesignData.xaml; |
|
||||
$(MSBuildThisFileDirectory)$(LangName)\DesignDataWithDesignTimeCreatableTypes.xaml; |
|
||||
"> |
|
||||
<Context>File;BrowseObject</Context> |
|
||||
</PropertyPageSchema> |
|
||||
|
|
||||
<PropertyPageSchema Include="$(MSBuildThisFileDirectory)$(LangName)\ProjectItemsSchema.xaml"/> |
|
||||
</ItemGroup> |
|
||||
|
|
||||
<ItemDefinitionGroup Condition=" '$(DefineExplicitDefaults)' == 'true' "> |
|
||||
<PRIResource> |
|
||||
<CopyToOutputDirectory>Never</CopyToOutputDirectory> |
|
||||
</PRIResource> |
|
||||
<AppxManifest> |
|
||||
<CopyToOutputDirectory>Never</CopyToOutputDirectory> |
|
||||
</AppxManifest> |
|
||||
<Page> |
|
||||
<CopyToOutputDirectory>Never</CopyToOutputDirectory> |
|
||||
</Page> |
|
||||
<ApplicationDefinition> |
|
||||
<CopyToOutputDirectory>Never</CopyToOutputDirectory> |
|
||||
</ApplicationDefinition> |
|
||||
<DesignData> |
|
||||
<CopyToOutputDirectory>Never</CopyToOutputDirectory> |
|
||||
</DesignData> |
|
||||
<DesignDataWithDesignTimeCreatableTypes> |
|
||||
<CopyToOutputDirectory>Never</CopyToOutputDirectory> |
|
||||
</DesignDataWithDesignTimeCreatableTypes> |
|
||||
</ItemDefinitionGroup> |
|
||||
</Project> |
|
||||
@ -1,48 +0,0 @@ |
|||||
<!-- |
|
||||
*********************************************************************************************** |
|
||||
Microsoft.Windows.UI.Xaml.VisualBasic.targets |
|
||||
|
|
||||
WARNING: DO NOT MODIFY this file unless you are knowledgeable about MSBuild and have |
|
||||
created a backup copy. Incorrect changes to this file will make it |
|
||||
impossible to load or build your projects from the command-line or the IDE. |
|
||||
|
|
||||
Copyright (C) Microsoft Corporation. All rights reserved. |
|
||||
*********************************************************************************************** |
|
||||
--> |
|
||||
|
|
||||
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> |
|
||||
|
|
||||
<PropertyGroup Condition=" '$(TargetPlatformIdentifier)' == 'WindowsPhoneApp' "> |
|
||||
<TargetPlatformVersion Condition="'$(TargetPlatformVersion)' == ''">8.1</TargetPlatformVersion> |
|
||||
<TargetFrameworkIdentifier Condition="'$(TargetFrameworkIdentifier)' == ''">WindowsPhoneApp</TargetFrameworkIdentifier> |
|
||||
<TargetFrameworkVersion Condition="'$(TargetFrameworkVersion)' == ''">v8.1</TargetFrameworkVersion> |
|
||||
</PropertyGroup> |
|
||||
|
|
||||
<PropertyGroup Condition=" '$(TargetPlatformIdentifier)' == 'windows' OR '$(TargetPlatformIdentifier)' == '' "> |
|
||||
<TargetPlatformVersion Condition="'$(TargetPlatformVersion)' == ''">8.1</TargetPlatformVersion> |
|
||||
<TargetFrameworkIdentifier Condition="'$(TargetFrameworkIdentifier)' == ''">.NETCore</TargetFrameworkIdentifier> |
|
||||
<TargetFrameworkVersion Condition="'$(TargetFrameworkVersion)' == ''">v4.5.1</TargetFrameworkVersion> |
|
||||
</PropertyGroup> |
|
||||
|
|
||||
<PropertyGroup> |
|
||||
<ImplicitlyExpandTargetPlatform Condition="'$(ImplicitlyExpandTargetPlatform)' == '' ">true</ImplicitlyExpandTargetPlatform> |
|
||||
<ImplicitlyExpandTargetFramework Condition="'$(ImplicitlyExpandTargetFramework)' == '' ">true</ImplicitlyExpandTargetFramework> |
|
||||
<NoStdLib Condition="'$(NoStdLib)' == ''">true</NoStdLib> |
|
||||
<UseVSHostingProcess>false</UseVSHostingProcess> |
|
||||
<WindowsAppContainer>true</WindowsAppContainer> |
|
||||
<AppxPackage Condition="'$(OutputType)' == 'AppContainerExe'">True</AppxPackage> |
|
||||
|
|
||||
<SuppressWarningsInPass1 Condition="'$(SuppressWarningsInPass1)' == '' ">true</SuppressWarningsInPass1> |
|
||||
<ExplicitResetWarningSuppression>true</ExplicitResetWarningSuppression> |
|
||||
|
|
||||
<MyType Condition="'$(MyType)' == ''">Empty</MyType> |
|
||||
</PropertyGroup> |
|
||||
|
|
||||
<Import Project="$(MSBuildBinPath)\Microsoft.VisualBasic.targets" /> |
|
||||
<Import Project="Microsoft.Windows.UI.Xaml.Common.targets" /> |
|
||||
<Import Project="Microsoft.Windows.UI.Xaml.Cps.targets" /> |
|
||||
|
|
||||
<ItemGroup> |
|
||||
<PropertyPageSchema Include="$(MSBuildThisFileDirectory)$(LangName)\VisualBasic.ProjectItemsSchema.xaml"/> |
|
||||
</ItemGroup> |
|
||||
</Project> |
|
||||
Binary file not shown.
@ -1,174 +0,0 @@ |
|||||
<!-- |
|
||||
*********************************************************************************************** |
|
||||
Microsoft.Windows.UI.Xaml.Cpp.targets |
|
||||
|
|
||||
WARNING: DO NOT MODIFY this file unless you are knowledgeable about MSBuild and have |
|
||||
created a backup copy. Incorrect changes to this file will make it |
|
||||
impossible to load or build your projects from the command-line or the IDE. |
|
||||
|
|
||||
Copyright (C) Microsoft Corporation. All rights reserved. |
|
||||
*********************************************************************************************** |
|
||||
--> |
|
||||
|
|
||||
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> |
|
||||
<PropertyGroup> |
|
||||
<BeforeClCompileTargets> |
|
||||
MarkupCompilePass1; |
|
||||
$(BeforeClCompileTargets) |
|
||||
</BeforeClCompileTargets> |
|
||||
|
|
||||
<ComputeCompileInputsTargets> |
|
||||
ComputeXamlGeneratedCompileInputs; |
|
||||
$(ComputeCompileInputsTargets) |
|
||||
</ComputeCompileInputsTargets> |
|
||||
|
|
||||
<AfterBuildCompileTargets> |
|
||||
$(ComputeLinkInputsTargets); |
|
||||
CreateWinMD; |
|
||||
ComputeGeneratedWinMD; |
|
||||
MarkupCompilePass2; |
|
||||
ComputeInvalidXamlGenerated; |
|
||||
CompileXamlGeneratedFiles; |
|
||||
$(AfterBuildCompileTargets) |
|
||||
</AfterBuildCompileTargets> |
|
||||
|
|
||||
<XamlPreLinkDependsOn> |
|
||||
$(XamlPreLinkDependsOn); |
|
||||
ComputeXamlGeneratedCLOutputs |
|
||||
</XamlPreLinkDependsOn> |
|
||||
|
|
||||
<GenerateProjectionAssembly>True</GenerateProjectionAssembly> |
|
||||
<OnlyCreateWinMD>true</OnlyCreateWinMD> |
|
||||
<ImplicitlyExpandTargetPlatform>false</ImplicitlyExpandTargetPlatform> |
|
||||
</PropertyGroup> |
|
||||
|
|
||||
<PropertyGroup> |
|
||||
<ValidatePresenceOfAppxManifestItemsDependsOn> |
|
||||
$(ValidatePresenceOfAppxManifestItemsDependsOn); |
|
||||
_CreateContentItemOutOfCustomAppxManifest |
|
||||
</ValidatePresenceOfAppxManifestItemsDependsOn> |
|
||||
</PropertyGroup> |
|
||||
|
|
||||
<ItemGroup> |
|
||||
<PropertyPageSchema Include="$(VCTargetsPath)$(LangID)\Xaml.xml" /> |
|
||||
</ItemGroup> |
|
||||
|
|
||||
<!-- This is a proxy target that holds stuff that runs before the final Link --> |
|
||||
<Target Name="XamlPreLink" BeforeTargets="Link" DependsOnTargets="$(XamlPreLinkDependsOn)" /> |
|
||||
|
|
||||
<Target Name="ComputeGeneratedWinMD" > |
|
||||
<PropertyGroup> |
|
||||
<LocalAssembly Condition="'$(LocalAssembly)' == '' and '%(Link.WindowsMetadataFile)' != ''">%(Link.WindowsMetadataFile)</LocalAssembly> |
|
||||
</PropertyGroup> |
|
||||
</Target> |
|
||||
|
|
||||
<!-- Change AppxManifest.xml override item to be of Content type. --> |
|
||||
<Target Name="_CreateContentItemOutOfCustomAppxManifest"> |
|
||||
<ItemGroup> |
|
||||
<Content Include="@(Xml)" Condition="'%(Identity)' == 'AppxManifest.xml'" /> |
|
||||
<Xml Remove="@(Xml)" Condition="'%(Identity)' == 'AppxManifest.xml'" /> |
|
||||
</ItemGroup> |
|
||||
</Target> |
|
||||
|
|
||||
<PropertyGroup> |
|
||||
<GeneratedFilesDir Condition=" '$(GeneratedFilesDir)' == ''">Generated Files\</GeneratedFilesDir> |
|
||||
<XamlGeneratedOutputPath>$(GeneratedFilesDir)</XamlGeneratedOutputPath> |
|
||||
<ExtensionsToDeleteOnClean>$(ExtensionsToDeleteOnClean);*.g.h;*.g.cpp;*.xaml</ExtensionsToDeleteOnClean> |
|
||||
</PropertyGroup> |
|
||||
|
|
||||
<Import Project="Microsoft.Windows.UI.Xaml.Common.targets" /> |
|
||||
|
|
||||
<ItemGroup> |
|
||||
<PropertyPageSchema Include="$(MSBuildThisFileDirectory)$(LangName)\Cpp.ProjectItemsSchema.xaml"/> |
|
||||
</ItemGroup> |
|
||||
|
|
||||
<!-- Generated files output group population --> |
|
||||
<PropertyGroup> |
|
||||
<GeneratedFilesOutputGroupDependsOn>XamlGeneratedFilesOutputGroup;$(GeneratedFilesOutputGroupDependsOn)</GeneratedFilesOutputGroupDependsOn> |
|
||||
</PropertyGroup> |
|
||||
|
|
||||
<Target Name="XamlGeneratedFilesOutputGroup" |
|
||||
DependsOnTargets="$(XamlGeneratedFilesOutputGroupDependsOn)" |
|
||||
Condition="'@(Page)@(ApplicationDefinition)' != ''"> |
|
||||
<ItemGroup> |
|
||||
<GeneratedFilesOutputGroup Condition="'%(Page.ExcludedFromBuild)'!='true'" Include="@(Page->'$(XamlGeneratedOutputPath)%(Filename).g.h')" /> |
|
||||
<GeneratedFilesOutputGroup Condition="'%(Page.ExcludedFromBuild)'!='true'" Include="@(Page->'$(XamlGeneratedOutputPath)%(Filename).g.cpp')" /> |
|
||||
<GeneratedFilesOutputGroup Condition="'%(ApplicationDefinition.ExcludedFromBuild)'!='true'" Include="@(ApplicationDefinition->'$(XamlGeneratedOutputPath)%(Filename).g.h')" /> |
|
||||
<GeneratedFilesOutputGroup Condition="'%(ApplicationDefinition.ExcludedFromBuild)'!='true'" Include="@(ApplicationDefinition->'$(XamlGeneratedOutputPath)%(Filename).g.cpp')" /> |
|
||||
</ItemGroup> |
|
||||
</Target> |
|
||||
|
|
||||
<Target Name="ComputeXamlGeneratedCompileInputs" |
|
||||
DependsOnTargets="$(ComputeXamlGeneratedCompileInputsDependsOn)" |
|
||||
Condition="'@(Page)@(ApplicationDefinition)' != ''"> |
|
||||
<ItemGroup> |
|
||||
<ClCompile Include="$(XamlGeneratedOutputPath)XamlTypeInfo.g.cpp" > |
|
||||
<CompilerIteration>XamlGenerated</CompilerIteration> |
|
||||
</ClCompile> |
|
||||
<ClCompile Include="$(XamlGeneratedOutputPath)XamlTypeInfo.Impl.g.cpp" /> |
|
||||
<ClCompile Condition="'$(OutputType)' == 'Library'" Include="$(XamlGeneratedOutputPath)XamlLibMetadataProvider.g.cpp" /> |
|
||||
</ItemGroup> |
|
||||
|
|
||||
<!-- The build only wants to generate winmd once, either during Link target or Createwinmd target, not both. |
|
||||
Link and Createwinmd targets will execute link.exe, so it is best to run link.exe only once. |
|
||||
However, there are two cases where that isn't possible. |
|
||||
1) when build is building XAML and |
|
||||
2) when building in passes. --> |
|
||||
<PropertyGroup> |
|
||||
<GenerateBuildCompilePassWinMD Condition="'$(GenerateBuildCompilePassWinMD)' == ''">true</GenerateBuildCompilePassWinMD> |
|
||||
</PropertyGroup> |
|
||||
</Target> |
|
||||
|
|
||||
<Target Name="ComputeInvalidXamlGenerated" > |
|
||||
<ItemGroup> |
|
||||
<!-- Some files dont exists because XAML files do not always generate .g.cpp --> |
|
||||
<ClCompile Remove="@(ClCompile)" Condition="'%(ClCompile.CompilerIteration)' == 'XamlGenerated' and !Exists('%(Identity)')"/> |
|
||||
</ItemGroup> |
|
||||
</Target> |
|
||||
|
|
||||
<!-- Add CL generates .obj files to Obj item group, it will be used by lib or link --> |
|
||||
<Target Name="ComputeXamlGeneratedCLOutputs" |
|
||||
DependsOnTargets="ComputeXamlGeneratedCompileInputs;ComputeInvalidXamlGenerated" |
|
||||
Condition="'@(ClCompile)' != ''"> |
|
||||
|
|
||||
<ItemGroup> |
|
||||
<!-- Some files dont exists because XAML files do not always generate .g.cpp --> |
|
||||
<ClCompile Remove="@(ClCompile)" Condition="'%(ClCompile.CompilerIteration)' == 'XamlGenerated' and !Exists('%(Identity)')"/> |
|
||||
<!-- No object file name defined: filename.obj --> |
|
||||
<Obj Condition="'%(ClCompile.ObjectFileName)'=='' and '%(ClCompile.ExcludedFromBuild)'!='true'" Include="@(ClCompile->'%(Filename).obj')" /> |
|
||||
<!-- Object file name is a directory (has trailing slash): ofn\filename.obj --> |
|
||||
<Obj Condition="HasTrailingSlash('%(ClCompile.ObjectFileName)') and '%(ClCompile.ExcludedFromBuild)'!='true'" Include="@(ClCompile->'%(ObjectFileName)%(Filename).obj')" /> |
|
||||
<!-- Object file name is a file (does not has trailing slash): ofn --> |
|
||||
<Obj Condition="'%(ClCompile.ObjectFileName)' != '' and !HasTrailingSlash('%(ClCompile.ObjectFileName)') and '%(ClCompile.ExcludedFromBuild)'!='true'" Include="@(ClCompile->'%(ObjectFileName)')" /> |
|
||||
|
|
||||
<Link Include="@(Obj->WithMetadataValue('CompilerIteration', 'XamlGenerated')->ClearMetadata())" /> |
|
||||
</ItemGroup> |
|
||||
</Target> |
|
||||
|
|
||||
<!-- Enable design time build as well as selected file(s) compile support --> |
|
||||
<PropertyGroup> |
|
||||
<EnableDesignTimeBuild>true</EnableDesignTimeBuild> |
|
||||
</PropertyGroup> |
|
||||
|
|
||||
<ItemDefinitionGroup> |
|
||||
<Page> |
|
||||
<GeneratorTarget>DesignTimeMarkupCompilation</GeneratorTarget> |
|
||||
</Page> |
|
||||
<ApplicationDefinition> |
|
||||
<GeneratorTarget>DesignTimeMarkupCompilation</GeneratorTarget> |
|
||||
</ApplicationDefinition> |
|
||||
</ItemDefinitionGroup> |
|
||||
|
|
||||
<PropertyGroup> |
|
||||
<MarkupCompilePass1DependsOn>CppDesignTimeMarkupCompilation;$(MarkupCompilePass1DependsOn)</MarkupCompilePass1DependsOn> |
|
||||
</PropertyGroup> |
|
||||
|
|
||||
<Target Name="CppDesignTimeMarkupCompilation" |
|
||||
DependsOnTargets="_SelectedFiles;SelectCustomBuild;ResolveReferences"> |
|
||||
<!-- Ideally we'd like to be able to build just the requested files (if it makes sense). --> |
|
||||
<!--<ItemGroup Condition="'@(SelectedFiles)'!=''"> |
|
||||
<Page Remove="@(Page)" Condition="'%(Identity)'!='@(SelectedFiles)'"/> |
|
||||
<ApplicationDefinition Remove="@(ApplicationDefinition)" Condition="'%(Identity)'!='@(SelectedFiles)'"/> |
|
||||
</ItemGroup>--> |
|
||||
</Target> |
|
||||
</Project> |
|
||||
@ -1,61 +0,0 @@ |
|||||
<!-- |
|
||||
*********************************************************************************************** |
|
||||
Microsoft.Windows.UI.Xaml.CSharp.targets |
|
||||
|
|
||||
WARNING: DO NOT MODIFY this file unless you are knowledgeable about MSBuild and have |
|
||||
created a backup copy. Incorrect changes to this file will make it |
|
||||
impossible to load or build your projects from the command-line or the IDE. |
|
||||
|
|
||||
Copyright (C) Microsoft Corporation. All rights reserved. |
|
||||
*********************************************************************************************** |
|
||||
--> |
|
||||
|
|
||||
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> |
|
||||
|
|
||||
<PropertyGroup Condition=" '$(TargetPlatformIdentifier)' == 'WindowsPhoneApp' "> |
|
||||
<TargetPlatformVersion Condition="'$(TargetPlatformVersion)' == ''">8.1</TargetPlatformVersion> |
|
||||
<TargetFrameworkIdentifier Condition="'$(TargetFrameworkIdentifier)' == ''">WindowsPhoneApp</TargetFrameworkIdentifier> |
|
||||
<TargetFrameworkVersion Condition="'$(TargetFrameworkVersion)' == ''">v8.1</TargetFrameworkVersion> |
|
||||
</PropertyGroup> |
|
||||
|
|
||||
<PropertyGroup Condition=" '$(TargetPlatformIdentifier)' == 'windows' OR '$(TargetPlatformIdentifier)' == '' "> |
|
||||
<TargetPlatformVersion Condition="'$(TargetPlatformVersion)' == ''">8.2</TargetPlatformVersion> |
|
||||
<TargetFrameworkIdentifier Condition="'$(TargetFrameworkIdentifier)' == ''">.NETCore</TargetFrameworkIdentifier> |
|
||||
<TargetFrameworkVersion Condition="'$(TargetFrameworkVersion)' == ''">v4.5.1</TargetFrameworkVersion> |
|
||||
</PropertyGroup> |
|
||||
|
|
||||
<PropertyGroup Condition=" '$(TargetPlatformIdentifier)' == 'UAP'"> |
|
||||
<TargetFrameworkIdentifier Condition="'$(TargetFrameworkIdentifier)' == ''">.NETCore</TargetFrameworkIdentifier> |
|
||||
<TargetFrameworkVersion Condition="'$(TargetFrameworkVersion)' == ''">v5.0</TargetFrameworkVersion> |
|
||||
</PropertyGroup> |
|
||||
|
|
||||
<PropertyGroup Condition="'$(SDKIdentifier)' == '' and '$(TargetPlatformIdentifier)' == 'UAP'"> |
|
||||
<SDKIdentifier>Windows</SDKIdentifier> |
|
||||
<SDKVersion>10.0</SDKVersion> |
|
||||
</PropertyGroup> |
|
||||
|
|
||||
<PropertyGroup> |
|
||||
<UWPNugetRepo Condition="'$(UWPNugetRepo)' == ''">$([MSBuild]::GetRegistryValueFromView('HKEY_LOCAL_MACHINE\SOFTWARE\NuGet\Repository', 'UWPNugetPackages', null, RegistryView.Registry32, RegistryView.Default))</UWPNugetRepo> |
|
||||
<RestoreAdditionalProjectFallbackFolders>$(RestoreAdditionalProjectFallbackFolders);$(UWPNugetRepo)</RestoreAdditionalProjectFallbackFolders> |
|
||||
</PropertyGroup> |
|
||||
|
|
||||
<PropertyGroup> |
|
||||
<ImplicitlyExpandTargetPlatform Condition="'$(ImplicitlyExpandTargetPlatform)' == '' ">true</ImplicitlyExpandTargetPlatform> |
|
||||
<ImplicitlyExpandTargetFramework Condition="'$(ImplicitlyExpandTargetFramework)' == '' ">true</ImplicitlyExpandTargetFramework> |
|
||||
<NoStdLib Condition="'$(NoStdLib)' == ''">true</NoStdLib> |
|
||||
<UseVSHostingProcess>false</UseVSHostingProcess> |
|
||||
<WindowsAppContainer>true</WindowsAppContainer> |
|
||||
<AppxPackage Condition="'$(OutputType)' == 'AppContainerExe'">True</AppxPackage> |
|
||||
|
|
||||
<!-- Supress the warnings in the 1st pass so that warnings are not repeated twice --> |
|
||||
<SuppressWarningsInPass1 Condition="'$(SuppressWarningsInPass1)' == '' ">true</SuppressWarningsInPass1> |
|
||||
</PropertyGroup> |
|
||||
|
|
||||
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" /> |
|
||||
<Import Project="Microsoft.Windows.UI.Xaml.Common.targets" /> |
|
||||
<Import Project="Microsoft.Windows.UI.Xaml.Cps.targets" /> |
|
||||
|
|
||||
<ItemGroup> |
|
||||
<PropertyPageSchema Include="$(MSBuildThisFileDirectory)$(LangName)\CSharp.ProjectItemsSchema.xaml"/> |
|
||||
</ItemGroup> |
|
||||
</Project> |
|
||||
@ -1,753 +0,0 @@ |
|||||
<!-- |
|
||||
*********************************************************************************************** |
|
||||
Microsoft.Windows.UI.Xaml.Common.targets |
|
||||
|
|
||||
WARNING: DO NOT MODIFY this file unless you are knowledgeable about MSBuild and have |
|
||||
created a backup copy. Incorrect changes to this file will make it |
|
||||
impossible to load or build your projects from the command-line or the IDE. |
|
||||
|
|
||||
Copyright (C) Microsoft Corporation. All rights reserved. |
|
||||
*********************************************************************************************** |
|
||||
--> |
|
||||
|
|
||||
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> |
|
||||
|
|
||||
<Import Project="ImportBefore\*"/> |
|
||||
|
|
||||
<!-- Need the path to vcmeta.dll --> |
|
||||
<PropertyGroup> |
|
||||
<VCInstallDir Condition="'$(VCInstallDir)' == ''">$(Registry:HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\15.0\Setup\VC@ProductDir)</VCInstallDir> |
|
||||
<VCInstallDir Condition="'$(VCInstallDir)' == ''">$(Registry:HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\VisualStudio\15.0\Setup\VC@ProductDir)</VCInstallDir> |
|
||||
<VCInstallDir Condition="'$(VCInstallDir)' == ''">$(Registry:HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VSWinExpress\15.0\Setup\VC@ProductDir)</VCInstallDir> |
|
||||
<VCInstallDir Condition="'$(VCInstallDir)' == ''">$(Registry:HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\VSWinExpress\15.0\Setup\VC@ProductDir)</VCInstallDir> |
|
||||
<VCInstallDir Condition="'$(VCInstallDir)' == ''">$(VsInstallRoot)\Common7\IDE\VC\</VCInstallDir> |
|
||||
|
|
||||
<WindowsSdkPath Condition="'$(WindowsSdkPath)'==''">$(TargetPlatformSdkRootOverride)</WindowsSdkPath> |
|
||||
<WindowsSdkPath Condition="'$(WindowsSdkPath)'==''">$([MSBuild]::GetRegistryValueFromView('HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SDKs\$(SDKIdentifier)\v$(SDKVersion)', 'InstallationFolder', null, RegistryView.Registry32, RegistryView.Default))</WindowsSdkPath> |
|
||||
|
|
||||
<XAMLFingerprint Condition="'$(XAMLFingerprint)' == ''">true</XAMLFingerprint> |
|
||||
<DisableXbfGeneration Condition="'$(DisableXbfGeneration)' == '' AND '$(TargetPlatformVersion)' == '8.0'">true</DisableXbfGeneration> |
|
||||
<DisableXbfGeneration Condition="'$(DisableXbfGeneration)' == ''">false</DisableXbfGeneration> |
|
||||
|
|
||||
<XamlSavedStateFileName Condition="'$(XamlSavedStateFileName)' == ''">XamlSaveStateFile.xml</XamlSavedStateFileName> |
|
||||
<XamlSavedStateFilePath>$(IntermediateOutputPath)\$(XamlSavedStateFileName)</XamlSavedStateFilePath> |
|
||||
|
|
||||
<XAMLFingerprintIgnorePaths Condition="'$(XAMLFingerprintIgnorePaths)'==''"> |
|
||||
@(ReferenceAssemblyPaths); |
|
||||
$(WindowsSdkPath) |
|
||||
</XAMLFingerprintIgnorePaths> |
|
||||
|
|
||||
<!-- Note that like a few other properties FacadeWinmdPath is used beyond msbuild infrastructure. --> |
|
||||
<FacadeWinmdPath>$(WindowsSdkPath)\UnionMetadata\facade\Windows.winmd</FacadeWinmdPath> |
|
||||
</PropertyGroup> |
|
||||
|
|
||||
<ItemGroup Condition="'$(BuildingInsideVisualStudio)'=='true'"> |
|
||||
<AvailableItemName Include="PRIResource" /> |
|
||||
<AvailableItemName Include="AppxManifest" /> |
|
||||
<AvailableItemName Include="ApplicationDefinition" /> |
|
||||
<AvailableItemName Include="Page" /> |
|
||||
<AvailableItemName Include="DesignData" /> |
|
||||
<AvailableItemName Include="DesignDataWithDesignTimeCreatableTypes" /> |
|
||||
</ItemGroup> |
|
||||
|
|
||||
<ItemGroup> |
|
||||
<ProjectCapability Include="WindowsXaml"/> |
|
||||
<ProjectCapability Include="WindowsXamlPage"/> |
|
||||
<ProjectCapability Include="WindowsXamlCodeBehind"/> |
|
||||
<ProjectCapability Include="WindowsXamlResourceDictionary"/> |
|
||||
<ProjectCapability Include="WindowsXamlUserControl"/> |
|
||||
<ProjectCapability Include="WindowsUniversalMultiViews"/> |
|
||||
</ItemGroup> |
|
||||
|
|
||||
<!-- For Managed Assemblies Create a XAML Roots Log --> |
|
||||
<PropertyGroup Condition="'$(ManagedAssembly)' != 'false'"> |
|
||||
<XamlRootsLog>$(AssemblyName).xr.xml</XamlRootsLog> |
|
||||
</PropertyGroup> |
|
||||
|
|
||||
<!-- Setting PRI index name. The XAML compiler use this in the LoadComponent() string. |
|
||||
It must match the name of the directoy the AppX Packaging system uses --> |
|
||||
<PropertyGroup> |
|
||||
<!-- Exe's don't have an PriIndexName --> |
|
||||
<PriIndexName Condition="'$(AppxPackage)' == 'true'"></PriIndexName> |
|
||||
<!-- Managed Dll's use the "safe" name of the project as the App Package Name --> |
|
||||
<PriIndexName Condition="'$(AppxPackage)' != 'true' and '$(ManagedAssembly)' != 'false' and '$(OutputType)' != 'winmdobj'">$(TargetName)</PriIndexName> |
|
||||
<!-- Winmd library targets (managed or native) use the default root namespace of the project for the App package name --> |
|
||||
<PriIndexName Condition="'$(AppxPackage)' != 'true' and '$(ManagedAssembly)' != 'false' and '$(OutputType)' == 'winmdobj'">$(RootNamespace)</PriIndexName> |
|
||||
<PriIndexName Condition="'$(AppxPackage)' != 'true' and '$(ManagedAssembly)' == 'false' and '$(RootNamespace)' != ''">$(RootNamespace)</PriIndexName> |
|
||||
<!-- If RootNamespace is empty fall back to TargetName --> |
|
||||
<PriIndexName Condition="'$(AppxPackage)' != 'true' and $(PriIndexName) == ''">$(TargetName)</PriIndexName> |
|
||||
</PropertyGroup> |
|
||||
|
|
||||
<PropertyGroup> |
|
||||
<AvailablePlatforms>$(AvailablePlatforms),ARM</AvailablePlatforms> |
|
||||
|
|
||||
<!-- this Property is used only for the Managed build. |
|
||||
See Microsoft.Windows.UI.Xaml.Cpp.targets for Native build rules --> |
|
||||
<PrepareResourcesDependsOn> |
|
||||
ResolveKeySource; |
|
||||
MarkupCompilePass1; |
|
||||
XamlPreCompile; |
|
||||
MarkupCompilePass2; |
|
||||
$(PrepareResourcesDependsOn) |
|
||||
</PrepareResourcesDependsOn> |
|
||||
|
|
||||
<Prefer32Bit Condition="'$(Prefer32Bit)' == '' and ('$(OutputType)' == 'exe' or '$(OutputType)' == 'winexe' or '$(OutputType)' == 'appcontainerexe')">true</Prefer32Bit> |
|
||||
<HighEntropyVA Condition="'$(HighEntropyVA)' == ''">true</HighEntropyVA> |
|
||||
<SubsystemVersion Condition="'$(SubsystemVersion)' == '' and ('$(PlatformTarget)' == 'ARM' or '$(OutputType)' == 'appcontainerexe' or '$(OutputType)' == 'winmdobj')">6.02</SubsystemVersion> |
|
||||
<SubsystemVersion Condition="'$(SubsystemVersion)' == ''">6.00</SubsystemVersion> |
|
||||
|
|
||||
<OnXamlPreCompileErrorTarget Condition="'$(OnXamlPreCompileErrorTarget)' == ''">_OnXamlPreCompileError</OnXamlPreCompileErrorTarget> |
|
||||
|
|
||||
<!-- Use Intermediate dir if XamlGeneratedOutputPath is not defined --> |
|
||||
<XamlGeneratedOutputPath Condition="'$(XamlGeneratedOutputPath)' == ''">$(IntermediateOutputPath)</XamlGeneratedOutputPath> |
|
||||
</PropertyGroup> |
|
||||
|
|
||||
<UsingTask TaskName="Microsoft.Windows.UI.Xaml.Build.Tasks.CompileXaml" AssemblyFile="Microsoft.Windows.UI.Xaml.Build.Tasks.dll" /> |
|
||||
<UsingTask TaskName="Microsoft.Windows.UI.Xaml.Build.Tasks.AddDefaultXamlLinkMetadata" AssemblyFile="Microsoft.Windows.UI.Xaml.Build.Tasks.dll" /> |
|
||||
<UsingTask TaskName="Microsoft.Windows.UI.Xaml.Build.Tasks.GetXamlCppIncludeDirectories" AssemblyFile="Microsoft.Windows.UI.Xaml.Build.Tasks.dll" /> |
|
||||
|
|
||||
<PropertyGroup> |
|
||||
<!--If the path to the sign tool is not set, assume the SDK path --> |
|
||||
<SignToolPath Condition="'$(SignToolPath)' == ''">$(FrameworkSDKRoot)bin</SignToolPath> |
|
||||
|
|
||||
<!--Integration with packaging for GeneratedXamlFilesOutputGroupOutput --> |
|
||||
<IncludeCustomOutputGroupForPackaging>true</IncludeCustomOutputGroupForPackaging> |
|
||||
</PropertyGroup> |
|
||||
|
|
||||
<ItemGroup> |
|
||||
<XamlIntermediateAssembly Condition="'$(ManagedAssembly)'!='false'" Include="$(XamlGeneratedOutputPath)intermediatexaml\$(TargetName)$(TargetExt)"/> |
|
||||
<XamlIntermediateAssembly Condition="'$(ManagedAssembly)'=='false'" Include="$(OutputPath)\$(TargetName).winmd"/> |
|
||||
</ItemGroup> |
|
||||
|
|
||||
<!-- |
|
||||
============================================================ |
|
||||
Adds all XAML Pages to the $(Resource) collection |
|
||||
============================================================ |
|
||||
--> |
|
||||
<ItemGroup Condition=" '$(ManagedAssembly)'=='' "> |
|
||||
<!-- Add XAML Page items to $(Resource) --> |
|
||||
<Resource Include="@(Page)" /> |
|
||||
<Resource Include="@(ApplicationDefinition)" /> |
|
||||
</ItemGroup> |
|
||||
|
|
||||
<!-- Manifest metadata items. --> |
|
||||
<!-- See Microsoft.AppxPackage.targets for details. --> |
|
||||
<PropertyGroup> |
|
||||
<XAMLCompilerVersion Condition=" '$(TargetPlatformIdentifier)' == 'UAP' ">8.2</XAMLCompilerVersion> |
|
||||
<XAMLCompilerVersion Condition=" '$(XAMLCompilerVersion)' == '' ">$(TargetPlatformVersion)</XAMLCompilerVersion> |
|
||||
</PropertyGroup> |
|
||||
|
|
||||
<!-- Project binary needs to be updated after updating xaml page --> |
|
||||
<ItemGroup> |
|
||||
<CustomAdditionalCompileInputs Include="@(Page)" /> |
|
||||
</ItemGroup> |
|
||||
|
|
||||
<ItemGroup Label="AppxManifestMetadata"> |
|
||||
<AppxManifestMetadata Include="$(MSBuildExtensionsPath)\Microsoft\WindowsXaml\v$(VisualStudioVersion)\$(XAMLCompilerVersion)\Microsoft.Windows.UI.Xaml.Build.Tasks.dll" /> |
|
||||
</ItemGroup> |
|
||||
|
|
||||
<PropertyGroup> |
|
||||
<MarkupCompilePass1DependsOn> |
|
||||
GetXamlCppIncludeDirectories; |
|
||||
$(GetXamlCppIncludeDirectories) |
|
||||
</MarkupCompilePass1DependsOn> |
|
||||
|
|
||||
<MarkupCompilePass2DependsOn> |
|
||||
GetXamlCppIncludeDirectories; |
|
||||
$(GetXamlCppIncludeDirectories) |
|
||||
</MarkupCompilePass2DependsOn> |
|
||||
|
|
||||
<Prep_ComputeProcessXamlFilesDependsOn> |
|
||||
GetXamlCppIncludeDirectories; |
|
||||
$(Prep_ComputeProcessXamlFilesDependsOn) |
|
||||
</Prep_ComputeProcessXamlFilesDependsOn> |
|
||||
</PropertyGroup> |
|
||||
|
|
||||
<!-- In order for the XAML compiler to generated the correct relative paths for #includes in |
|
||||
the generated C++ code it needs to know the AdditionalIncludeDirectories of all the .cpp |
|
||||
files are DependentUpon XAML files.--> |
|
||||
<Target Name="GetXamlCppIncludeDirectories" Condition="'$(ManagedAssembly)'=='false' and '$(XamlCppIncludeDirectories)' == ''"> |
|
||||
<GetXamlCppIncludeDirectories ClCompile="@(ClCompile)"> |
|
||||
<Output PropertyName="XamlCppIncludeDirectories" TaskParameter="ComputedIncludeDirectories" /> |
|
||||
</GetXamlCppIncludeDirectories> |
|
||||
</Target> |
|
||||
|
|
||||
<!-- |
|
||||
================================================================ |
|
||||
DesignTimeMarkupCompilation |
|
||||
|
|
||||
Support for the Intellisense build |
|
||||
================================================================ |
|
||||
--> |
|
||||
<PropertyGroup> |
|
||||
<CoreCompileDependsOn Condition="'$(BuildingInsideVisualStudio)' == 'true' "> |
|
||||
DesignTimeMarkupCompilation; |
|
||||
$(CoreCompileDependsOn) |
|
||||
</CoreCompileDependsOn> |
|
||||
</PropertyGroup> |
|
||||
|
|
||||
<Target Name="DesignTimeMarkupCompilation"> |
|
||||
<!-- BuildingProject is used in Managed builds (always true in Native) --> |
|
||||
<!-- DesignTimeBuild is used in Native builds (always false in Managed) --> |
|
||||
<CallTarget Condition="'$(BuildingProject)' != 'true' Or $(DesignTimeBuild) == 'true'" Targets="DesignTimeMarkupCompilationCT" /> |
|
||||
</Target> |
|
||||
|
|
||||
<!-- A copy of the first pass, without the WarningLevel manipulation --> |
|
||||
<Target Name="DesignTimeMarkupCompilationCT" |
|
||||
DependsOnTargets="$(MarkupCompilePass1DependsOn)" |
|
||||
Condition="'@(Page)' != '' Or '@(ApplicationDefinition)' != '' " > |
|
||||
|
|
||||
<MakeDir Condition="'$(ManagedAssembly)'!='false'" Directories="$(XamlGeneratedOutputPath)intermediatexaml\" /> |
|
||||
<ItemGroup> |
|
||||
<ReferencePath Condition="'$(Language)'=='C++' and Exists($(FacadeWinmdPath))" Include="$(FacadeWinmdPath)" /> |
|
||||
</ItemGroup> |
|
||||
<CompileXaml |
|
||||
LanguageSourceExtension="$(DefaultLanguageSourceExtension)" |
|
||||
Language="$(Language)" |
|
||||
RootNamespace="$(RootNamespace)" |
|
||||
XamlPages="@(Page)" |
|
||||
XamlApplications="@(ApplicationDefinition)" |
|
||||
PriIndexName="$(PriIndexName)" |
|
||||
ProjectName="$(MsBuildProjectName)" |
|
||||
IsPass1="True" |
|
||||
CodeGenerationControlFlags="$(XamlCodeGenerationControlFlags)" |
|
||||
CIncludeDirectories="$(XamlCppIncludeDirectories)" |
|
||||
ProjectPath="$(MSBuildProjectFullPath)" |
|
||||
OutputPath="$(XamlGeneratedOutputPath)" |
|
||||
OutputType="$(OutputType)" |
|
||||
ReferenceAssemblyPaths="@(ReferenceAssemblyPaths)" |
|
||||
ReferenceAssemblies="@(ReferencePath)" |
|
||||
ForceSharedStateShutdown="False" |
|
||||
ContinueOnError="True" |
|
||||
CompileMode="DesignTimeBuild" |
|
||||
XAMLFingerprint="$(XAMLFingerprint)" |
|
||||
FingerprintIgnorePaths="$(XAMLFingerprintIgnorePaths)" |
|
||||
VCInstallDir="$(VCInstallDir)" |
|
||||
SavedStateFile="$(XamlSavedStateFilePath)" |
|
||||
SuppressWarnings="$(SuppressXamlWarnings)" |
|
||||
TargetPlatformMinVersion="$(TargetPlatformMinVersion)" |
|
||||
WindowsSdkPath="$(WindowsSdkPath)" |
|
||||
> |
|
||||
<Output Condition=" '$(ManagedAssembly)'!='false' " ItemName="Compile" TaskParameter="GeneratedCodeFiles" /> |
|
||||
|
|
||||
<!-- |
|
||||
Add to the list of files written. |
|
||||
It is used in Microsoft.Common.targets for a next clean build |
|
||||
--> |
|
||||
<Output ItemName="FileWrites" TaskParameter="GeneratedCodeFiles" /> |
|
||||
<Output ItemName="FileWrites" TaskParameter="GeneratedXamlFiles" /> |
|
||||
<Output ItemName="_GeneratedCodeFiles" TaskParameter="GeneratedCodeFiles" /> |
|
||||
</CompileXaml> |
|
||||
|
|
||||
<ItemGroup> |
|
||||
<FileWrites Include="$(XamlSavedStateFilePath)" /> |
|
||||
</ItemGroup> |
|
||||
|
|
||||
<Message Text="(Out) ISenseCodeFiles: '@(_GeneratedCodeFiles)'" /> |
|
||||
<Message Text="(Out) ISenseXamlFiles: '@(_GeneratedXamlFiles)'" /> |
|
||||
<Message Text="(Out) ClCompile: '@(ClCompile)'" Condition="'%(ClCompile.CompilerIteration)' != 'XamlGenerated'"/> |
|
||||
<Message Text="(Out) Compile: '@(Compile)'" /> |
|
||||
</Target> |
|
||||
|
|
||||
<!-- |
|
||||
================================================================ |
|
||||
MarkupCompilePass1 |
|
||||
================================================================ |
|
||||
--> |
|
||||
|
|
||||
<Target Name="MarkupCompilePass1" |
|
||||
DependsOnTargets="$(MarkupCompilePass1DependsOn)" |
|
||||
Condition="'@(Page)' != '' Or '@(ApplicationDefinition)' != '' " > |
|
||||
|
|
||||
<MakeDir Condition="'$(ManagedAssembly)'!='false'" Directories="$(XamlGeneratedOutputPath)intermediatexaml\" /> |
|
||||
<ItemGroup> |
|
||||
<ReferencePath Condition="'$(Language)'=='C++' and Exists($(FacadeWinmdPath))" Include="$(FacadeWinmdPath)" /> |
|
||||
</ItemGroup> |
|
||||
<CompileXaml |
|
||||
LanguageSourceExtension="$(DefaultLanguageSourceExtension)" |
|
||||
Language="$(Language)" |
|
||||
RootNamespace="$(RootNamespace)" |
|
||||
XamlPages="@(Page)" |
|
||||
XamlApplications="@(ApplicationDefinition)" |
|
||||
PriIndexName="$(PriIndexName)" |
|
||||
ProjectName="$(MsBuildProjectName)" |
|
||||
IsPass1="True" |
|
||||
CodeGenerationControlFlags="$(XamlCodeGenerationControlFlags)" |
|
||||
ProjectPath="$(MSBuildProjectFullPath)" |
|
||||
CIncludeDirectories="$(XamlCppIncludeDirectories)" |
|
||||
OutputPath="$(XamlGeneratedOutputPath)" |
|
||||
OutputType="$(OutputType)" |
|
||||
ReferenceAssemblyPaths="@(ReferenceAssemblyPaths)" |
|
||||
ReferenceAssemblies="@(ReferencePath)" |
|
||||
ForceSharedStateShutdown="False" |
|
||||
CompileMode="RealBuildPass1" |
|
||||
XAMLFingerprint="$(XAMLFingerprint)" |
|
||||
FingerprintIgnorePaths="$(XAMLFingerprintIgnorePaths)" |
|
||||
VCInstallDir="$(VCInstallDir)" |
|
||||
SavedStateFile="$(XamlSavedStateFilePath)" |
|
||||
SuppressWarnings="$(SuppressXamlWarnings)" |
|
||||
TargetPlatformMinVersion="$(TargetPlatformMinVersion)" |
|
||||
WindowsSdkPath="$(WindowsSdkPath)" |
|
||||
> |
|
||||
|
|
||||
<Output Condition=" '$(ManagedAssembly)'!='false' " ItemName="Compile" TaskParameter="GeneratedCodeFiles" /> |
|
||||
|
|
||||
<!-- |
|
||||
FileWrites is used in Microsoft.Common.targets for "Clean" build |
|
||||
--> |
|
||||
<Output ItemName="FileWrites" TaskParameter="GeneratedCodeFiles" /> |
|
||||
<Output ItemName="FileWrites" TaskParameter="GeneratedXamlFiles" /> |
|
||||
<Output ItemName="FileWrites" TaskParameter="GeneratedXbfFiles" /> |
|
||||
<Output ItemName="_GeneratedCodeFiles" TaskParameter="GeneratedCodeFiles" /> |
|
||||
</CompileXaml> |
|
||||
|
|
||||
<ItemGroup> |
|
||||
<FileWrites Include="$(XamlSavedStateFilePath)" /> |
|
||||
</ItemGroup> |
|
||||
|
|
||||
<Message Text="(Out) GeneratedCodeFiles: '@(_GeneratedCodeFiles)'" /> |
|
||||
<Message Text="(Out) ClCompile: '@(ClCompile)'" Condition="'$(ManagedAssembly)'=='false' and '%(ClCompile.CompilerIteration)'!='XamlGenerated'"/> |
|
||||
<Message Text="(Out) Compile: '@(Compile)'" Condition="'$(ManagedAssembly)'!='false'"/> |
|
||||
|
|
||||
<PropertyGroup> |
|
||||
<PrevWarningLevel>$(WarningLevel)</PrevWarningLevel> |
|
||||
<WarningLevel Condition="'$(SuppressWarningsInPass1)'=='true'">0</WarningLevel> |
|
||||
</PropertyGroup> |
|
||||
</Target> |
|
||||
|
|
||||
<!-- |
|
||||
================================================================ |
|
||||
MarkupCompilePass2 |
|
||||
================================================================ |
|
||||
--> |
|
||||
|
|
||||
<Target Name="MarkupCompilePass2" |
|
||||
DependsOnTargets="$(MarkupCompilePass2DependsOn)" |
|
||||
Condition="'@(Page)' != '' Or '@(ApplicationDefinition)' != '' " > |
|
||||
|
|
||||
<PropertyGroup> |
|
||||
<WarningLevel>$(PrevWarningLevel)</WarningLevel> |
|
||||
<WarningLevel Condition="'$(WarningLevel)' == '' and '$(ExplicitResetWarningSuppression)' == 'true'">1</WarningLevel> |
|
||||
</PropertyGroup> |
|
||||
|
|
||||
<!-- The Name of the Local Assembly in Managed and Native --> |
|
||||
<PropertyGroup> |
|
||||
<LocalAssembly Condition="'$(LocalAssembly)' == '' and Exists(@(XamlIntermediateAssembly))"> |
|
||||
@(XamlIntermediateAssembly->'%(Identity)') |
|
||||
</LocalAssembly> |
|
||||
</PropertyGroup> |
|
||||
|
|
||||
<CallTarget Targets="SDKRedistOutputGroup" Condition="'$(IncludeSDKRedistOutputGroup)' == 'true'"> |
|
||||
<Output TaskParameter="TargetOutputs" ItemName="_SDKRedistOutputGroupOutput_xaml"/> |
|
||||
</CallTarget> |
|
||||
<ItemGroup> |
|
||||
<SdkXamlItems Include="@(_SDKRedistOutputGroupOutput_xaml)" Condition="'%(Extension)'=='.xaml'" /> |
|
||||
</ItemGroup> |
|
||||
|
|
||||
<ItemGroup> |
|
||||
<!-- C++ provides a filtered Item that eliminates any Managed Assemblies on the ReferencePath (from SDKs for example) --> |
|
||||
<XamlReferencesToCompile Condition="'$(Language)'=='C++'" Include="@(WinMDReferenceToCompile)" /> |
|
||||
<XamlReferencesToCompile Condition="'$(Language)'=='C++' and Exists($(FacadeWinmdPath))" Include="$(FacadeWinmdPath)" /> |
|
||||
<XamlReferencesToCompile Condition="'$(Language)'!='C++'" Include="@(ReferencePath)" /> |
|
||||
</ItemGroup> |
|
||||
|
|
||||
<CompileXaml |
|
||||
LanguageSourceExtension="$(DefaultLanguageSourceExtension)" |
|
||||
Language="$(Language)" |
|
||||
RootNamespace="$(RootNamespace)" |
|
||||
XamlPages="@(Page)" |
|
||||
XamlApplications="@(ApplicationDefinition)" |
|
||||
SdkXamlPages="@(SdkXamlItems)" |
|
||||
PriIndexName="$(PriIndexName)" |
|
||||
ProjectName="$(MsBuildProjectName)" |
|
||||
IsPass1="False" |
|
||||
DisableXbfGeneration="$(DisableXbfGeneration)" |
|
||||
CodeGenerationControlFlags="$(XamlCodeGenerationControlFlags)" |
|
||||
ClIncludeFiles="@(ClInclude)" |
|
||||
CIncludeDirectories="$(XamlCppIncludeDirectories)" |
|
||||
LocalAssembly="$(LocalAssembly)" |
|
||||
ProjectPath="$(MSBuildProjectFullPath)" |
|
||||
OutputPath="$(XamlGeneratedOutputPath)" |
|
||||
OutputType="$(OutputType)" |
|
||||
ReferenceAssemblyPaths="@(ReferenceAssemblyPaths)" |
|
||||
ReferenceAssemblies="@(XamlReferencesToCompile)" |
|
||||
ForceSharedStateShutdown="False" |
|
||||
CompileMode="RealBuildPass2" |
|
||||
XAMLFingerprint="$(XAMLFingerprint)" |
|
||||
FingerprintIgnorePaths="$(XAMLFingerprintIgnorePaths)" |
|
||||
VCInstallDir="$(VCInstallDir)" |
|
||||
WindowsSdkPath="$(WindowsSdkPath)" |
|
||||
SavedStateFile="$(XamlSavedStateFilePath)" |
|
||||
RootsLog="$(XamlRootsLog)" |
|
||||
SuppressWarnings="$(SuppressXamlWarnings)" |
|
||||
TargetPlatformMinVersion="$(TargetPlatformMinVersion)" |
|
||||
BuildConfiguration="$(Configuration)" |
|
||||
DisableXbfLineInfo="$(DisableXbfLineInfo)"> |
|
||||
<Output Condition=" '$(ManagedAssembly)'!='false' " ItemName="Compile" TaskParameter="GeneratedCodeFiles" /> |
|
||||
<Output Condition=" '$(ManagedAssembly)'=='false' " ItemName="XamlGFiles" TaskParameter="GeneratedCodeFiles" /> |
|
||||
|
|
||||
<!-- |
|
||||
FileWrites is used in Microsoft.Common.targets for "Clean" build |
|
||||
--> |
|
||||
<Output ItemName="FileWrites" TaskParameter="GeneratedCodeFiles" /> |
|
||||
<Output ItemName="FileWrites" TaskParameter="GeneratedXamlFiles" /> |
|
||||
<Output ItemName="FileWrites" TaskParameter="GeneratedXbfFiles" /> |
|
||||
<Output ItemName="_GeneratedCodeFiles" TaskParameter="GeneratedCodeFiles" /> |
|
||||
<Output ItemName="_GeneratedXamlFiles" TaskParameter="GeneratedXamlFiles" /> |
|
||||
<Output ItemName="_GeneratedXbfFiles" TaskParameter="GeneratedXbfFiles" /> |
|
||||
</CompileXaml> |
|
||||
|
|
||||
<ItemGroup> |
|
||||
<FileWrites Include="$(XamlSavedStateFilePath)" /> |
|
||||
<FileWrites Condition="'$(XamlRootsLog)' != ''" Include="$(XamlRootsLog)" /> |
|
||||
</ItemGroup> |
|
||||
|
|
||||
<Message Text="(Out) GeneratedCodeFiles: '@(_GeneratedCodeFiles)'" /> |
|
||||
<Message Text="(Out) GeneratedXamlFiles: '@(_GeneratedXamlFiles)'" /> |
|
||||
<Message Text="(Out) GeneratedXbfFiles: '@(_GeneratedXbfFiles)'" /> |
|
||||
<Message Text="(Out) ClCompile: '@(ClCompile)'" Condition="'$(ManagedAssembly)'=='false'"/> |
|
||||
<Message Text="(Out) Compile: '@(Compile)'" Condition="'$(ManagedAssembly)'!='false'"/> |
|
||||
</Target> |
|
||||
|
|
||||
<Target Name="_OnXamlPreCompileError" |
|
||||
DependsOnTargets="$(_OnXamlPrecompileErrorDependsOn)" > |
|
||||
|
|
||||
<CompileXaml |
|
||||
ProjectPath="$(MSBuildProjectFullPath)" |
|
||||
Language="$(Language)" |
|
||||
LanguageSourceExtension="$(DefaultLanguageSourceExtension)" |
|
||||
OutputPath="$(XamlGeneratedOutputPath)" |
|
||||
ReferenceAssemblies="@(ReferencePath)" |
|
||||
ReferenceAssemblyPaths="@(ReferenceAssemblyPaths)" |
|
||||
XamlPages="@(Page)" |
|
||||
XamlApplications="@(ApplicationDefinition)" |
|
||||
ForceSharedStateShutdown="True" |
|
||||
CompileMode="OnErrorShutdown" |
|
||||
SavedStateFile="$(XamlSavedStateFilePath)" |
|
||||
TargetPlatformMinVersion="$(TargetPlatformMinVersion)" |
|
||||
> |
|
||||
</CompileXaml> |
|
||||
</Target> |
|
||||
|
|
||||
<Target Name="Prep_ComputeProcessXamlFiles" |
|
||||
Condition="'@(ApplicationDefinition)'!='' or '@(Page)'!=''" |
|
||||
DependsOnTargets="$(Prep_ComputeProcessXamlFilesDependsOn)" > |
|
||||
|
|
||||
<!-- collect all the XAML pages from the Project file into one Item --> |
|
||||
<ItemGroup> |
|
||||
<AllProjectXamlPages Condition="'%(ApplicationDefinition.ExcludedFromBuild)'!='true'" Include="@(ApplicationDefinition)" /> |
|
||||
<AllProjectXamlPages Condition="'%(Page.ExcludedFromBuild)'!='true'" Include="@(Page)" /> |
|
||||
</ItemGroup> |
|
||||
|
|
||||
<!-- For items are outside the project core Link metadata tells us what the apparent project path should be. |
|
||||
C++ doesn't use Link data, so for C++ add implied DefaultXamlLink metadata based on the Include Path --> |
|
||||
<AddDefaultXamlLinkMetadata Condition="'$(ManagedAssembly)'=='false'" |
|
||||
ProjectPath="$(ProjectPath)" |
|
||||
XamlPages="@(AllProjectXamlPages)" |
|
||||
CIncludeDirectories ="$(XamlCppIncludeDirectories)"> |
|
||||
<Output TaskParameter="OutputItems" ItemName="_Temp" /> |
|
||||
</AddDefaultXamlLinkMetadata> |
|
||||
|
|
||||
<!-- Remove the Items named in _Temp, then add the actual items from _Temp, then clear _Temp --> |
|
||||
<ItemGroup> |
|
||||
<AllProjectXamlPages Remove="@(_Temp)" /> |
|
||||
<AllProjectXamlPages Include="@(_Temp)" /> |
|
||||
<_Temp Remove="@(_Temp)" /> |
|
||||
</ItemGroup> |
|
||||
|
|
||||
<!-- transfer the DefaultXamlLink data to the Link attribute --> |
|
||||
<ItemGroup> |
|
||||
<AllProjectXamlPages Condition="'%(AllProjectXamlPages.DefaultXamlLink)'!=''"> |
|
||||
<Link>%(AllProjectXamlPages.DefaultXamlLink)</Link> |
|
||||
</AllProjectXamlPages> |
|
||||
</ItemGroup> |
|
||||
|
|
||||
<!-- Compute the Generated XAML source path and the bin dir Destination path --> |
|
||||
<!-- If there is a Link use that, otherwise use the Given path from the Project file Item --> |
|
||||
<ItemGroup> |
|
||||
<GeneratedXamlSrc0 Condition="'%(AllProjectXamlPages.Link)'!=''" Include="@(AllProjectXamlPages->'$(XamlGeneratedOutputPath)%(Link)')" /> |
|
||||
<GeneratedXamlSrc0 Condition="'%(AllProjectXamlPages.Link)'==''" Include="@(AllProjectXamlPages->'$(XamlGeneratedOutputPath)%(Identity)')" /> |
|
||||
|
|
||||
<GeneratedXamlDest0 Condition="'%(AllProjectXamlPages.Link)'!=''" Include="@(AllProjectXamlPages->'$(OutputPath)\%(Link)')" /> |
|
||||
<GeneratedXamlDest0 Condition="'%(AllProjectXamlPages.Link)'==''" Include="@(AllProjectXamlPages->'$(OutputPath)\%(Identity)')" /> |
|
||||
</ItemGroup> |
|
||||
|
|
||||
<!-- Swap in the XBF suffix if appropriate. --> |
|
||||
<ItemGroup Condition="'$(DisableXbfGeneration)' == 'true'"> |
|
||||
<GeneratedXamlSrc Include="@(GeneratedXamlSrc0)" /> |
|
||||
<GeneratedXamlDest Include="@(GeneratedXamlDest0)" /> |
|
||||
</ItemGroup> |
|
||||
<ItemGroup Condition="'$(DisableXbfGeneration)' != 'true'"> |
|
||||
<GeneratedXamlSrc Include="%(GeneratedXamlSrc0.RelativeDir)%(GeneratedXamlSrc0.Filename).xbf" /> |
|
||||
<GeneratedXamlDest Include="%(GeneratedXamlDest0.RelativeDir)%(GeneratedXamlDest0.Filename).xbf" /> |
|
||||
</ItemGroup> |
|
||||
|
|
||||
<!-- if we converted SDK XAML into XBF, add the XBF to the list, and remove the XAML from the list --> |
|
||||
<ItemGroup Condition="'$(DisableXbfGeneration)' != 'true' and '@(SdkXamlItems)' != ''"> |
|
||||
<GeneratedSdkXamlSrc0 Include="@(SdkXamlItems->'$(XamlGeneratedOutputPath)%(TargetPath)')" /> |
|
||||
<GeneratedSdkXamlDest0 Include="@(SdkXamlItems->'$(OutputPath)\%(TargetPath)')" /> |
|
||||
|
|
||||
<GeneratedXamlSrc Include="%(GeneratedSdkXamlSrc0.RelativeDir)%(GeneratedSdkXamlSrc0.Filename).xbf" > |
|
||||
<ReferenceSourceTarget>ExpandSDKReference</ReferenceSourceTarget> |
|
||||
</GeneratedXamlSrc> |
|
||||
<GeneratedXamlDest Include="%(GeneratedSdkXamlDest0.RelativeDir)%(GeneratedSdkXamlDest0.Filename).xbf" > |
|
||||
<ReferenceSourceTarget>ExpandSDKReference</ReferenceSourceTarget> |
|
||||
</GeneratedXamlDest> |
|
||||
<RemoveSdkFilesFromAppxPackage Include="@(SdkXamlItems)" /> |
|
||||
</ItemGroup> |
|
||||
|
|
||||
<ItemGroup Condition="'$(XamlRootsLog)' != ''"> |
|
||||
<GeneratedXamlSrc Include="$(XamlGeneratedOutputPath)\$(XamlRootsLog)" /> |
|
||||
<GeneratedXamlDest Include="$(OutputPath)\$(XamlRootsLog)" /> |
|
||||
</ItemGroup> |
|
||||
|
|
||||
<Message Importance="low" Text="(Out) Prep_GeneratedXamlSrc == @(GeneratedXamlSrc)" /> |
|
||||
<Message Importance="low" Text="(Out) Prep_GeneratedXamlDest == @(GeneratedXamlDest)" /> |
|
||||
</Target> |
|
||||
|
|
||||
<!-- if $GenerateLibraryLayout is True this is skipped and see the PrepareLibraryLayout target --> |
|
||||
<Target Name="CopyGeneratedXaml" BeforeTargets="CopyFilesToOutputDirectory" DependsOnTargets="Prep_ComputeProcessXamlFiles" |
|
||||
Condition="'$(GenerateLibraryLayout)' != 'true'"> |
|
||||
<Copy |
|
||||
SourceFiles="@(GeneratedXamlSrc)" |
|
||||
DestinationFiles="@(GeneratedXamlDest)" |
|
||||
SkipUnchangedFiles="$(SkipCopyUnchangedFiles)" |
|
||||
OverwriteReadOnlyFiles="$(OverwriteReadOnlyFiles)" |
|
||||
Retries="$(CopyRetryCount)" |
|
||||
RetryDelayMilliseconds="$(CopyRetryDelayMilliseconds)" |
|
||||
UseHardlinksIfPossible="$(CreateHardLinksForCopyFilesToOutputDirectoryIfPossible)" |
|
||||
/> |
|
||||
<ItemGroup> |
|
||||
<FileWrites Include="@(GeneratedXamlDest)" /> |
|
||||
</ItemGroup> |
|
||||
</Target> |
|
||||
|
|
||||
<Target Name="ComputeProcessXamlFiles" Returns="@(ProcessedXamlFiles)" DependsOnTargets="Prep_ComputeProcessXamlFiles"> |
|
||||
<ItemGroup > |
|
||||
<!-- In the normal (non-SDK) build, AppX Packaging picks up the files from the bin aka OutputPath folder --> |
|
||||
<ProcessedXamlFiles Condition="'$(GenerateLibraryLayout)' != 'true'" Include="@(GeneratedXamlDest)" /> |
|
||||
|
|
||||
<!-- In the SDK build, AppX Packaging picks up the files from the XamlGeneratedOutput folder --> |
|
||||
<!-- For SDK builds include both the XAML and XBF --> |
|
||||
<ProcessedXamlFiles Condition="'$(GenerateLibraryLayout)' == 'true'" Include="@(GeneratedXamlSrc)" /> |
|
||||
<ProcessedXamlFiles Condition="'$(GenerateLibraryLayout)' == 'true' and '$(DisableXbfGeneration)' != 'true'" |
|
||||
Include="@(GeneratedXamlSrc0)" /> |
|
||||
</ItemGroup> |
|
||||
<Message Importance="Low" Text="(Out) GeneratedXamlDest == @(GeneratedXamlDest)" /> |
|
||||
<Message Importance="Low" Text="(Out) GeneratedXamlSrc == @(GeneratedXamlSrc)" /> |
|
||||
<Message Text="(Out) ProcessedXamlFiles == @(ProcessedXamlFiles)" /> |
|
||||
</Target> |
|
||||
|
|
||||
<Target Name="CustomOutputGroupForPackaging" |
|
||||
DependsOnTargets="ComputeProcessXamlFiles" |
|
||||
Returns="@(CustomOutputGroupForPackagingOutput)" |
|
||||
> |
|
||||
<ItemGroup> |
|
||||
<ProcessedXamlFilesFullPath Include="@(ProcessedXamlFiles->'%(FullPath)')" /> |
|
||||
</ItemGroup> |
|
||||
|
|
||||
<PropertyGroup> |
|
||||
<XamlPackagingRootFolder Condition="'$(GenerateLibraryLayout)' == 'true'">$(XamlGeneratedOutputPath)</XamlPackagingRootFolder> |
|
||||
<XamlPackagingRootFolder Condition="'$(GenerateLibraryLayout)' != 'true'">$(OutputPath)\</XamlPackagingRootFolder> |
|
||||
</PropertyGroup> |
|
||||
|
|
||||
<AssignTargetPath Files="@(ProcessedXamlFilesFullPath)" RootFolder="$(XamlPackagingRootFolder)"> |
|
||||
<Output TaskParameter="AssignedFiles" ItemName="CustomOutputGroupForPackagingOutput" /> |
|
||||
</AssignTargetPath> |
|
||||
|
|
||||
<Message Text="(Out) Project='$(MsBuildProjectName)' ProcessedXamlFiles == @(ProcessedXamlFiles)" /> |
|
||||
<Message Text="(Out) XamlPackagingRootFolder == $(XamlPackagingRootFolder)" /> |
|
||||
<Message Text="(Out) ProcessedXamlFilesFullPath == @(ProcessedXamlFilesFullPath)" /> |
|
||||
<Message Text="(Out) Project='$(MsBuildProjectName)' CustomOutputGroupForPackagingOutput == @(CustomOutputGroupForPackagingOutput)" /> |
|
||||
|
|
||||
</Target> |
|
||||
|
|
||||
<PropertyGroup> |
|
||||
<PrepareLibraryLayoutDependsOn> |
|
||||
GetPackagingOutputs; |
|
||||
$(PrepareLibraryLayoutDependsOn) |
|
||||
</PrepareLibraryLayoutDependsOn> |
|
||||
</PropertyGroup> |
|
||||
|
|
||||
<!-- This builds the Bin Folder for DLL's that wish to have the SDK type layout --> |
|
||||
<Target Name="PrepareLibraryLayout" |
|
||||
Condition="'$(GenerateLibraryLayout)' == 'true'" |
|
||||
DependsOnTargets="$(PrepareLibraryLayoutDependsOn)" |
|
||||
BeforeTargets="CopyFilesToOutputDirectory" |
|
||||
> |
|
||||
|
|
||||
<ItemGroup> |
|
||||
<_LayoutFile Include="@(PackagingOutputs)" Condition="'%(OutputGroup)' == 'ContentFilesProjectOutputGroup'" /> |
|
||||
<_LayoutFile Include="@(PackagingOutputs)" Condition="'%(OutputGroup)' == 'CustomOutputGroupForPackaging'" /> |
|
||||
</ItemGroup> |
|
||||
|
|
||||
<Copy SourceFiles="@(_LayoutFile)" |
|
||||
DestinationFiles="@(_LayoutFile->'$(OutDir)\%(TargetPath)')" |
|
||||
SkipUnchangedFiles="$(SkipCopyUnchangedFiles)" |
|
||||
OverwriteReadOnlyFiles="$(OverwriteReadOnlyFiles)" |
|
||||
Retries="$(CopyRetryCount)" |
|
||||
RetryDelayMilliseconds="$(CopyRetryDelayMilliseconds)" |
|
||||
UseHardlinksIfPossible="$(CreateHardLinksForCopyFilesToOutputDirectoryIfPossible)" |
|
||||
/> |
|
||||
</Target> |
|
||||
|
|
||||
<!-- |
|
||||
============================================================ |
|
||||
Properties and Targets Common to Managed .NETCore projects |
|
||||
============================================================ |
|
||||
--> |
|
||||
|
|
||||
<!-- |
|
||||
The ImplicitlyExpandTargetFramework target will expand all |
|
||||
of the dll reference assemblies in the TargetFrameworkDirectory |
|
||||
for the project and place the items into the ReferencePath itemgroup |
|
||||
which contains resolved items. |
|
||||
--> |
|
||||
<PropertyGroup> |
|
||||
<ResolveReferencesDependsOn> |
|
||||
$(ResolveReferencesDependsOn); |
|
||||
ImplicitlyExpandTargetFramework; |
|
||||
ImplicitlyExpandTargetPlatform |
|
||||
</ResolveReferencesDependsOn> |
|
||||
|
|
||||
<ImplicitlyExpandTargetFrameworkDependsOn> |
|
||||
$(ImplicitlyExpandTargetFrameworkDependsOn); |
|
||||
GetReferenceAssemblyPaths |
|
||||
</ImplicitlyExpandTargetFrameworkDependsOn> |
|
||||
</PropertyGroup> |
|
||||
|
|
||||
<Target Name="ImplicitlyExpandTargetFramework" |
|
||||
Condition="'$(ImplicitlyExpandTargetFramework)' == 'true'" |
|
||||
DependsOnTargets="$(ImplicitlyExpandTargetFrameworkDependsOn)" |
|
||||
> |
|
||||
<ItemGroup> |
|
||||
<ReferenceAssemblyPaths Include="$(_TargetFrameworkDirectories)"/> |
|
||||
<ReferencePath Include="%(ReferenceAssemblyPaths.Identity)*.dll"> |
|
||||
<WinMDFile>false</WinMDFile> |
|
||||
<CopyLocal>false</CopyLocal> |
|
||||
<ReferenceGroupingDisplayName>.NET for Windows Store apps</ReferenceGroupingDisplayName> |
|
||||
<ReferenceGrouping>$(TargetFrameworkMoniker)</ReferenceGrouping> |
|
||||
<ResolvedFrom>ImplicitlyExpandTargetFramework</ResolvedFrom> |
|
||||
<IsSystemReference>True</IsSystemReference> |
|
||||
</ReferencePath> |
|
||||
</ItemGroup> |
|
||||
|
|
||||
<Message Importance="Low" Text="TargetMonikerDisplayName: $(TargetFrameworkMonikerDisplayName) ReferenceAssemblyPaths: @(ReferenceAssemblyPaths)"/> |
|
||||
|
|
||||
<Message Importance="Low" Text="Including @(ReferencePath)" |
|
||||
Condition="'%(ReferencePath.ResolvedFrom)' == 'ImplicitlyExpandTargetFramework'"/> |
|
||||
|
|
||||
<ItemGroup> |
|
||||
<_ResolveAssemblyReferenceResolvedFiles Include="@(ReferencePath)" |
|
||||
Condition="'%(ReferencePath.ResolvedFrom)' == 'ImplicitlyExpandTargetFramework'"/> |
|
||||
</ItemGroup> |
|
||||
</Target> |
|
||||
|
|
||||
<!-- |
|
||||
The ImplicitlyExpandTargetPlatform target will find the |
|
||||
appropriate platform in the requested SDK, gather the |
|
||||
list of references for that platform, and add them to the |
|
||||
ReferencePath item which is the ItemGroup which contains |
|
||||
resolved paths to pass to e.g. the compiler. |
|
||||
--> |
|
||||
<Target Name="ImplicitlyExpandTargetPlatform" |
|
||||
Condition="'$(ImplicitlyExpandTargetPlatform)' == 'true'" |
|
||||
> |
|
||||
|
|
||||
<ItemGroup> |
|
||||
<_TargetPlatformWinMDs Condition="'$(TargetPlatformSdkRootOverride)' != ''" Include="$(TargetPlatformSdkRootOverride)\References\**\*.winmd"> |
|
||||
<WinMDFile>true</WinMDFile> |
|
||||
<CopyLocal>false</CopyLocal> |
|
||||
<ReferenceGrouping>$(TargetPlatformMoniker)</ReferenceGrouping> |
|
||||
<ReferenceGroupingDisplayName>$(TargetPlatformDisplayName)</ReferenceGroupingDisplayName> |
|
||||
<ResolvedFrom>ImplicitlyExpandTargetPlatform</ResolvedFrom> |
|
||||
<IsSystemReference>True</IsSystemReference> |
|
||||
</_TargetPlatformWinMDs> |
|
||||
<_TargetPlatformWinMDs Condition="'$(TargetPlatformSdkRootOverride)' == ''" Include="$([Microsoft.Build.Utilities.ToolLocationHelper]::GetTargetPlatformReferences($(SDKIdentifier), $(SDKVersion), $(TargetPlatformIdentifier), $(TargetPlatformMinVersion), $(TargetPlatformVersion)))"> |
|
||||
<WinMDFile>true</WinMDFile> |
|
||||
<CopyLocal>false</CopyLocal> |
|
||||
<ReferenceGrouping>$(TargetPlatformMoniker)</ReferenceGrouping> |
|
||||
<ReferenceGroupingDisplayName>$(TargetPlatformDisplayName)</ReferenceGroupingDisplayName> |
|
||||
<ResolvedFrom>ImplicitlyExpandTargetPlatform</ResolvedFrom> |
|
||||
<IsSystemReference>True</IsSystemReference> |
|
||||
</_TargetPlatformWinMDs> |
|
||||
</ItemGroup> |
|
||||
|
|
||||
<Warning Condition="'@(_TargetPlatformWinMDs)' == ''" |
|
||||
Text="Could not find target platform winmds for the SDK specified by [$(SDKIdentifier), $(SDKVersion), $(TargetPlatformIdentifier), $(TargetPlatformMinVersion), $(TargetPlatformVersion)]"/> |
|
||||
|
|
||||
<Message Importance="Low" Text="Including @(_TargetPlatformWinMDs)" /> |
|
||||
|
|
||||
<ItemGroup> |
|
||||
<ReferencePath Include="@(_TargetPlatformWinMDs)" /> |
|
||||
<ReferencePath Include="$(FacadeWinmdPath)" Condition="Exists($(FacadeWinmdPath))"> |
|
||||
<WinMDFile>true</WinMDFile> |
|
||||
<CopyLocal>false</CopyLocal> |
|
||||
<ReferenceGrouping>$(TargetPlatformMoniker)</ReferenceGrouping> |
|
||||
<ReferenceGroupingDisplayName>$(TargetPlatformDisplayName)</ReferenceGroupingDisplayName> |
|
||||
<ResolvedFrom>ImplicitlyExpandTargetPlatform</ResolvedFrom> |
|
||||
<IsSystemReference>True</IsSystemReference> |
|
||||
</ReferencePath> |
|
||||
<_ResolveAssemblyReferenceResolvedFiles Include="@(_TargetPlatformWinMDs)" /> |
|
||||
|
|
||||
<!-- Clear out 'temporary' variable --> |
|
||||
<_TargetPlatformWinMDs Remove="@(_TargetPlatformWinMDs)" /> |
|
||||
</ItemGroup> |
|
||||
</Target> |
|
||||
|
|
||||
<!-- |
|
||||
Enable warning when referenced projects have higher version than the current project |
|
||||
for Windows Store projects |
|
||||
--> |
|
||||
<PropertyGroup> |
|
||||
<FindInvalidProjectReferences Condition="'$(TargetPlatformIdentifier)' == 'Windows' and |
|
||||
'$(TargetPlatformVersion)' >= '8.0'">true</FindInvalidProjectReferences> |
|
||||
</PropertyGroup> |
|
||||
|
|
||||
<!-- |
|
||||
Enable warning when referenced ESDKs do not have MaxPlatformVersion |
|
||||
specified for Windows Store projects |
|
||||
--> |
|
||||
<PropertyGroup> |
|
||||
<SDKReferenceWarnOnMissingMaxPlatformVersion Condition="'$(SDKReferenceWarnOnMissingMaxPlatformVersion)' == '' and |
|
||||
'$(TargetPlatformIdentifier)' == 'Windows' and |
|
||||
'$(TargetPlatformVersion)' >= '8.0'">true</SDKReferenceWarnOnMissingMaxPlatformVersion> |
|
||||
</PropertyGroup> |
|
||||
|
|
||||
<!-- |
|
||||
Ensure that UAP headless applications' WINMDs are resolved so that GenerateAppxManifest has the required |
|
||||
metadata to generate activatableClass extensions. This should only execute for non-EXE projects that have |
|
||||
<ContainsStartupTask>true</ContainsStartupTask> and create APPX packages. |
|
||||
--> |
|
||||
<Target Name="_ResolvePrimaryProjectWinmdFiles" |
|
||||
BeforeTargets="BeforeGenerateAppxManifest" |
|
||||
AfterTargets="_GetPackagingOutputs" |
|
||||
Condition="'$(OutputType)' != 'exe' and '$(AppxPackage)' == 'true' AND '$(ContainsStartupTask)' == 'true'"> |
|
||||
<ItemGroup> |
|
||||
<_AppxWinmdFilesToHarvest Include="@(PackagingOutputs)" |
|
||||
Condition="'%(PackagingOutputs.Extension)' == '.winmd' |
|
||||
and '%(PackagingOutputs.ProjectName)' == '$(ProjectName)' |
|
||||
and '%(PackagingOutputs.ResolvedFrom)' != 'GetSDKReferenceFiles'"> |
|
||||
<!-- This covers the Managed Background Application winmd which does NOT have a WinMDFileType value set --> |
|
||||
<ImageRuntime Condition="'$(PrimaryProjectWinmdImageRuntimeOverride)' == ''">WindowsRuntime 1.4;CLR v4.0.30319</ImageRuntime> |
|
||||
<!-- This covers the C++ Background Application winmd which does NOT have a WinMDFileType value set --> |
|
||||
<ImageRuntime Condition="'$(PrimaryProjectWinmdImageRuntimeOverride)' == '' |
|
||||
and '@(Language)' == 'C++'">WindowsRuntime 1.4</ImageRuntime> |
|
||||
<!-- This covers Managed Windows Runtime Component winmds --> |
|
||||
<ImageRuntime Condition="'$(PrimaryProjectWinmdImageRuntimeOverride)' == '' |
|
||||
and '%(PackagingOutputs.WinMDFileType)' == 'Managed'">WindowsRuntime 1.4;CLR v4.0.30319</ImageRuntime> |
|
||||
<!-- This covers Native Windows Runtime Component winmds --> |
|
||||
<ImageRuntime Condition="'$(PrimaryProjectWinmdImageRuntimeOverride)' == '' |
|
||||
and '%(PackagingOutputs.WinMDFileType)' == 'Native'">WindowsRuntime 1.4</ImageRuntime> |
|
||||
<!-- This covers Native Windows Runtime Component winmds for DynamicLibrary projects --> |
|
||||
<ImageRuntime Condition="'$(PrimaryProjectWinmdImageRuntimeOverride)' == '' |
|
||||
and '%(PackagingOutputs.ProjectType)' == 'DynamicLibrary'">WindowsRuntime 1.4</ImageRuntime> |
|
||||
<!-- This provides an override --> |
|
||||
<ImageRuntime Condition="'$(PrimaryProjectWinmdImageRuntimeOverride)' != ''">$(PrimaryProjectWinmdImageRuntimeOverride)</ImageRuntime> |
|
||||
</_AppxWinmdFilesToHarvest> |
|
||||
</ItemGroup> |
|
||||
</Target> |
|
||||
|
|
||||
<Import Project="ImportAfter\*"/> |
|
||||
|
|
||||
</Project> |
|
||||
@ -1,52 +0,0 @@ |
|||||
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> |
|
||||
<ItemGroup Condition=" '$(IsCodeSharingProject)' != 'true' "> |
|
||||
<!-- SDK references --> |
|
||||
<PropertyPageSchema Include="$(MSBuildThisFileDirectory)$(LangName)\SDKReference.xaml"> |
|
||||
<Context>;BrowseObject</Context> |
|
||||
</PropertyPageSchema> |
|
||||
<PropertyPageSchema Include="$(MSBuildThisFileDirectory)$(LangName)\ResolvedSDKReference.xaml"> |
|
||||
<Context>ProjectCapabilitySubscriptionService;BrowseObject</Context> |
|
||||
</PropertyPageSchema> |
|
||||
<ProjectCapability Include="SDKReferences" /> |
|
||||
|
|
||||
<!-- WinRT references --> |
|
||||
<!-- No need for WinRTReference.xaml because we share an item type with AssemblyReference.xaml --> |
|
||||
<ProjectCapability Include="WinRTReferences" /> |
|
||||
</ItemGroup> |
|
||||
<ItemGroup> |
|
||||
<!-- Xaml item types --> |
|
||||
<PropertyPageSchema Include=" |
|
||||
$(MSBuildThisFileDirectory)$(LangName)\PRIResource.xaml; |
|
||||
$(MSBuildThisFileDirectory)$(LangName)\ApplicationDefinition.xaml; |
|
||||
$(MSBuildThisFileDirectory)$(LangName)\Page.xaml; |
|
||||
$(MSBuildThisFileDirectory)$(LangName)\AppxManifest.xaml; |
|
||||
$(MSBuildThisFileDirectory)$(LangName)\DesignData.xaml; |
|
||||
$(MSBuildThisFileDirectory)$(LangName)\DesignDataWithDesignTimeCreatableTypes.xaml; |
|
||||
"> |
|
||||
<Context>File;BrowseObject</Context> |
|
||||
</PropertyPageSchema> |
|
||||
|
|
||||
<PropertyPageSchema Include="$(MSBuildThisFileDirectory)$(LangName)\ProjectItemsSchema.xaml"/> |
|
||||
</ItemGroup> |
|
||||
|
|
||||
<ItemDefinitionGroup Condition=" '$(DefineExplicitDefaults)' == 'true' "> |
|
||||
<PRIResource> |
|
||||
<CopyToOutputDirectory>Never</CopyToOutputDirectory> |
|
||||
</PRIResource> |
|
||||
<AppxManifest> |
|
||||
<CopyToOutputDirectory>Never</CopyToOutputDirectory> |
|
||||
</AppxManifest> |
|
||||
<Page> |
|
||||
<CopyToOutputDirectory>Never</CopyToOutputDirectory> |
|
||||
</Page> |
|
||||
<ApplicationDefinition> |
|
||||
<CopyToOutputDirectory>Never</CopyToOutputDirectory> |
|
||||
</ApplicationDefinition> |
|
||||
<DesignData> |
|
||||
<CopyToOutputDirectory>Never</CopyToOutputDirectory> |
|
||||
</DesignData> |
|
||||
<DesignDataWithDesignTimeCreatableTypes> |
|
||||
<CopyToOutputDirectory>Never</CopyToOutputDirectory> |
|
||||
</DesignDataWithDesignTimeCreatableTypes> |
|
||||
</ItemDefinitionGroup> |
|
||||
</Project> |
|
||||
@ -1,73 +0,0 @@ |
|||||
<!-- |
|
||||
*********************************************************************************************** |
|
||||
Microsoft.Windows.UI.Xaml.VisualBasic.targets |
|
||||
|
|
||||
WARNING: DO NOT MODIFY this file unless you are knowledgeable about MSBuild and have |
|
||||
created a backup copy. Incorrect changes to this file will make it |
|
||||
impossible to load or build your projects from the command-line or the IDE. |
|
||||
|
|
||||
Copyright (C) Microsoft Corporation. All rights reserved. |
|
||||
*********************************************************************************************** |
|
||||
--> |
|
||||
|
|
||||
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> |
|
||||
|
|
||||
<PropertyGroup Condition=" '$(TargetPlatformIdentifier)' == 'WindowsPhoneApp' "> |
|
||||
<TargetPlatformVersion Condition="'$(TargetPlatformVersion)' == ''">8.1</TargetPlatformVersion> |
|
||||
<TargetFrameworkIdentifier Condition="'$(TargetFrameworkIdentifier)' == ''">WindowsPhoneApp</TargetFrameworkIdentifier> |
|
||||
<TargetFrameworkVersion Condition="'$(TargetFrameworkVersion)' == ''">v8.1</TargetFrameworkVersion> |
|
||||
</PropertyGroup> |
|
||||
|
|
||||
<PropertyGroup Condition=" '$(TargetPlatformIdentifier)' == 'windows' OR '$(TargetPlatformIdentifier)' == '' "> |
|
||||
<TargetPlatformVersion Condition="'$(TargetPlatformVersion)' == ''">8.2</TargetPlatformVersion> |
|
||||
<TargetFrameworkIdentifier Condition="'$(TargetFrameworkIdentifier)' == ''">.NETCore</TargetFrameworkIdentifier> |
|
||||
<TargetFrameworkVersion Condition="'$(TargetFrameworkVersion)' == ''">v4.5.1</TargetFrameworkVersion> |
|
||||
</PropertyGroup> |
|
||||
|
|
||||
<PropertyGroup Condition=" '$(TargetPlatformIdentifier)' == 'UAP'"> |
|
||||
<TargetFrameworkIdentifier Condition="'$(TargetFrameworkIdentifier)' == ''">.NETCore</TargetFrameworkIdentifier> |
|
||||
<TargetFrameworkVersion Condition="'$(TargetFrameworkVersion)' == ''">v5.0</TargetFrameworkVersion> |
|
||||
</PropertyGroup> |
|
||||
|
|
||||
<PropertyGroup Condition="'$(SDKIdentifier)' == '' and '$(TargetPlatformIdentifier)' == 'UAP'"> |
|
||||
<SDKIdentifier>Windows</SDKIdentifier> |
|
||||
<SDKVersion>10.0</SDKVersion> |
|
||||
</PropertyGroup> |
|
||||
|
|
||||
<PropertyGroup> |
|
||||
<UWPNugetRepo Condition="'$(UWPNugetRepo)' == ''">$([MSBuild]::GetRegistryValueFromView('HKEY_LOCAL_MACHINE\SOFTWARE\NuGet\Repository', 'UWPNugetPackages', null, RegistryView.Registry32, RegistryView.Default))</UWPNugetRepo> |
|
||||
<RestoreAdditionalProjectFallbackFolders>$(RestoreAdditionalProjectFallbackFolders);$(UWPNugetRepo)</RestoreAdditionalProjectFallbackFolders> |
|
||||
</PropertyGroup> |
|
||||
|
|
||||
<PropertyGroup> |
|
||||
<ImplicitlyExpandTargetPlatform Condition="'$(ImplicitlyExpandTargetPlatform)' == '' ">true</ImplicitlyExpandTargetPlatform> |
|
||||
<ImplicitlyExpandTargetFramework Condition="'$(ImplicitlyExpandTargetFramework)' == '' ">true</ImplicitlyExpandTargetFramework> |
|
||||
<NoStdLib Condition="'$(NoStdLib)' == ''">true</NoStdLib> |
|
||||
<UseVSHostingProcess>false</UseVSHostingProcess> |
|
||||
<WindowsAppContainer>true</WindowsAppContainer> |
|
||||
<AppxPackage Condition="'$(OutputType)' == 'AppContainerExe'">True</AppxPackage> |
|
||||
|
|
||||
<SuppressWarningsInPass1 Condition="'$(SuppressWarningsInPass1)' == '' ">true</SuppressWarningsInPass1> |
|
||||
<ExplicitResetWarningSuppression>true</ExplicitResetWarningSuppression> |
|
||||
|
|
||||
<MyType Condition="'$(MyType)' == ''">Empty</MyType> |
|
||||
</PropertyGroup> |
|
||||
|
|
||||
<Import Project="$(MSBuildBinPath)\Microsoft.VisualBasic.targets" /> |
|
||||
<Import Project="Microsoft.Windows.UI.Xaml.Common.targets" /> |
|
||||
<Import Project="Microsoft.Windows.UI.Xaml.Cps.targets" /> |
|
||||
|
|
||||
<ItemGroup> |
|
||||
<PropertyPageSchema Include="$(MSBuildThisFileDirectory)$(LangName)\VisualBasic.ProjectItemsSchema.xaml"/> |
|
||||
</ItemGroup> |
|
||||
|
|
||||
<Target |
|
||||
Name="_VBDesignTimePdbFile" |
|
||||
BeforeTargets="CoreCompile" |
|
||||
Condition="'$(BuildingInsideVisualStudio)' == 'true' and '$(BuildingProject)' == 'false'"> |
|
||||
<PropertyGroup> |
|
||||
<PdbFile>$(IntermediateOutputPath)$(TargetName).pdb</PdbFile> |
|
||||
</PropertyGroup> |
|
||||
</Target> |
|
||||
|
|
||||
</Project> |
|
||||
@ -1,204 +0,0 @@ |
|||||
<!-- |
|
||||
*********************************************************************************************** |
|
||||
Microsoft.Windows.UI.Xaml.Cpp.targets |
|
||||
|
|
||||
WARNING: DO NOT MODIFY this file unless you are knowledgeable about MSBuild and have |
|
||||
created a backup copy. Incorrect changes to this file will make it |
|
||||
impossible to load or build your projects from the command-line or the IDE. |
|
||||
|
|
||||
Copyright (C) Microsoft Corporation. All rights reserved. |
|
||||
*********************************************************************************************** |
|
||||
--> |
|
||||
|
|
||||
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> |
|
||||
<PropertyGroup> |
|
||||
<BeforeClCompileTargets> |
|
||||
MarkupCompilePass1; |
|
||||
$(BeforeClCompileTargets) |
|
||||
</BeforeClCompileTargets> |
|
||||
|
|
||||
<ComputeCompileInputsTargets> |
|
||||
ComputeXamlGeneratedCompileInputs; |
|
||||
$(ComputeCompileInputsTargets) |
|
||||
</ComputeCompileInputsTargets> |
|
||||
</PropertyGroup> |
|
||||
|
|
||||
<Choose> |
|
||||
<When Condition="'$(ConfigurationType)'=='StaticLibrary'"> |
|
||||
<PropertyGroup> |
|
||||
<AfterClCompileTargets> |
|
||||
$(ComputeLinkInputsTargets); |
|
||||
CreateWinMD; |
|
||||
ComputeGeneratedWinMD; |
|
||||
MarkupCompilePass2; |
|
||||
ComputeInvalidXamlGenerated; |
|
||||
CompileXamlGeneratedFiles; |
|
||||
$(AfterClCompileTargets) |
|
||||
</AfterClCompileTargets> |
|
||||
</PropertyGroup> |
|
||||
</When> |
|
||||
<Otherwise> |
|
||||
<PropertyGroup> |
|
||||
<AfterBuildCompileTargets> |
|
||||
$(ComputeLinkInputsTargets); |
|
||||
CreateWinMD; |
|
||||
ComputeGeneratedWinMD; |
|
||||
MarkupCompilePass2; |
|
||||
ComputeInvalidXamlGenerated; |
|
||||
CompileXamlGeneratedFiles; |
|
||||
$(AfterBuildCompileTargets) |
|
||||
</AfterBuildCompileTargets> |
|
||||
</PropertyGroup> |
|
||||
</Otherwise> |
|
||||
</Choose> |
|
||||
|
|
||||
<PropertyGroup> |
|
||||
<XamlPreLinkDependsOn> |
|
||||
$(XamlPreLinkDependsOn); |
|
||||
ComputeXamlGeneratedCLOutputs |
|
||||
</XamlPreLinkDependsOn> |
|
||||
|
|
||||
<XamlPreLibDependsOn> |
|
||||
$(XamlPreLibDependsOn); |
|
||||
ComputeXamlGeneratedCLOutputs |
|
||||
</XamlPreLibDependsOn> |
|
||||
|
|
||||
<GenerateProjectionAssembly>True</GenerateProjectionAssembly> |
|
||||
<OnlyCreateWinMD>true</OnlyCreateWinMD> |
|
||||
<ImplicitlyExpandTargetPlatform>false</ImplicitlyExpandTargetPlatform> |
|
||||
</PropertyGroup> |
|
||||
|
|
||||
<PropertyGroup> |
|
||||
<ValidatePresenceOfAppxManifestItemsDependsOn> |
|
||||
$(ValidatePresenceOfAppxManifestItemsDependsOn); |
|
||||
_CreateContentItemOutOfCustomAppxManifest |
|
||||
</ValidatePresenceOfAppxManifestItemsDependsOn> |
|
||||
</PropertyGroup> |
|
||||
|
|
||||
<ItemGroup> |
|
||||
<PropertyPageSchema Include="$(VCTargetsPath)$(LangID)\Xaml.xml" /> |
|
||||
</ItemGroup> |
|
||||
|
|
||||
<!-- This is a proxy target that holds stuff that runs before the final Link --> |
|
||||
<Target Name="XamlPreLink" BeforeTargets="Link" DependsOnTargets="$(XamlPreLinkDependsOn)" /> |
|
||||
|
|
||||
<!-- This is a proxy target that holds stuff that runs before the final Link --> |
|
||||
<Target Name="XamlPreLib" BeforeTargets="Lib" DependsOnTargets="$(XamlPreLibDependsOn)" /> |
|
||||
|
|
||||
<Target Name="ComputeGeneratedWinMD" > |
|
||||
<PropertyGroup> |
|
||||
<LocalAssembly Condition="'$(LocalAssembly)' == '' and '%(Link.WindowsMetadataFile)' != ''">%(Link.WindowsMetadataFile)</LocalAssembly> |
|
||||
</PropertyGroup> |
|
||||
</Target> |
|
||||
|
|
||||
<!-- Change AppxManifest.xml override item to be of Content type. --> |
|
||||
<Target Name="_CreateContentItemOutOfCustomAppxManifest"> |
|
||||
<ItemGroup> |
|
||||
<Content Include="@(Xml)" Condition="'%(Identity)' == 'AppxManifest.xml'" /> |
|
||||
<Xml Remove="@(Xml)" Condition="'%(Identity)' == 'AppxManifest.xml'" /> |
|
||||
</ItemGroup> |
|
||||
</Target> |
|
||||
|
|
||||
<PropertyGroup> |
|
||||
<GeneratedFilesDir Condition=" '$(GeneratedFilesDir)' == ''">Generated Files\</GeneratedFilesDir> |
|
||||
<XamlGeneratedOutputPath>$(GeneratedFilesDir)</XamlGeneratedOutputPath> |
|
||||
<ExtensionsToDeleteOnClean>$(ExtensionsToDeleteOnClean);*.g.h;*.g.cpp;*.xaml</ExtensionsToDeleteOnClean> |
|
||||
</PropertyGroup> |
|
||||
|
|
||||
<Import Project="Microsoft.Windows.UI.Xaml.Common.targets" /> |
|
||||
|
|
||||
<ItemGroup> |
|
||||
<PropertyPageSchema Include="$(MSBuildThisFileDirectory)$(LangName)\Cpp.ProjectItemsSchema.xaml"/> |
|
||||
</ItemGroup> |
|
||||
|
|
||||
<!-- Generated files output group population --> |
|
||||
<PropertyGroup> |
|
||||
<GeneratedFilesOutputGroupDependsOn>XamlGeneratedFilesOutputGroup;$(GeneratedFilesOutputGroupDependsOn)</GeneratedFilesOutputGroupDependsOn> |
|
||||
</PropertyGroup> |
|
||||
|
|
||||
<Target Name="XamlGeneratedFilesOutputGroup" |
|
||||
DependsOnTargets="$(XamlGeneratedFilesOutputGroupDependsOn)" |
|
||||
Condition="'@(Page)@(ApplicationDefinition)' != ''"> |
|
||||
<ItemGroup> |
|
||||
<GeneratedFilesOutputGroup Condition="'%(Page.ExcludedFromBuild)'!='true'" Include="@(Page->'$(XamlGeneratedOutputPath)%(Filename).g.h')" /> |
|
||||
<GeneratedFilesOutputGroup Condition="'%(Page.ExcludedFromBuild)'!='true'" Include="@(Page->'$(XamlGeneratedOutputPath)%(Filename).g.cpp')" /> |
|
||||
<GeneratedFilesOutputGroup Condition="'%(ApplicationDefinition.ExcludedFromBuild)'!='true'" Include="@(ApplicationDefinition->'$(XamlGeneratedOutputPath)%(Filename).g.h')" /> |
|
||||
<GeneratedFilesOutputGroup Condition="'%(ApplicationDefinition.ExcludedFromBuild)'!='true'" Include="@(ApplicationDefinition->'$(XamlGeneratedOutputPath)%(Filename).g.cpp')" /> |
|
||||
</ItemGroup> |
|
||||
</Target> |
|
||||
|
|
||||
<Target Name="ComputeXamlGeneratedCompileInputs" |
|
||||
DependsOnTargets="$(ComputeXamlGeneratedCompileInputsDependsOn)" |
|
||||
Condition="'@(Page)@(ApplicationDefinition)' != ''"> |
|
||||
<ItemGroup> |
|
||||
<ClCompile Include="$(XamlGeneratedOutputPath)XamlTypeInfo.g.cpp" > |
|
||||
<CompilerIteration>XamlGenerated</CompilerIteration> |
|
||||
</ClCompile> |
|
||||
<ClCompile Include="$(XamlGeneratedOutputPath)XamlTypeInfo.Impl.g.cpp" /> |
|
||||
<ClCompile Condition="'$(OutputType)' == 'Library'" Include="$(XamlGeneratedOutputPath)XamlLibMetadataProvider.g.cpp" /> |
|
||||
</ItemGroup> |
|
||||
|
|
||||
<!-- The build only wants to generate winmd once, either during Link target or Createwinmd target, not both. |
|
||||
Link and Createwinmd targets will execute link.exe, so it is best to run link.exe only once. |
|
||||
However, there are two cases where that isn't possible. |
|
||||
1) when build is building XAML and |
|
||||
2) when building in passes. --> |
|
||||
<PropertyGroup> |
|
||||
<GenerateBuildCompilePassWinMD Condition="'$(GenerateBuildCompilePassWinMD)' == ''">true</GenerateBuildCompilePassWinMD> |
|
||||
</PropertyGroup> |
|
||||
</Target> |
|
||||
|
|
||||
<Target Name="ComputeInvalidXamlGenerated" > |
|
||||
<ItemGroup> |
|
||||
<!-- Some files dont exists because XAML files do not always generate .g.cpp --> |
|
||||
<ClCompile Remove="@(ClCompile)" Condition="'%(ClCompile.CompilerIteration)' == 'XamlGenerated' and !Exists('%(Identity)')"/> |
|
||||
</ItemGroup> |
|
||||
</Target> |
|
||||
|
|
||||
<!-- Add CL generates .obj files to Obj item group, it will be used by lib or link --> |
|
||||
<Target Name="ComputeXamlGeneratedCLOutputs" |
|
||||
DependsOnTargets="ComputeXamlGeneratedCompileInputs;ComputeInvalidXamlGenerated" |
|
||||
Condition="'@(ClCompile)' != ''"> |
|
||||
|
|
||||
<ItemGroup> |
|
||||
<!-- Some files dont exists because XAML files do not always generate .g.cpp --> |
|
||||
<ClCompile Remove="@(ClCompile)" Condition="'%(ClCompile.CompilerIteration)' == 'XamlGenerated' and !Exists('%(Identity)')"/> |
|
||||
<!-- No object file name defined: filename.obj --> |
|
||||
<Obj Condition="'%(ClCompile.ObjectFileName)'=='' and '%(ClCompile.ExcludedFromBuild)'!='true'" Include="@(ClCompile->'%(Filename).obj')" /> |
|
||||
<!-- Object file name is a directory (has trailing slash): ofn\filename.obj --> |
|
||||
<Obj Condition="HasTrailingSlash('%(ClCompile.ObjectFileName)') and '%(ClCompile.ExcludedFromBuild)'!='true'" Include="@(ClCompile->'%(ObjectFileName)%(Filename).obj')" /> |
|
||||
<!-- Object file name is a file (does not has trailing slash): ofn --> |
|
||||
<Obj Condition="'%(ClCompile.ObjectFileName)' != '' and !HasTrailingSlash('%(ClCompile.ObjectFileName)') and '%(ClCompile.ExcludedFromBuild)'!='true'" Include="@(ClCompile->'%(ObjectFileName)')" /> |
|
||||
|
|
||||
<Lib Include="@(Obj->WithMetadataValue('CompilerIteration', 'XamlGenerated')->ClearMetadata())" /> |
|
||||
<Link Include="@(Obj->WithMetadataValue('CompilerIteration', 'XamlGenerated')->ClearMetadata())" /> |
|
||||
</ItemGroup> |
|
||||
</Target> |
|
||||
|
|
||||
<!-- Enable design time build as well as selected file(s) compile support --> |
|
||||
<PropertyGroup> |
|
||||
<EnableDesignTimeBuild>true</EnableDesignTimeBuild> |
|
||||
</PropertyGroup> |
|
||||
|
|
||||
<ItemDefinitionGroup> |
|
||||
<Page> |
|
||||
<GeneratorTarget>DesignTimeMarkupCompilation</GeneratorTarget> |
|
||||
</Page> |
|
||||
<ApplicationDefinition> |
|
||||
<GeneratorTarget>DesignTimeMarkupCompilation</GeneratorTarget> |
|
||||
</ApplicationDefinition> |
|
||||
</ItemDefinitionGroup> |
|
||||
|
|
||||
<PropertyGroup> |
|
||||
<MarkupCompilePass1DependsOn>CppDesignTimeMarkupCompilation;$(MarkupCompilePass1DependsOn)</MarkupCompilePass1DependsOn> |
|
||||
</PropertyGroup> |
|
||||
|
|
||||
<Target Name="CppDesignTimeMarkupCompilation" |
|
||||
DependsOnTargets="_SelectedFiles;SelectCustomBuild;ResolveReferences"> |
|
||||
<!-- Ideally we'd like to be able to build just the requested files (if it makes sense). --> |
|
||||
<!--<ItemGroup Condition="'@(SelectedFiles)'!=''"> |
|
||||
<Page Remove="@(Page)" Condition="'%(Identity)'!='@(SelectedFiles)'"/> |
|
||||
<ApplicationDefinition Remove="@(ApplicationDefinition)" Condition="'%(Identity)'!='@(SelectedFiles)'"/> |
|
||||
</ItemGroup>--> |
|
||||
</Target> |
|
||||
</Project> |
|
||||
@ -1,61 +0,0 @@ |
|||||
<!-- |
|
||||
*********************************************************************************************** |
|
||||
Microsoft.Windows.UI.Xaml.CSharp.targets |
|
||||
|
|
||||
WARNING: DO NOT MODIFY this file unless you are knowledgeable about MSBuild and have |
|
||||
created a backup copy. Incorrect changes to this file will make it |
|
||||
impossible to load or build your projects from the command-line or the IDE. |
|
||||
|
|
||||
Copyright (C) Microsoft Corporation. All rights reserved. |
|
||||
*********************************************************************************************** |
|
||||
--> |
|
||||
|
|
||||
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> |
|
||||
|
|
||||
<PropertyGroup Condition=" '$(TargetPlatformIdentifier)' == 'WindowsPhoneApp' "> |
|
||||
<TargetPlatformVersion Condition="'$(TargetPlatformVersion)' == ''">8.1</TargetPlatformVersion> |
|
||||
<TargetFrameworkIdentifier Condition="'$(TargetFrameworkIdentifier)' == ''">WindowsPhoneApp</TargetFrameworkIdentifier> |
|
||||
<TargetFrameworkVersion Condition="'$(TargetFrameworkVersion)' == ''">v8.1</TargetFrameworkVersion> |
|
||||
</PropertyGroup> |
|
||||
|
|
||||
<PropertyGroup Condition=" '$(TargetPlatformIdentifier)' == 'windows' OR '$(TargetPlatformIdentifier)' == '' "> |
|
||||
<TargetPlatformVersion Condition="'$(TargetPlatformVersion)' == ''">8.2</TargetPlatformVersion> |
|
||||
<TargetFrameworkIdentifier Condition="'$(TargetFrameworkIdentifier)' == ''">.NETCore</TargetFrameworkIdentifier> |
|
||||
<TargetFrameworkVersion Condition="'$(TargetFrameworkVersion)' == ''">v4.5.1</TargetFrameworkVersion> |
|
||||
</PropertyGroup> |
|
||||
|
|
||||
<PropertyGroup Condition=" '$(TargetPlatformIdentifier)' == 'UAP'"> |
|
||||
<TargetFrameworkIdentifier Condition="'$(TargetFrameworkIdentifier)' == ''">.NETCore</TargetFrameworkIdentifier> |
|
||||
<TargetFrameworkVersion Condition="'$(TargetFrameworkVersion)' == ''">v5.0</TargetFrameworkVersion> |
|
||||
</PropertyGroup> |
|
||||
|
|
||||
<PropertyGroup Condition="'$(SDKIdentifier)' == '' and '$(TargetPlatformIdentifier)' == 'UAP'"> |
|
||||
<SDKIdentifier>Windows</SDKIdentifier> |
|
||||
<SDKVersion>10.0</SDKVersion> |
|
||||
</PropertyGroup> |
|
||||
|
|
||||
<PropertyGroup> |
|
||||
<UWPNugetRepo Condition="'$(UWPNugetRepo)' == ''">$([MSBuild]::GetRegistryValueFromView('HKEY_LOCAL_MACHINE\SOFTWARE\NuGet\Repository', 'UWPNugetPackages', null, RegistryView.Registry32, RegistryView.Default))</UWPNugetRepo> |
|
||||
<RestoreAdditionalProjectFallbackFolders>$(RestoreAdditionalProjectFallbackFolders);$(UWPNugetRepo)</RestoreAdditionalProjectFallbackFolders> |
|
||||
</PropertyGroup> |
|
||||
|
|
||||
<PropertyGroup> |
|
||||
<ImplicitlyExpandTargetPlatform Condition="'$(ImplicitlyExpandTargetPlatform)' == '' ">true</ImplicitlyExpandTargetPlatform> |
|
||||
<ImplicitlyExpandTargetFramework Condition="'$(ImplicitlyExpandTargetFramework)' == '' ">true</ImplicitlyExpandTargetFramework> |
|
||||
<NoStdLib Condition="'$(NoStdLib)' == ''">true</NoStdLib> |
|
||||
<UseVSHostingProcess>false</UseVSHostingProcess> |
|
||||
<WindowsAppContainer>true</WindowsAppContainer> |
|
||||
<AppxPackage Condition="'$(OutputType)' == 'AppContainerExe'">True</AppxPackage> |
|
||||
|
|
||||
<!-- Supress the warnings in the 1st pass so that warnings are not repeated twice --> |
|
||||
<SuppressWarningsInPass1 Condition="'$(SuppressWarningsInPass1)' == '' ">true</SuppressWarningsInPass1> |
|
||||
</PropertyGroup> |
|
||||
|
|
||||
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" /> |
|
||||
<Import Project="Microsoft.Windows.UI.Xaml.Common.targets" /> |
|
||||
<Import Project="Microsoft.Windows.UI.Xaml.Cps.targets" /> |
|
||||
|
|
||||
<ItemGroup> |
|
||||
<PropertyPageSchema Include="$(MSBuildThisFileDirectory)$(LangName)\CSharp.ProjectItemsSchema.xaml"/> |
|
||||
</ItemGroup> |
|
||||
</Project> |
|
||||
@ -1,142 +0,0 @@ |
|||||
<!-- |
|
||||
*********************************************************************************************** |
|
||||
Microsoft.Windows.UI.Xaml.Common.targets |
|
||||
|
|
||||
WARNING: DO NOT MODIFY this file unless you are knowledgeable about MSBuild and have |
|
||||
created a backup copy. Incorrect changes to this file will make it |
|
||||
impossible to load or build your projects from the command-line or the IDE. |
|
||||
|
|
||||
Copyright (C) Microsoft Corporation. All rights reserved. |
|
||||
*********************************************************************************************** |
|
||||
--> |
|
||||
|
|
||||
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> |
|
||||
|
|
||||
<Import Project="ImportBefore\*"/> |
|
||||
|
|
||||
<PropertyGroup> |
|
||||
<AvailablePlatforms>$(AvailablePlatforms),ARM64</AvailablePlatforms> |
|
||||
</PropertyGroup> |
|
||||
|
|
||||
<!-- Need the path to vcmeta.dll --> |
|
||||
<PropertyGroup> |
|
||||
<VCInstallDir Condition="'$(VCInstallDir)' == ''">$(Registry:HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\15.0\Setup\VC@ProductDir)</VCInstallDir> |
|
||||
<VCInstallDir Condition="'$(VCInstallDir)' == ''">$(Registry:HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\VisualStudio\15.0\Setup\VC@ProductDir)</VCInstallDir> |
|
||||
<VCInstallDir Condition="'$(VCInstallDir)' == ''">$(Registry:HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VSWinExpress\15.0\Setup\VC@ProductDir)</VCInstallDir> |
|
||||
<VCInstallDir Condition="'$(VCInstallDir)' == ''">$(Registry:HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\VSWinExpress\15.0\Setup\VC@ProductDir)</VCInstallDir> |
|
||||
<VCInstallDir Condition="'$(VCInstallDir)' == ''">$(VsInstallRoot)\Common7\IDE\VC\</VCInstallDir> |
|
||||
|
|
||||
<WindowsKitsPath Condition="'$(WindowsKitsPath)' == '' and '$(TargetPlatformSdkRootOverride)' != ''">$(TargetPlatformSdkRootOverride)\</WindowsKitsPath> |
|
||||
<WindowsKitsPath Condition="'$(WindowsKitsPath)'==''">$([MSBuild]::GetRegistryValueFromView('HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows Kits\Installed Roots', 'KitsRoot10', null, RegistryView.Registry32, RegistryView.Default))</WindowsKitsPath> |
|
||||
|
|
||||
<!-- |
|
||||
if (TPV > RS2(10.0.15063.0) && TPMinV > TH2(10.0.10587.0)), use TPV XAML Compiler |
|
||||
else, use TPMinV XAML Compiler |
|
||||
--> |
|
||||
<WindowsKitsXamlCompilerTargetsPath Condition="'$(TargetPlatformVersion)' > '10.0.15064.0' AND '$(TargetPlatformMinVersion)' > '10.0.14392.0'">$(WindowsKitsPath)bin\$(TargetPlatformVersion)\XamlCompiler\Microsoft.Windows.UI.Xaml.Common.targets</WindowsKitsXamlCompilerTargetsPath> |
|
||||
<WindowsKitsXamlCompilerTargetsPath Condition="'$(WindowsKitsXamlCompilerTargetsPath)' == ''">$(WindowsKitsPath)bin\$(TargetPlatformMinVersion)\XamlCompiler\Microsoft.Windows.UI.Xaml.Common.targets</WindowsKitsXamlCompilerTargetsPath> |
|
||||
</PropertyGroup> |
|
||||
|
|
||||
<!-- Import the targets SDK --> |
|
||||
<Import Condition="Exists($(WindowsKitsXamlCompilerTargetsPath)) AND ('$(IsWinUIAlpha)' != 'true') AND ('$(DefaultXamlRuntime)' != 'WinUI')" Project="$(WindowsKitsXamlCompilerTargetsPath)"/> |
|
||||
|
|
||||
<!-- |
|
||||
Ensure that UAP headless applications' WINMDs are resolved so that GenerateAppxManifest has the required |
|
||||
metadata to generate activatableClass extensions. This should only execute for non-EXE projects that have |
|
||||
<ContainsStartupTask>true</ContainsStartupTask> and create APPX packages. |
|
||||
--> |
|
||||
<Target Name="_ResolvePrimaryProjectWinmdFiles" |
|
||||
BeforeTargets="BeforeGenerateAppxManifest" |
|
||||
AfterTargets="_GetPackagingOutputs" |
|
||||
Condition="'$(OutputType)' != 'exe' and '$(AppxPackage)' == 'true' AND '$(ContainsStartupTask)' == 'true'"> |
|
||||
<ItemGroup> |
|
||||
<_AppxWinmdFilesToHarvest Include="@(PackagingOutputs)" |
|
||||
Condition="'%(PackagingOutputs.Extension)' == '.winmd' |
|
||||
and '%(PackagingOutputs.ProjectName)' == '$(ProjectName)' |
|
||||
and '%(PackagingOutputs.ResolvedFrom)' != 'GetSDKReferenceFiles'"> |
|
||||
<!-- This covers the Managed Background Application winmd which does NOT have a WinMDFileType value set --> |
|
||||
<ImageRuntime Condition="'$(PrimaryProjectWinmdImageRuntimeOverride)' == ''">WindowsRuntime 1.4;CLR v4.0.30319</ImageRuntime> |
|
||||
<!-- This covers the C++ Background Application winmd which does NOT have a WinMDFileType value set --> |
|
||||
<ImageRuntime Condition="'$(PrimaryProjectWinmdImageRuntimeOverride)' == '' |
|
||||
and '@(Language)' == 'C++'">WindowsRuntime 1.4</ImageRuntime> |
|
||||
<!-- This covers Managed Windows Runtime Component winmds --> |
|
||||
<ImageRuntime Condition="'$(PrimaryProjectWinmdImageRuntimeOverride)' == '' |
|
||||
and '%(PackagingOutputs.WinMDFileType)' == 'Managed'">WindowsRuntime 1.4;CLR v4.0.30319</ImageRuntime> |
|
||||
<!-- This covers Native Windows Runtime Component winmds --> |
|
||||
<ImageRuntime Condition="'$(PrimaryProjectWinmdImageRuntimeOverride)' == '' |
|
||||
and '%(PackagingOutputs.WinMDFileType)' == 'Native'">WindowsRuntime 1.4</ImageRuntime> |
|
||||
<!-- This covers Native Windows Runtime Component winmds for DynamicLibrary projects --> |
|
||||
<ImageRuntime Condition="'$(PrimaryProjectWinmdImageRuntimeOverride)' == '' |
|
||||
and '%(PackagingOutputs.ProjectType)' == 'DynamicLibrary'">WindowsRuntime 1.4</ImageRuntime> |
|
||||
<!-- This provides an override --> |
|
||||
<ImageRuntime Condition="'$(PrimaryProjectWinmdImageRuntimeOverride)' != ''">$(PrimaryProjectWinmdImageRuntimeOverride)</ImageRuntime> |
|
||||
</_AppxWinmdFilesToHarvest> |
|
||||
</ItemGroup> |
|
||||
</Target> |
|
||||
|
|
||||
<PropertyGroup> |
|
||||
<AddProcessedXamlFilesToCopyLocalDependsOn> |
|
||||
ContentFilesProjectOutputGroup; |
|
||||
Prep_ComputeProcessXamlFiles; |
|
||||
$(AddProcessedXamlFilesToCopyLocalDependsOn) |
|
||||
</AddProcessedXamlFilesToCopyLocalDependsOn> |
|
||||
<AddProcessedXamlFilesToCopyLocalDependsOn Condition="'$(WindowsAppContainer)' == 'true'"> |
|
||||
_CalculateXbfSupport; |
|
||||
$(AddProcessedXamlFilesToCopyLocalDependsOn) |
|
||||
</AddProcessedXamlFilesToCopyLocalDependsOn> |
|
||||
</PropertyGroup> |
|
||||
|
|
||||
<Target Name="AddProcessedXamlFilesToCopyLocal" Condition="'$(AppxPackage)' != 'true'" DependsOnTargets="$(AddProcessedXamlFilesToCopyLocalDependsOn)" BeforeTargets="GetCopyToOutputDirectoryItems"> |
|
||||
<ItemGroup> |
|
||||
<_ProcessedXamlFilesToCopyLocal Include="@(GeneratedXamlSrc->'%(FullPath)')" /> |
|
||||
<_ProcessedXamlFilesToCopyLocal Condition="'$(GenerateLibraryLayout)' == 'true' and '$(DisableXbfGeneration)' != 'true'" Include="@(GeneratedXamlSrc0->'%(FullPath)')" /> |
|
||||
</ItemGroup> |
|
||||
|
|
||||
<AssignTargetPath Files="@(_ProcessedXamlFilesToCopyLocal)" RootFolder="$(XamlGeneratedOutputPath)"> |
|
||||
<Output TaskParameter="AssignedFiles" ItemName="_ProcessedXamlFilesToCopyLocalWithTargetPath" /> |
|
||||
</AssignTargetPath> |
|
||||
|
|
||||
<ItemGroup> |
|
||||
<_AllChildProjectItemsWithTargetPath Include="@(_ProcessedXamlFilesToCopyLocalWithTargetPath)" Condition="'%(Extension)' != '.xbf' OR ('%(Extension)' == '.xbf' AND '$(_SupportXbfAsEmbedFileResources)' != 'true')"> |
|
||||
<TargetPath Condition="'$(AppxPriInitialPath)' != ''">$(AppxPriInitialPath)\%(_ProcessedXamlFilesToCopyLocalWithTargetPath.TargetPath)</TargetPath> |
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> |
|
||||
</_AllChildProjectItemsWithTargetPath> |
|
||||
</ItemGroup> |
|
||||
|
|
||||
<ItemGroup> |
|
||||
<_AllChildProjectItemsWithTargetPath Include="@(ContentFilesProjectOutputGroupOutput)"> |
|
||||
<TargetPath Condition="'$(AppxPriInitialPath)' != ''">$(AppxPriInitialPath)\%(ContentFilesProjectOutputGroupOutput.TargetPath)</TargetPath> |
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> |
|
||||
</_AllChildProjectItemsWithTargetPath> |
|
||||
</ItemGroup> |
|
||||
|
|
||||
<Message Importance="Low" Text="(Out) _ProcessedXamlFilesToCopyLocal == @(_ProcessedXamlFilesToCopyLocal)" /> |
|
||||
<Message Importance="Low" Text="(Out) _XamlFilesToCopyLocal == @(_XamlFilesToCopyLocal)" /> |
|
||||
</Target> |
|
||||
|
|
||||
<!-- |
|
||||
This builds the Bin Folder for DLL's that wish to have the SDK type layout |
|
||||
This needs to be imported after the Microsoft.Windows.UI.Xaml.Common.targets project as we are overriding it there due to a bug in the DestinationFiles using $(OutputPath) instead of $(OutDir) |
|
||||
--> |
|
||||
<Target Name="PrepareLibraryLayout" |
|
||||
Condition="'$(GenerateLibraryLayout)' == 'true'" |
|
||||
DependsOnTargets="GetPackagingOutputs" |
|
||||
BeforeTargets="CopyFilesToOutputDirectory"> |
|
||||
|
|
||||
<ItemGroup> |
|
||||
<_LayoutFile Include="@(PackagingOutputs)" Condition="'%(OutputGroup)' == 'ContentFilesProjectOutputGroup'" /> |
|
||||
<_LayoutFile Include="@(PackagingOutputs)" Condition="'%(OutputGroup)' == 'CustomOutputGroupForPackaging'" /> |
|
||||
</ItemGroup> |
|
||||
|
|
||||
<Copy SourceFiles="@(_LayoutFile)" |
|
||||
DestinationFiles="@(_LayoutFile->'$(OutDir)\%(TargetPath)')" |
|
||||
SkipUnchangedFiles="$(SkipCopyUnchangedFiles)" |
|
||||
OverwriteReadOnlyFiles="$(OverwriteReadOnlyFiles)" |
|
||||
Retries="$(CopyRetryCount)" |
|
||||
RetryDelayMilliseconds="$(CopyRetryDelayMilliseconds)" |
|
||||
UseHardlinksIfPossible="$(CreateHardLinksForCopyFilesToOutputDirectoryIfPossible)" /> |
|
||||
</Target> |
|
||||
|
|
||||
<Import Project="ImportAfter\*"/> |
|
||||
|
|
||||
</Project> |
|
||||
@ -1,52 +0,0 @@ |
|||||
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> |
|
||||
<ItemGroup Condition=" '$(IsCodeSharingProject)' != 'true' "> |
|
||||
<!-- SDK references --> |
|
||||
<PropertyPageSchema Include="$(MSBuildThisFileDirectory)$(LangName)\SDKReference.xaml"> |
|
||||
<Context>;BrowseObject</Context> |
|
||||
</PropertyPageSchema> |
|
||||
<PropertyPageSchema Include="$(MSBuildThisFileDirectory)$(LangName)\ResolvedSDKReference.xaml"> |
|
||||
<Context>ProjectCapabilitySubscriptionService;BrowseObject</Context> |
|
||||
</PropertyPageSchema> |
|
||||
<ProjectCapability Include="SDKReferences" /> |
|
||||
|
|
||||
<!-- WinRT references --> |
|
||||
<!-- No need for WinRTReference.xaml because we share an item type with AssemblyReference.xaml --> |
|
||||
<ProjectCapability Include="WinRTReferences" /> |
|
||||
</ItemGroup> |
|
||||
<ItemGroup> |
|
||||
<!-- Xaml item types --> |
|
||||
<PropertyPageSchema Include=" |
|
||||
$(MSBuildThisFileDirectory)$(LangName)\PRIResource.xaml; |
|
||||
$(MSBuildThisFileDirectory)$(LangName)\ApplicationDefinition.xaml; |
|
||||
$(MSBuildThisFileDirectory)$(LangName)\Page.xaml; |
|
||||
$(MSBuildThisFileDirectory)$(LangName)\AppxManifest.xaml; |
|
||||
$(MSBuildThisFileDirectory)$(LangName)\DesignData.xaml; |
|
||||
$(MSBuildThisFileDirectory)$(LangName)\DesignDataWithDesignTimeCreatableTypes.xaml; |
|
||||
"> |
|
||||
<Context>File;BrowseObject</Context> |
|
||||
</PropertyPageSchema> |
|
||||
|
|
||||
<PropertyPageSchema Include="$(MSBuildThisFileDirectory)$(LangName)\ProjectItemsSchema.xaml"/> |
|
||||
</ItemGroup> |
|
||||
|
|
||||
<ItemDefinitionGroup Condition=" '$(DefineExplicitDefaults)' == 'true' "> |
|
||||
<PRIResource> |
|
||||
<CopyToOutputDirectory>Never</CopyToOutputDirectory> |
|
||||
</PRIResource> |
|
||||
<AppxManifest> |
|
||||
<CopyToOutputDirectory>Never</CopyToOutputDirectory> |
|
||||
</AppxManifest> |
|
||||
<Page> |
|
||||
<CopyToOutputDirectory>Never</CopyToOutputDirectory> |
|
||||
</Page> |
|
||||
<ApplicationDefinition> |
|
||||
<CopyToOutputDirectory>Never</CopyToOutputDirectory> |
|
||||
</ApplicationDefinition> |
|
||||
<DesignData> |
|
||||
<CopyToOutputDirectory>Never</CopyToOutputDirectory> |
|
||||
</DesignData> |
|
||||
<DesignDataWithDesignTimeCreatableTypes> |
|
||||
<CopyToOutputDirectory>Never</CopyToOutputDirectory> |
|
||||
</DesignDataWithDesignTimeCreatableTypes> |
|
||||
</ItemDefinitionGroup> |
|
||||
</Project> |
|
||||
@ -1,73 +0,0 @@ |
|||||
<!-- |
|
||||
*********************************************************************************************** |
|
||||
Microsoft.Windows.UI.Xaml.VisualBasic.targets |
|
||||
|
|
||||
WARNING: DO NOT MODIFY this file unless you are knowledgeable about MSBuild and have |
|
||||
created a backup copy. Incorrect changes to this file will make it |
|
||||
impossible to load or build your projects from the command-line or the IDE. |
|
||||
|
|
||||
Copyright (C) Microsoft Corporation. All rights reserved. |
|
||||
*********************************************************************************************** |
|
||||
--> |
|
||||
|
|
||||
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> |
|
||||
|
|
||||
<PropertyGroup Condition=" '$(TargetPlatformIdentifier)' == 'WindowsPhoneApp' "> |
|
||||
<TargetPlatformVersion Condition="'$(TargetPlatformVersion)' == ''">8.1</TargetPlatformVersion> |
|
||||
<TargetFrameworkIdentifier Condition="'$(TargetFrameworkIdentifier)' == ''">WindowsPhoneApp</TargetFrameworkIdentifier> |
|
||||
<TargetFrameworkVersion Condition="'$(TargetFrameworkVersion)' == ''">v8.1</TargetFrameworkVersion> |
|
||||
</PropertyGroup> |
|
||||
|
|
||||
<PropertyGroup Condition=" '$(TargetPlatformIdentifier)' == 'windows' OR '$(TargetPlatformIdentifier)' == '' "> |
|
||||
<TargetPlatformVersion Condition="'$(TargetPlatformVersion)' == ''">8.2</TargetPlatformVersion> |
|
||||
<TargetFrameworkIdentifier Condition="'$(TargetFrameworkIdentifier)' == ''">.NETCore</TargetFrameworkIdentifier> |
|
||||
<TargetFrameworkVersion Condition="'$(TargetFrameworkVersion)' == ''">v4.5.1</TargetFrameworkVersion> |
|
||||
</PropertyGroup> |
|
||||
|
|
||||
<PropertyGroup Condition=" '$(TargetPlatformIdentifier)' == 'UAP'"> |
|
||||
<TargetFrameworkIdentifier Condition="'$(TargetFrameworkIdentifier)' == ''">.NETCore</TargetFrameworkIdentifier> |
|
||||
<TargetFrameworkVersion Condition="'$(TargetFrameworkVersion)' == ''">v5.0</TargetFrameworkVersion> |
|
||||
</PropertyGroup> |
|
||||
|
|
||||
<PropertyGroup Condition="'$(SDKIdentifier)' == '' and '$(TargetPlatformIdentifier)' == 'UAP'"> |
|
||||
<SDKIdentifier>Windows</SDKIdentifier> |
|
||||
<SDKVersion>10.0</SDKVersion> |
|
||||
</PropertyGroup> |
|
||||
|
|
||||
<PropertyGroup> |
|
||||
<UWPNugetRepo Condition="'$(UWPNugetRepo)' == ''">$([MSBuild]::GetRegistryValueFromView('HKEY_LOCAL_MACHINE\SOFTWARE\NuGet\Repository', 'UWPNugetPackages', null, RegistryView.Registry32, RegistryView.Default))</UWPNugetRepo> |
|
||||
<RestoreAdditionalProjectFallbackFolders>$(RestoreAdditionalProjectFallbackFolders);$(UWPNugetRepo)</RestoreAdditionalProjectFallbackFolders> |
|
||||
</PropertyGroup> |
|
||||
|
|
||||
<PropertyGroup> |
|
||||
<ImplicitlyExpandTargetPlatform Condition="'$(ImplicitlyExpandTargetPlatform)' == '' ">true</ImplicitlyExpandTargetPlatform> |
|
||||
<ImplicitlyExpandTargetFramework Condition="'$(ImplicitlyExpandTargetFramework)' == '' ">true</ImplicitlyExpandTargetFramework> |
|
||||
<NoStdLib Condition="'$(NoStdLib)' == ''">true</NoStdLib> |
|
||||
<UseVSHostingProcess>false</UseVSHostingProcess> |
|
||||
<WindowsAppContainer>true</WindowsAppContainer> |
|
||||
<AppxPackage Condition="'$(OutputType)' == 'AppContainerExe'">True</AppxPackage> |
|
||||
|
|
||||
<SuppressWarningsInPass1 Condition="'$(SuppressWarningsInPass1)' == '' ">true</SuppressWarningsInPass1> |
|
||||
<ExplicitResetWarningSuppression>true</ExplicitResetWarningSuppression> |
|
||||
|
|
||||
<MyType Condition="'$(MyType)' == ''">Empty</MyType> |
|
||||
</PropertyGroup> |
|
||||
|
|
||||
<Import Project="$(MSBuildBinPath)\Microsoft.VisualBasic.targets" /> |
|
||||
<Import Project="Microsoft.Windows.UI.Xaml.Common.targets" /> |
|
||||
<Import Project="Microsoft.Windows.UI.Xaml.Cps.targets" /> |
|
||||
|
|
||||
<ItemGroup> |
|
||||
<PropertyPageSchema Include="$(MSBuildThisFileDirectory)$(LangName)\VisualBasic.ProjectItemsSchema.xaml"/> |
|
||||
</ItemGroup> |
|
||||
|
|
||||
<Target |
|
||||
Name="_VBDesignTimePdbFile" |
|
||||
BeforeTargets="CoreCompile" |
|
||||
Condition="'$(BuildingInsideVisualStudio)' == 'true' and '$(BuildingProject)' == 'false'"> |
|
||||
<PropertyGroup> |
|
||||
<PdbFile>$(IntermediateOutputPath)$(TargetName).pdb</PdbFile> |
|
||||
</PropertyGroup> |
|
||||
</Target> |
|
||||
|
|
||||
</Project> |
|
||||
@ -1,38 +0,0 @@ |
|||||
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> |
|
||||
<PropertyGroup> |
|
||||
<IsCppProject>True</IsCppProject> |
|
||||
</PropertyGroup> |
|
||||
<Import Project="Microsoft.Windows.UI.Xaml.Common.targets"/> |
|
||||
<Import Project="$(RedirectionTarget)\Microsoft.Windows.UI.Xaml.Cpp.targets" Condition="Exists('$(RedirectionTarget)\Microsoft.Windows.UI.Xaml.Cpp.targets')" /> |
|
||||
|
|
||||
<PropertyGroup Condition="'$(DesignTimeBuild)' != 'true'"> |
|
||||
<MarkupCompilePass1DependsOn>$(MarkupCompilePass1DependsOn);_WriteXamlTlogs</MarkupCompilePass1DependsOn> |
|
||||
</PropertyGroup> |
|
||||
|
|
||||
<Target Name="_WriteXamlTlogs" |
|
||||
Condition="'@(SelectedFiles)' == ''"> |
|
||||
<ItemGroup Condition="'@(Page)' != ''"> |
|
||||
<_XamlReadTlog Include="^%(Page.FullPath)" |
|
||||
Condition="'%(Page.ExcludedFromBuild)' != 'true'"/> |
|
||||
</ItemGroup> |
|
||||
<ItemGroup Condition="'@(ApplicationDefinition)' != ''"> |
|
||||
<_XamlReadTlog Include="^%(ApplicationDefinition.FullPath)" |
|
||||
Condition="'%(ApplicationDefinition.ExcludedFromBuild)' != 'true'"/> |
|
||||
</ItemGroup> |
|
||||
|
|
||||
<WriteLinesToFile |
|
||||
Condition="'@(_XamlReadTlog)' != ''" |
|
||||
File="$(TLogLocation)Xaml.read.1u.tlog" |
|
||||
Lines="@(_XamlReadTlog->MetaData('Identity')->ToUpperInvariant());" |
|
||||
Overwrite="true" |
|
||||
Encoding="Unicode"/> |
|
||||
|
|
||||
<Delete Condition="'@(_XamlReadTlog)' == '' and Exists('$(TLogLocation)Xaml.read.1u.tlog')" |
|
||||
Files="$(TLogLocation)Xaml.read.1u.tlog" /> |
|
||||
|
|
||||
<ItemGroup> |
|
||||
<_XamlReadTlog Remove="@(_XamlReadTlog)" /> |
|
||||
</ItemGroup> |
|
||||
</Target> |
|
||||
|
|
||||
</Project> |
|
||||
@ -1,5 +0,0 @@ |
|||||
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> |
|
||||
<Import Project="Microsoft.Windows.UI.Xaml.Common.targets"/> |
|
||||
<Import Project="$(RedirectionTarget)\Microsoft.Windows.UI.Xaml.CSharp.targets" Condition="Exists('$(RedirectionTarget)\Microsoft.Windows.UI.Xaml.CSharp.targets')"/> |
|
||||
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" Condition="!Exists('$(RedirectionTarget)\Microsoft.Windows.UI.Xaml.CSharp.targets')"/> |
|
||||
</Project> |
|
||||
@ -1,49 +0,0 @@ |
|||||
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> |
|
||||
<PropertyGroup Condition="'$(TargetPlatformVersion)'==''"> |
|
||||
<TargetPlatformVersion>8.0</TargetPlatformVersion> |
|
||||
</PropertyGroup> |
|
||||
|
|
||||
<PropertyGroup Condition="'$(TargetPlatformIdentifier)' == 'UAP' And '$(TargetPlatformMinVersion)' != '' And '$(TargetPlatformMinVersion)' > '10.0.10587.0'"> |
|
||||
<RedirectionTarget>8.21</RedirectionTarget> |
|
||||
</PropertyGroup> |
|
||||
|
|
||||
<PropertyGroup Condition="'$(TargetPlatformIdentifier)' == 'UAP' And '$(RedirectionTarget)' == ''"> |
|
||||
<RedirectionTarget>8.2</RedirectionTarget> |
|
||||
</PropertyGroup> |
|
||||
|
|
||||
<PropertyGroup Condition="'$(RedirectionTarget)' == ''"> |
|
||||
<RedirectionTarget>$(TargetPlatformVersion)</RedirectionTarget> |
|
||||
</PropertyGroup> |
|
||||
|
|
||||
<!-- Direct 8.0 projects to 8.1 targets to enable retargeting --> |
|
||||
<PropertyGroup Condition="'$(RedirectionTarget)' == '8.0'"> |
|
||||
<RedirectionTarget>8.1</RedirectionTarget> |
|
||||
</PropertyGroup> |
|
||||
|
|
||||
<!-- UnitTest SDKs always match VS Versions --> |
|
||||
<PropertyGroup Condition="'$(TargetPlatformIdentifier)' == 'UAP' And '$(UnitTestPlatformVersion)' != ''"> |
|
||||
<UnitTestPlatformVersion>$(VisualStudioVersion)</UnitTestPlatformVersion> |
|
||||
</PropertyGroup> |
|
||||
|
|
||||
<!-- User Sets this property in csproj --> |
|
||||
<PropertyGroup Condition="'$(TargetPlatformIdentifier)' == 'UAP' And '$(UnitTestPlatformVersion)' == '17.0'"> |
|
||||
<!-- Needed to drop PDB's inside Appx --> |
|
||||
<AppxPackageIncludePrivateSymbols Condition="'$(AppxPackageIncludePrivateSymbols)' == ''">true</AppxPackageIncludePrivateSymbols> |
|
||||
</PropertyGroup> |
|
||||
|
|
||||
<PropertyGroup Condition="'$(UwpUnitTestSdkPkgVersion)' == ''"> |
|
||||
<UwpUnitTestSdkPkgVersion>16.11.0</UwpUnitTestSdkPkgVersion> |
|
||||
</PropertyGroup> |
|
||||
|
|
||||
<!-- Tpv2 needs following packages at runtime --> |
|
||||
<Choose> |
|
||||
<When Condition="'$(TargetPlatformIdentifier)' == 'UAP' And '$(UnitTestPlatformVersion)' == '17.0' And '$(RestoreProjectStyle)' == 'PackageReference' And '$(IsCppProject)' != 'True' "> |
|
||||
<ItemGroup> |
|
||||
<PackageReference Include="Microsoft.NET.Test.Sdk" IsImplicitlyDefined="true"> |
|
||||
<Version>$(UwpUnitTestSdkPkgVersion)</Version> |
|
||||
</PackageReference> |
|
||||
</ItemGroup> |
|
||||
</When> |
|
||||
</Choose> |
|
||||
|
|
||||
</Project> |
|
||||
@ -1,5 +0,0 @@ |
|||||
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> |
|
||||
<Import Project="Microsoft.Windows.UI.Xaml.Common.targets"/> |
|
||||
<Import Project="$(RedirectionTarget)\Microsoft.Windows.UI.Xaml.VisualBasic.targets" Condition="Exists('$(RedirectionTarget)\Microsoft.Windows.UI.Xaml.VisualBasic.targets')"/> |
|
||||
<Import Project="$(MSBuildBinPath)\Microsoft.VisualBasic.targets" Condition="!Exists('$(RedirectionTarget)\Microsoft.Windows.UI.Xaml.VisualBasic.targets')"/> |
|
||||
</Project> |
|
||||
@ -1,181 +0,0 @@ |
|||||
<!-- |
|
||||
*********************************************************************************************** |
|
||||
Microsoft.Web.Publishing.AllFilesInProjectFolder.targets |
|
||||
|
|
||||
WARNING: DO NOT MODIFY this file unless you are knowledgeable about MSBuild and have |
|
||||
created a backup copy. Incorrect changes to this file will make it |
|
||||
impossible to load or build your web deploy projects from the command-line or the IDE. |
|
||||
|
|
||||
This file defines the steps in the standard package/publish process for collecting all files in the project folder. |
|
||||
|
|
||||
Copyright (C) Microsoft Corporation. All rights reserved. |
|
||||
*********************************************************************************************** |
|
||||
--> |
|
||||
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> |
|
||||
<!--Import task from our dll--> |
|
||||
<UsingTask TaskName="CollectFilesinFolder" AssemblyFile="..\Microsoft.Web.Publishing.Tasks.dll"/> |
|
||||
<UsingTask TaskName="EscapeTextForRegularExpressions" AssemblyFile="..\Microsoft.Web.Publishing.Tasks.dll"/> |
|
||||
<UsingTask TaskName="FilterByItems" AssemblyFile="..\Microsoft.Web.Publishing.Tasks.dll"/> |
|
||||
<UsingTask TaskName="GetPublishingLocalizedString" AssemblyFile="..\Microsoft.Web.Publishing.Tasks.dll"/> |
|
||||
|
|
||||
<!--ImportBefore Extension--> |
|
||||
<PropertyGroup> |
|
||||
<ImportByWildcardBeforeMicrosoftWebPublishingAllFilesInProjectFolderTargets Condition="'$(ImportByWildcardBeforeMicrosoftWebPublishingAllFilesInProjectFolderTargets)'==''">true</ImportByWildcardBeforeMicrosoftWebPublishingAllFilesInProjectFolderTargets> |
|
||||
</PropertyGroup> |
|
||||
<Import Project="$(MSBuildThisFileDirectory)\$(MSBuildThisFileName)\ImportBefore\*" Condition="'$(ImportByWildcardBeforeMicrosoftWebPublishingAllFilesInProjectFolderTargets)' == 'true' and exists('$(MSBuildThisFileDirectory)\$(MSBuildThisFileName)\ImportBefore')"/> |
|
||||
|
|
||||
|
|
||||
<PropertyGroup> |
|
||||
<PublishPipelineCollectFilesCore> |
|
||||
$(PublishPipelineCollectFilesCore); |
|
||||
CollectFilesFromProjectFolder; |
|
||||
</PublishPipelineCollectFilesCore> |
|
||||
<_CollectFiles_IncludeIgnorableFile Condition="'$(_CollectFiles_IncludeIgnorableFile)'==''">False</_CollectFiles_IncludeIgnorableFile> |
|
||||
|
|
||||
<!--Overwrite the default behavior. Don't remove the web.debug.config --> |
|
||||
<ExcludeTransformAssistFilesFromPublish Condition="'$(ExcludeTransformAssistFilesFromPublish)'==''">False</ExcludeTransformAssistFilesFromPublish> |
|
||||
<CollectFilesFromProjectFolder_ExcludeSccFiles Condition="'$(CollectFilesFromProjectFolder_ExcludeSccFiles)'==''">True</CollectFilesFromProjectFolder_ExcludeSccFiles> |
|
||||
</PropertyGroup> |
|
||||
|
|
||||
<!--********************************************************************--> |
|
||||
<!-- Task SetExcludeFromProjectFolder --> |
|
||||
<!--********************************************************************--> |
|
||||
<PropertyGroup> |
|
||||
<SetExcludeFromProjectFolderDependsOn Condition="'$(SetExcludeFromProjectFolderDependsOn)'==''"> |
|
||||
</SetExcludeFromProjectFolderDependsOn> |
|
||||
</PropertyGroup> |
|
||||
|
|
||||
<Target Name="SetExcludeFromProjectFolder" |
|
||||
DependsOnTargets="$(SetExcludeFromProjectFolderDependsOn)"> |
|
||||
|
|
||||
<!--Get Localized string before display message--> |
|
||||
<GetPublishingLocalizedString |
|
||||
ID="PublishLocalizedString_DefaultExcludeIntermediateOutputFolderMessage" |
|
||||
LogType="Message" /> |
|
||||
|
|
||||
<GetPublishingLocalizedString |
|
||||
ID="PublishLocalizedString_DefaultExcludeFileExtentionOutMessage" |
|
||||
LogType="Message" /> |
|
||||
<GetPublishingLocalizedString |
|
||||
ID="PublishLocalizedString_DefaultExcludeSourceControlItems" |
|
||||
LogType="Message" /> |
|
||||
|
|
||||
<!--Maybe we need to introduce @(_ExcludeFromProjectFolder)--> |
|
||||
<ItemGroup> |
|
||||
|
|
||||
<!--Split item to _KnowProjectItems is to keep the metadata for item collection. |
|
||||
Please see http://msdn.microsoft.com/en-us/library/bb629388.aspx for known Project item collection.--> |
|
||||
<_KnownProjectItems Include="@(EmbeddedResource)" /> |
|
||||
<_KnownProjectItems Include="@(None)" /> |
|
||||
<_KnownProjectItems Include="@(Content)" /> |
|
||||
<_KnownProjectItems Include="@(Compile)" /> |
|
||||
|
|
||||
|
|
||||
<!--Explicit exclude all files under the obj folder --> |
|
||||
<_ProjectBaseIntermediateOutputPath Include="$(BaseIntermediateOutputPath)"/> |
|
||||
|
|
||||
</ItemGroup> |
|
||||
|
|
||||
<!--Create the rgulare expression to exclude all root folder *.out, all folder *.scc and all folder*.vspscc file--> |
|
||||
<!--Note split by semicolon (;)--> |
|
||||
<PropertyGroup> |
|
||||
<_ExcludeRelativePathFromProjectFolder>^[^\\]*\.out$</_ExcludeRelativePathFromProjectFolder> |
|
||||
</PropertyGroup> |
|
||||
|
|
||||
<!--Create the rgulare expression to exclude all Intermedidate output path.--> |
|
||||
<EscapeTextForRegularExpressions Text="@(_ProjectBaseIntermediateOutputPath->'%(FullPath)')"> |
|
||||
<Output TaskParameter="Result" PropertyName="_ExcludeFullPathFromProjectFolder" /> |
|
||||
</EscapeTextForRegularExpressions> |
|
||||
|
|
||||
</Target> |
|
||||
|
|
||||
|
|
||||
<!--********************************************************************--> |
|
||||
<!-- Task CollectFilesFromProjectFolder_ExcludeSccFiles --> |
|
||||
<!--********************************************************************--> |
|
||||
<PropertyGroup> |
|
||||
<CollectFilesFromProjectFolder_ExcludeSccFilesDependsOn> |
|
||||
$(OnBeforeCollectFilesFromProjectFolder_ExcludeSccFiles); |
|
||||
$(CollectFilesFromProjectFolder_ExcludeSccFilesDependsOn); |
|
||||
SetExcludeFromProjectFolder; |
|
||||
</CollectFilesFromProjectFolder_ExcludeSccFilesDependsOn> |
|
||||
</PropertyGroup> |
|
||||
<Target Name="CollectFilesFromProjectFolder_ExcludeSccFiles" |
|
||||
DependsOnTargets="$(CollectFilesFromProjectFolder_ExcludeSccFilesDependsOn)" |
|
||||
Condition="$(CollectFilesFromProjectFolder_ExcludeSccFiles)"> |
|
||||
<!--Note split by semicolon (;)--> |
|
||||
<PropertyGroup> |
|
||||
<_ExcludeRelativePathFromProjectFolder>$(_ExcludeRelativePathFromProjectFolder);[^\\]*\.scc$;[^\\]*\.vssscc$;[^\\]*\.vspscc$</_ExcludeRelativePathFromProjectFolder> |
|
||||
</PropertyGroup> |
|
||||
|
|
||||
<CallTarget Targets="$(OnAfterCollectFilesFromProjectFolder_ExcludeSccFiles)" RunEachTargetSeparately="false" /> |
|
||||
</Target> |
|
||||
|
|
||||
|
|
||||
|
|
||||
<!--********************************************************************--> |
|
||||
<!-- Task CollectFilesFromProjectFolder --> |
|
||||
<!--********************************************************************--> |
|
||||
<PropertyGroup> |
|
||||
<CollectFilesFromProjectFolderDependsOn> |
|
||||
$(OnBeforeCollectFilesFromProjectFolder); |
|
||||
$(CollectFilesFromProjectFolderDependsOn); |
|
||||
SetExcludeFromProjectFolder; |
|
||||
CollectFilesFromProjectFolder_ExcludeSccFiles; |
|
||||
</CollectFilesFromProjectFolderDependsOn> |
|
||||
</PropertyGroup> |
|
||||
<Target Name="CollectFilesFromProjectFolder" |
|
||||
DependsOnTargets="$(CollectFilesFromProjectFolderDependsOn)" > |
|
||||
|
|
||||
<!--Get Localized string before display message--> |
|
||||
<GetPublishingLocalizedString |
|
||||
ID="PublishLocalizedString_GatherAllFilesInProjectFolderExceptExclusion" |
|
||||
LogType="Message" /> |
|
||||
|
|
||||
<CollectFilesinFolder RootPath="$(WebPublishPipelineProjectDirectory)" |
|
||||
ExcludeFullPathMatchs="$(_ExcludeFullPathFromProjectFolder)" |
|
||||
ExcludeRelativePathMatchs="$(_ExcludeRelativePathFromProjectFolder)" |
|
||||
SkipHiddenItems="$(_SkipHiddenItems)"> |
|
||||
<Output TaskParameter="Result" ItemName="_AllFilesUnderProjectFolderNoMetadata" /> |
|
||||
</CollectFilesinFolder> |
|
||||
|
|
||||
|
|
||||
<!--The first two lines keeps the _KnowProjectItem's item metadata--> |
|
||||
<FilterByItems PipelineItems="@(_AllFilesUnderProjectFolderNoMetadata)" |
|
||||
Filter="@(_KnownProjectItems)"> |
|
||||
<Output TaskParameter="OutFilter" ItemName="_AllFilesUnderProjectFolderExceptKnownProjectItems"/> |
|
||||
</FilterByItems> |
|
||||
|
|
||||
<ItemGroup> |
|
||||
<!--Readd _KnowProjectItem's to keep item metadata. First for non-Link file --> |
|
||||
<FilesForPackagingFromProject Include="@(_KnownProjectItems)" Condition="'%(_KnownProjectItems.Link)'==''"> |
|
||||
<DestinationRelativePath>%(_KnownProjectItems.Identity)</DestinationRelativePath> |
|
||||
<FromTarget>CollectFilesFromProjectFolder.KonwnProjectItems</FromTarget> |
|
||||
<Category>AllFilesInProjectFolder</Category> |
|
||||
</FilesForPackagingFromProject> |
|
||||
<FilesForPackagingFromProject Include="@(_KnownProjectItems)" Condition="'%(_KnownProjectItems.Link)'!='' And $(EnableCollectLinkFilesInProject)"> |
|
||||
<DestinationRelativePath>%(_KnownProjectItems.Link)</DestinationRelativePath> |
|
||||
<FromTarget>CollectFilesFromProjectFolder.KonwnProjectItems</FromTarget> |
|
||||
<Category>AllFilesInProjectFolder</Category> |
|
||||
<Exclude>$(ExcludeLinkFilesInProject)</Exclude> |
|
||||
<ProjectFileType>Link</ProjectFileType> |
|
||||
</FilesForPackagingFromProject> |
|
||||
|
|
||||
<FilesForPackagingFromProject Include="@(_AllFilesUnderProjectFolderExceptKnownProjectItems)" > |
|
||||
<DestinationRelativePath>%(_AllFilesUnderProjectFolderExceptKnownProjectItems.Identity)</DestinationRelativePath> |
|
||||
<FromTarget>CollectFilesFromProjectFolder.ExceptKonwnProjectItems</FromTarget> |
|
||||
<Category>AllFilesInProjectFolder</Category> |
|
||||
</FilesForPackagingFromProject> |
|
||||
|
|
||||
</ItemGroup> |
|
||||
<CallTarget Targets="$(OnAfterCollectFilesFromProjectFolder)" RunEachTargetSeparately="false" /> |
|
||||
</Target> |
|
||||
|
|
||||
<!--ImportAfter Extension--> |
|
||||
<PropertyGroup> |
|
||||
<ImportByWildcardAfterMicrosoftWebPublishingAllFilesInProjectFolderTargets Condition="'$(ImportByWildcardAfterMicrosoftWebPublishingAllFilesInProjectFolderTargets)'==''">true</ImportByWildcardAfterMicrosoftWebPublishingAllFilesInProjectFolderTargets> |
|
||||
</PropertyGroup> |
|
||||
<Import Project="$(MSBuildThisFileDirectory)\$(MSBuildThisFileName)\ImportAfter\*" Condition="'$(ImportByWildcardAfterMicrosoftWebPublishingAllFilesInProjectFolderTargets)' == 'true' and exists('$(MSBuildThisFileDirectory)\$(MSBuildThisFileName)\ImportAfter')"/> |
|
||||
|
|
||||
</Project> |
|
||||
|
|
||||
@ -1,242 +0,0 @@ |
|||||
<!-- |
|
||||
*********************************************************************************************** |
|
||||
Microsoft.Web.Publishing.AllFilesInTheProject.targets |
|
||||
|
|
||||
WARNING: DO NOT MODIFY this file unless you are knowledgeable about MSBuild and have |
|
||||
created a backup copy. Incorrect changes to this file will make it |
|
||||
impossible to load or build your web deploy projects from the command-line or the IDE. |
|
||||
|
|
||||
This file defines the steps in the standard package/publish process for collecting only project files . |
|
||||
|
|
||||
Copyright (C) Microsoft Corporation. All rights reserved. |
|
||||
*********************************************************************************************** |
|
||||
--> |
|
||||
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> |
|
||||
<!--ImportBefore Extension--> |
|
||||
<PropertyGroup> |
|
||||
<ImportByWildcardBeforeMicrosoftWebPublishingAllFilesInTheProjectTargets Condition="'$(ImportByWildcardBeforeMicrosoftWebPublishingAllFilesInTheProjectTargets)'==''">true</ImportByWildcardBeforeMicrosoftWebPublishingAllFilesInTheProjectTargets> |
|
||||
</PropertyGroup> |
|
||||
<Import Project="$(MSBuildThisFileDirectory)\$(MSBuildThisFileName)\ImportBefore\*" Condition="'$(ImportByWildcardBeforeMicrosoftWebPublishingAllFilesInTheProjectTargets)' == 'true' and exists('$(MSBuildThisFileDirectory)\$(MSBuildThisFileName)\ImportBefore')"/> |
|
||||
|
|
||||
<!--The following property need to set before import of Microsoft.Web.Publishing.OnlyFilesToRunTheApp.targets or it will set the property first--> |
|
||||
<PropertyGroup> |
|
||||
<!--Overwrite the default behavior. Don't remove the web.debug.config --> |
|
||||
<ExcludeTransformAssistFilesFromPublish Condition="'$(ExcludeTransformAssistFilesFromPublish)'==''">False</ExcludeTransformAssistFilesFromPublish> |
|
||||
</PropertyGroup> |
|
||||
|
|
||||
<!--We need all of the item in the minimum run web needed--> |
|
||||
<Import Project="Microsoft.Web.Publishing.OnlyFilesToRunTheApp.targets"/> |
|
||||
|
|
||||
<PropertyGroup> |
|
||||
<PublishPipelineCollectFilesCore> |
|
||||
$(PublishPipelineCollectFilesCore); |
|
||||
CollectFilesFromCompile; |
|
||||
CollectFilesFromEmbeddedResource; |
|
||||
CollectFilesFromNone; |
|
||||
CollectFilesFromBaseApplicationManifest; |
|
||||
CollectFilesFromProjectFile; |
|
||||
</PublishPipelineCollectFilesCore> |
|
||||
</PropertyGroup> |
|
||||
|
|
||||
<!--MSBuild target does not have a good way to identify all item in the project yet. |
|
||||
MSBuild team is working on this. At the same time, we are working backward from only known common item collection from |
|
||||
The following is base on http://msdn.microsoft.com/en-us/library/bb629388.aspx for common project item. |
|
||||
Note that Content Collection is already in the Microsoft.Web.Publishing.OnlyFilesToRunTheApp.targets--> |
|
||||
|
|
||||
<!--********************************************************************--> |
|
||||
<!-- Task CollectFilesFromCompile --> |
|
||||
<!--********************************************************************--> |
|
||||
<PropertyGroup> |
|
||||
<CollectFilesFromCompileDependsOn> |
|
||||
$(OnBeforeCollectFilesFromCompile); |
|
||||
$(CollectFilesFromCompileDependsOn); |
|
||||
</CollectFilesFromCompileDependsOn> |
|
||||
</PropertyGroup> |
|
||||
<Target Name="CollectFilesFromCompile" |
|
||||
DependsOnTargets="$(CollectFilesFromCompileDependsOn)" |
|
||||
Condition="'@(Compile)'!=''"> |
|
||||
|
|
||||
|
|
||||
<!--Get Localized string before display message--> |
|
||||
<GetPublishingLocalizedString |
|
||||
ID="PublishLocalizedString_GatherSpecificItemsFromProject" |
|
||||
ArgumentCount="1" |
|
||||
Arguments="Compile" |
|
||||
LogType="Message" /> |
|
||||
<Message Text="@(Compile)" /> |
|
||||
|
|
||||
<ItemGroup> |
|
||||
<FilesForPackagingFromProject Include="@(Compile)" Condition="'%(Compile.Link)'==''"> |
|
||||
<DestinationRelativePath>%(Compile.Identity)</DestinationRelativePath> |
|
||||
<FromTarget>CollectFilesFromCompile</FromTarget> |
|
||||
<Category>ProjectNotRunRequired</Category> |
|
||||
</FilesForPackagingFromProject> |
|
||||
<FilesForPackagingFromProject Include="@(Compile)" Condition="'%(Compile.Link)'!='' And $(EnableCollectLinkFilesInProject)"> |
|
||||
<DestinationRelativePath>%(Compile.Link)</DestinationRelativePath> |
|
||||
<FromTarget>CollectFilesFromCompile</FromTarget> |
|
||||
<Category>ProjectNotRunRequired</Category> |
|
||||
<Exclude>$(ExcludeLinkFilesInProject)</Exclude> |
|
||||
<ProjectFileType>Link</ProjectFileType> |
|
||||
</FilesForPackagingFromProject> |
|
||||
</ItemGroup> |
|
||||
<CallTarget Targets="$(OnAfterCollectFilesFromCompile)" RunEachTargetSeparately="false" /> |
|
||||
</Target> |
|
||||
|
|
||||
<!--********************************************************************--> |
|
||||
<!-- Task CollectFilesFromEmbeddedResource --> |
|
||||
<!--********************************************************************--> |
|
||||
<PropertyGroup> |
|
||||
<CollectFilesFromEmbeddedResourceDependsOn> |
|
||||
$(OnBeforeCollectFilesFromEmbeddedResource); |
|
||||
$(CollectFilesFromEmbeddedResourceDependsOn); |
|
||||
</CollectFilesFromEmbeddedResourceDependsOn> |
|
||||
</PropertyGroup> |
|
||||
<Target Name="CollectFilesFromEmbeddedResource" |
|
||||
DependsOnTargets="$(CollectFilesFromEmbeddedResourceDependsOn)" |
|
||||
Condition="'@(EmbeddedResource)'!=''"> |
|
||||
|
|
||||
<!--Get Localized string before display message--> |
|
||||
<GetPublishingLocalizedString |
|
||||
ID="PublishLocalizedString_GatherSpecificItemsFromProject" |
|
||||
ArgumentCount="1" |
|
||||
Arguments="EmbeddedResource" |
|
||||
LogType="Message" /> |
|
||||
<Message Text="@(EmbeddedResource)" /> |
|
||||
|
|
||||
<ItemGroup> |
|
||||
<FilesForPackagingFromProject Include="@(EmbeddedResource)" Condition="'%(EmbeddedResource.Link)'==''"> |
|
||||
<DestinationRelativePath>%(EmbeddedResource.Identity)</DestinationRelativePath> |
|
||||
<FromTarget>CollectFilesFromEmbeddedResource</FromTarget> |
|
||||
<Category>ProjectNotRunRequired</Category> |
|
||||
</FilesForPackagingFromProject> |
|
||||
<FilesForPackagingFromProject Include="@(EmbeddedResource)" Condition="'%(EmbeddedResource.Link)'!='' And $(EnableCollectLinkFilesInProject)"> |
|
||||
<DestinationRelativePath>%(EmbeddedResource.Link)</DestinationRelativePath> |
|
||||
<FromTarget>CollectFilesFromEmbeddedResource</FromTarget> |
|
||||
<Category>ProjectNotRunRequired</Category> |
|
||||
<Exclude>$(ExcludeLinkFilesInProject)</Exclude> |
|
||||
<ProjectFileType>Link</ProjectFileType> |
|
||||
</FilesForPackagingFromProject> |
|
||||
</ItemGroup> |
|
||||
<CallTarget Targets="$(OnAfterCollectFilesFromEmbeddedResource)" RunEachTargetSeparately="false" /> |
|
||||
</Target> |
|
||||
|
|
||||
<!--********************************************************************--> |
|
||||
<!-- Task CollectFilesFromNone --> |
|
||||
<!--********************************************************************--> |
|
||||
<PropertyGroup> |
|
||||
<CollectFilesFromNoneDependsOn> |
|
||||
$(OnBeforeCollectFilesFromNone); |
|
||||
$(CollectFilesFromNoneDependsOn); |
|
||||
</CollectFilesFromNoneDependsOn> |
|
||||
</PropertyGroup> |
|
||||
<Target Name="CollectFilesFromNone" |
|
||||
DependsOnTargets="$(CollectFilesFromNoneDependsOn)" |
|
||||
Condition="'@(None)'!=''"> |
|
||||
|
|
||||
<GetPublishingLocalizedString |
|
||||
ID="PublishLocalizedString_GatherSpecificItemsFromProject" |
|
||||
ArgumentCount="1" |
|
||||
Arguments="None" |
|
||||
LogType="Message" /> |
|
||||
<Message Text="@(None)" /> |
|
||||
|
|
||||
<ItemGroup> |
|
||||
<FilesForPackagingFromProject Include="@(None)" Condition="'%(None.Link)'==''"> |
|
||||
<DestinationRelativePath>%(None.Identity)</DestinationRelativePath> |
|
||||
<FromTarget>CollectFilesFromNone</FromTarget> |
|
||||
<Category>ProjectNotRunRequired</Category> |
|
||||
</FilesForPackagingFromProject> |
|
||||
<FilesForPackagingFromProject Include="@(None)" Condition="'%(None.Link)'!='' And $(EnableCollectLinkFilesInProject)" > |
|
||||
<DestinationRelativePath>%(None.Link)</DestinationRelativePath> |
|
||||
<FromTarget>CollectFilesFromNone</FromTarget> |
|
||||
<Category>ProjectNotRunRequired</Category> |
|
||||
<Exclude>$(ExcludeLinkFilesInProject)</Exclude> |
|
||||
<ProjectFileType>Link</ProjectFileType> |
|
||||
</FilesForPackagingFromProject> |
|
||||
</ItemGroup> |
|
||||
<CallTarget Targets="$(OnAfterCollectFilesFromNone)" RunEachTargetSeparately="false" /> |
|
||||
</Target> |
|
||||
|
|
||||
|
|
||||
<!--********************************************************************--> |
|
||||
<!-- Task CollectFilesFromBaseApplicationManifest --> |
|
||||
<!--********************************************************************--> |
|
||||
<PropertyGroup> |
|
||||
<CollectFilesFromBaseApplicationManifestDependsOn> |
|
||||
$(OnBeforeCollectFilesFromBaseApplicationManifest); |
|
||||
$(CollectFilesFromBaseApplicationManifestDependsOn); |
|
||||
</CollectFilesFromBaseApplicationManifestDependsOn> |
|
||||
</PropertyGroup> |
|
||||
<Target Name="CollectFilesFromBaseApplicationManifest" |
|
||||
DependsOnTargets="$(CollectFilesFromBaseApplicationManifestDependsOn)" |
|
||||
Condition="'@(BaseApplicationManifest)'!=''"> |
|
||||
|
|
||||
|
|
||||
<!--Get Localized string before display message--> |
|
||||
<GetPublishingLocalizedString |
|
||||
ID="PublishLocalizedString_GatherSpecificItemsFromProject" |
|
||||
ArgumentCount="1" |
|
||||
Arguments="BaseApplicationManifest" |
|
||||
LogType="Message" /> |
|
||||
<Message Text="@(BaseApplicationManifest)" /> |
|
||||
|
|
||||
<ItemGroup> |
|
||||
<FilesForPackagingFromProject Include="@(BaseApplicationManifest)" Condition="'%(BaseApplicationManifest.Link)'==''"> |
|
||||
<DestinationRelativePath>%(BaseApplicationManifest.Identity)</DestinationRelativePath> |
|
||||
<FromTarget>CollectFilesFromBaseApplicationManifest</FromTarget> |
|
||||
<Category>ProjectNotRunRequired</Category> |
|
||||
</FilesForPackagingFromProject> |
|
||||
<FilesForPackagingFromProject Include="@(BaseApplicationManifest)" Condition="'%(BaseApplicationManifest.Link)'!='' And $(EnableCollectLinkFilesInProject)"> |
|
||||
<DestinationRelativePath>%(BaseApplicationManifest.Link)</DestinationRelativePath> |
|
||||
<FromTarget>CollectFilesFromBaseApplicationManifest</FromTarget> |
|
||||
<Category>ProjectNotRunRequired</Category> |
|
||||
<Exclude>$(ExcludeLinkFilesInProject)</Exclude> |
|
||||
<ProjectFileType>Link</ProjectFileType> |
|
||||
</FilesForPackagingFromProject> |
|
||||
</ItemGroup> |
|
||||
<CallTarget Targets="$(OnAfterCollectFilesFromBaseApplicationManifest)" RunEachTargetSeparately="false" /> |
|
||||
</Target> |
|
||||
|
|
||||
|
|
||||
<!--********************************************************************--> |
|
||||
<!-- Task CollectFilesFromProjectFile --> |
|
||||
<!--********************************************************************--> |
|
||||
<PropertyGroup> |
|
||||
<CollectFilesFromProjectFileDependsOn> |
|
||||
$(OnBeforeCollectFilesFromProjectFile); |
|
||||
$(CollectFilesFromProjectFileDependsOn); |
|
||||
</CollectFilesFromProjectFileDependsOn> |
|
||||
</PropertyGroup> |
|
||||
<Target Name="CollectFilesFromProjectFile" |
|
||||
DependsOnTargets="$(CollectFilesFromProjectFileDependsOn)"> |
|
||||
|
|
||||
<!--Get Localized string before display message--> |
|
||||
<GetPublishingLocalizedString |
|
||||
ID="PublishLocalizedString_GatherSpecificItemsFromProject" |
|
||||
ArgumentCount="1" |
|
||||
Arguments="ProjectFiles" |
|
||||
LogType="Message" /> |
|
||||
<Message Text="$(MSBuildProjectFile);$(MSBuildProjectFile).user" /> |
|
||||
|
|
||||
<ItemGroup> |
|
||||
<FilesForPackagingFromProject Include="$(MSBuildProjectFile)"> |
|
||||
<DestinationRelativePath>$(MSBuildProjectFile)</DestinationRelativePath> |
|
||||
<FromTarget>CollectFilesFromProjectFile</FromTarget> |
|
||||
<Category>ProjectNotRunRequired</Category> |
|
||||
</FilesForPackagingFromProject> |
|
||||
<FilesForPackagingFromProject Include="$(MSBuildProjectFile).user" Condition="Exists('$(MSBuildProjectFile).user')"> |
|
||||
<DestinationRelativePath>$(MSBuildProjectFile).user</DestinationRelativePath> |
|
||||
<FromTarget>CollectFilesFromProjectFile</FromTarget> |
|
||||
<Category>ProjectNotRunRequired</Category> |
|
||||
</FilesForPackagingFromProject> |
|
||||
</ItemGroup> |
|
||||
<CallTarget Targets="$(OnAfterCollectFilesFromProjectFile)" RunEachTargetSeparately="false" /> |
|
||||
</Target> |
|
||||
|
|
||||
<!--ImportAfter Extension--> |
|
||||
<PropertyGroup> |
|
||||
<ImportByWildcardAfterMicrosoftWebPublishingAllFilesInTheProjectTargets Condition="'$(ImportByWildcardAfterMicrosoftWebPublishingAllFilesInTheProjectTargets)'==''">true</ImportByWildcardAfterMicrosoftWebPublishingAllFilesInTheProjectTargets> |
|
||||
</PropertyGroup> |
|
||||
<Import Project="$(MSBuildThisFileDirectory)\$(MSBuildThisFileName)\ImportAfter\*" Condition="'$(ImportByWildcardAfterMicrosoftWebPublishingAllFilesInTheProjectTargets)' == 'true' and exists('$(MSBuildThisFileDirectory)\$(MSBuildThisFileName)\ImportAfter')"/> |
|
||||
|
|
||||
</Project> |
|
||||
@ -1,445 +0,0 @@ |
|||||
<!-- |
|
||||
*********************************************************************************************** |
|
||||
Microsoft.Web.Publishing.OnlyFilesToRunTheApp.targets |
|
||||
|
|
||||
WARNING: DO NOT MODIFY this file unless you are knowledgeable about MSBuild and have |
|
||||
created a backup copy. Incorrect changes to this file will make it |
|
||||
impossible to load or build your web deploy projects from the command-line or the IDE. |
|
||||
|
|
||||
This file defines the steps in the standard package/publish process for collecting only files to run the web appliation. |
|
||||
|
|
||||
Copyright (C) Microsoft Corporation. All rights reserved. |
|
||||
*********************************************************************************************** |
|
||||
--> |
|
||||
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> |
|
||||
<!--Import task from our dll--> |
|
||||
<UsingTask TaskName="GetPublishingLocalizedString" AssemblyFile="..\Microsoft.Web.Publishing.Tasks.dll"/> |
|
||||
<UsingTask TaskName="FilterByItems" AssemblyFile="..\Microsoft.Web.Publishing.Tasks.dll"/> |
|
||||
|
|
||||
<!--ImportBefore Extension--> |
|
||||
<PropertyGroup> |
|
||||
<ImportByWildcardBeforeMicrosoftWebPublishingOnlyFilesToRunTheAppTargets Condition="'$(ImportByWildcardBeforeMicrosoftWebPublishingOnlyFilesToRunTheAppTargets)'==''">true</ImportByWildcardBeforeMicrosoftWebPublishingOnlyFilesToRunTheAppTargets> |
|
||||
</PropertyGroup> |
|
||||
<Import Project="$(MSBuildThisFileDirectory)\$(MSBuildThisFileName)\ImportBefore\*" Condition="'$(ImportByWildcardBeforeMicrosoftWebPublishingOnlyFilesToRunTheAppTargets)' == 'true' and exists('$(MSBuildThisFileDirectory)\$(MSBuildThisFileName)\ImportBefore')"/> |
|
||||
|
|
||||
<PropertyGroup> |
|
||||
<PublishPipelineCollectFilesCore> |
|
||||
$(PublishPipelineCollectFilesCore); |
|
||||
CollectFilesFromIntermediateAssembly; |
|
||||
CollectFilesFromContent; |
|
||||
CollectFilesFromAddModules; |
|
||||
CollectFilesFrom_SGenDllCreated; |
|
||||
CollectFilesFromIntermediateSatelliteAssembliesWithTargetPath; |
|
||||
CollectFilesFromReference; |
|
||||
CollectFilesFromAllExtraReferenceFiles; |
|
||||
CollectFilesFrom_SourceItemsToCopyToOutputDirectory; |
|
||||
CollectFilesFromDocFileItem; |
|
||||
CollectFilesFrom_WebApplicationSilverlightXapFiles; |
|
||||
CollectFilesFrom_binDeployableAssemblies; |
|
||||
</PublishPipelineCollectFilesCore> |
|
||||
<ExcludeTransformAssistFilesFromPublish Condition="'$(ExcludeTransformAssistFilesFromPublish)'==''">True</ExcludeTransformAssistFilesFromPublish> |
|
||||
</PropertyGroup> |
|
||||
|
|
||||
<!--***************************************************************--> |
|
||||
<!-- Task CollectFilesFromIntermediateAssembly --> |
|
||||
<!-- Note $(OutDir) can be not in the bin like in Team build system --> |
|
||||
<!--***************************************************************--> |
|
||||
<PropertyGroup> |
|
||||
<CollectFilesFromIntermediateAssemblyDependsOn> |
|
||||
$(OnBeforeCollectFilesFromIntermediateAssembly); |
|
||||
$(CollectFilesFromIntermediateAssemblyDependsOn); |
|
||||
</CollectFilesFromIntermediateAssemblyDependsOn> |
|
||||
</PropertyGroup> |
|
||||
|
|
||||
<Target Name="CollectFilesFromIntermediateAssembly" |
|
||||
DependsOnTargets="$(CollectFilesFromIntermediateAssemblyDependsOn)" |
|
||||
Condition="'@(IntermediateAssembly)'!=''"> |
|
||||
|
|
||||
<!--Get Localized string before display message--> |
|
||||
<GetPublishingLocalizedString |
|
||||
ID="PublishLocalizedString_GatherSpecificItemsFromProject" |
|
||||
ArgumentCount="1" |
|
||||
Arguments="IntermediateAssembly" |
|
||||
LogType="Message" /> |
|
||||
<Message Text="@(IntermediateAssembly->'$(OutDir)%(FileName)%(Extension) to bin\%(FileName)%(Extension)')" /> |
|
||||
|
|
||||
<ItemGroup> |
|
||||
<FilesForPackagingFromProject |
|
||||
Include="@(IntermediateAssembly->'$(OutDir)%(FileName)%(Extension)')"> |
|
||||
<DestinationRelativePath>bin\%(FileName)%(Extension)</DestinationRelativePath> |
|
||||
<FromTarget>CollectFilesFromIntermediateAssembly</FromTarget> |
|
||||
<Category>Run</Category> |
|
||||
</FilesForPackagingFromProject> |
|
||||
</ItemGroup> |
|
||||
<Message Text="@(IntermediateAssembly->'$(OutDir)%(FileName).pdb to bin\%(FileName).pdb')" |
|
||||
Condition="$(_DebugSymbolsProduced) AND !$(ExcludeGeneratedDebugSymbol) AND Exists(@(IntermediateAssembly->'$(OutDir)%(FileName).pdb')) "/> |
|
||||
<ItemGroup Condition="$(_DebugSymbolsProduced) AND !$(ExcludeGeneratedDebugSymbol) AND Exists(@(IntermediateAssembly->'$(OutDir)%(FileName).pdb'))"> |
|
||||
<FilesForPackagingFromProject |
|
||||
Include="@(IntermediateAssembly->'$(OutDir)%(FileName).pdb')" |
|
||||
Condition="Exists(@(IntermediateAssembly->'$(OutDir)%(FileName).pdb'))"> |
|
||||
<DestinationRelativePath>bin\%(FileName).pdb</DestinationRelativePath> |
|
||||
<FromTarget>CollectFilesFromIntermediateAssembly</FromTarget> |
|
||||
<Category>Debug</Category> |
|
||||
</FilesForPackagingFromProject> |
|
||||
</ItemGroup> |
|
||||
|
|
||||
<CallTarget Targets="$(OnAfterCollectFilesFromIntermediateAssembly)" RunEachTargetSeparately="false" /> |
|
||||
</Target> |
|
||||
|
|
||||
<!--********************************************************************--> |
|
||||
<!-- Task CollectFilesFromContent --> |
|
||||
<!--********************************************************************--> |
|
||||
<PropertyGroup> |
|
||||
<CollectFilesFromContentDependsOn> |
|
||||
$(OnBeforeCollectFilesFromContent); |
|
||||
$(CollectFilesFromContentDependsOn); |
|
||||
</CollectFilesFromContentDependsOn> |
|
||||
</PropertyGroup> |
|
||||
<Target Name="CollectFilesFromContent" |
|
||||
DependsOnTargets="$(CollectFilesFromContentDependsOn)" |
|
||||
Condition="'@(Content)'!=''"> |
|
||||
<!--Get Localized string before display message--> |
|
||||
<GetPublishingLocalizedString |
|
||||
ID="PublishLocalizedString_GatherSpecificItemsFromProject" |
|
||||
ArgumentCount="1" |
|
||||
Arguments="Content" |
|
||||
LogType="Message" /> |
|
||||
<Message Text="@(Content)" /> |
|
||||
|
|
||||
<ItemGroup> |
|
||||
<FilesForPackagingFromProject Include="@(Content)" Condition="'%(Content.Link)'==''"> |
|
||||
<DestinationRelativePath>%(Content.Identity)</DestinationRelativePath> |
|
||||
<FromTarget>CollectFilesFromContent</FromTarget> |
|
||||
<Category>Run</Category> |
|
||||
</FilesForPackagingFromProject> |
|
||||
<FilesForPackagingFromProject Include="@(Content)" Condition="'%(Content.Link)'!='' And $(EnableCollectLinkFilesInProject)"> |
|
||||
<DestinationRelativePath>%(Content.Link)</DestinationRelativePath> |
|
||||
<FromTarget>CollectFilesFromContent</FromTarget> |
|
||||
<Category>Run</Category> |
|
||||
<Exclude>$(ExcludeLinkFilesInProject)</Exclude> |
|
||||
<ProjectFileType>Link</ProjectFileType> |
|
||||
</FilesForPackagingFromProject> |
|
||||
</ItemGroup> |
|
||||
<CallTarget Targets="$(OnAfterCollectFilesFromContent)" RunEachTargetSeparately="false" /> |
|
||||
</Target> |
|
||||
|
|
||||
|
|
||||
<!--********************************************************************--> |
|
||||
<!-- Task CollectFilesFromAddModules --> |
|
||||
<!--********************************************************************--> |
|
||||
<PropertyGroup> |
|
||||
<CollectFilesFromAddModulesDependsOn> |
|
||||
$(OnBeforeCollectFilesFromAddModulesDependsOn); |
|
||||
$(CollectFilesFromAddModulesDependsOn); |
|
||||
</CollectFilesFromAddModulesDependsOn> |
|
||||
</PropertyGroup> |
|
||||
<Target Name="CollectFilesFromAddModules" |
|
||||
DependsOnTargets="$(CollectFilesFromAddModulesDependsOn)" |
|
||||
Condition="'@(AddModules)'!=''"> |
|
||||
|
|
||||
<!--Get Localized string before display message--> |
|
||||
<GetPublishingLocalizedString |
|
||||
ID="PublishLocalizedString_GatherSpecificOutputsFromProject" |
|
||||
ArgumentCount="1" |
|
||||
Arguments="AddModules" |
|
||||
LogType="Message" /> |
|
||||
<Message Text="@(AddModules->'$(OutDir)%(FileName)%(Extension) to bin\%(FileName)%(Extension)')"/> |
|
||||
<ItemGroup> |
|
||||
<FilesForPackagingFromProject Include="@(AddModules->'$(OutDir)%(FileName)%(Extension)')"> |
|
||||
<DestinationRelativePath>bin\%(FileName)%(Extension)</DestinationRelativePath> |
|
||||
<FromTarget>CollectFilesFromAddModules</FromTarget> |
|
||||
<Category>Run</Category> |
|
||||
</FilesForPackagingFromProject> |
|
||||
</ItemGroup> |
|
||||
<CallTarget Targets="$(OnAfterCollectFilesFromAddModulesDependsOn)" RunEachTargetSeparately="false" /> |
|
||||
</Target> |
|
||||
|
|
||||
<!--********************************************************************--> |
|
||||
<!-- Task CollectFilesFrom_SGenDllCreated --> |
|
||||
<!--********************************************************************--> |
|
||||
<PropertyGroup> |
|
||||
<CollectFilesFrom_SGenDllCreatedDependsOn> |
|
||||
$(OnBeforeCollectFilesFrom_SGenDllCreated); |
|
||||
$(CollectFilesFrom_SGenDllCreatedDependsOn); |
|
||||
</CollectFilesFrom_SGenDllCreatedDependsOn> |
|
||||
</PropertyGroup> |
|
||||
<Target Name="CollectFilesFrom_SGenDllCreated" |
|
||||
DependsOnTargets="$(CollectFilesFrom_SGenDllCreatedDependsOn)" |
|
||||
Condition="$(_SGenDllCreated)"> |
|
||||
<!--Get Localized string before display message--> |
|
||||
<GetPublishingLocalizedString |
|
||||
ID="PublishLocalizedString_GatherSpecificOutputsFromProject" |
|
||||
ArgumentCount="1" |
|
||||
Arguments="_SGenDllName" |
|
||||
LogType="Message" /> |
|
||||
<Message Text="bin\$(_SGenDllName)" /> |
|
||||
|
|
||||
<ItemGroup> |
|
||||
<FilesForPackagingFromProject Include="$(OutDir)$(_SGenDllName)"> |
|
||||
<DestinationRelativePath>bin\$(_SGenDllName)</DestinationRelativePath> |
|
||||
<FromTarget>CollectFilesFrom_SGenDllCreated</FromTarget> |
|
||||
<Category>Run</Category> |
|
||||
</FilesForPackagingFromProject> |
|
||||
</ItemGroup> |
|
||||
<CallTarget Targets="$(OnAfterCollectFilesFrom_SGenDllCreated)" RunEachTargetSeparately="false" /> |
|
||||
</Target> |
|
||||
|
|
||||
<!--********************************************************************--> |
|
||||
<!-- Task CollectFilesFromIntermediateSatelliteAssembliesWithTargetPath --> |
|
||||
<!--********************************************************************--> |
|
||||
<PropertyGroup> |
|
||||
<CollectFilesFromIntermediateSatelliteAssembliesWithTargetPathDependsOn> |
|
||||
$(OnBeforeCollectFilesFromIntermediateSatelliteAssembliesWithTargetPath); |
|
||||
$(CollectFilesFromIntermediateSatelliteAssembliesWithTargetPathDependsOn); |
|
||||
</CollectFilesFromIntermediateSatelliteAssembliesWithTargetPathDependsOn> |
|
||||
</PropertyGroup> |
|
||||
<Target Name="CollectFilesFromIntermediateSatelliteAssembliesWithTargetPath" |
|
||||
DependsOnTargets="$(CollectFilesFromIntermediateSatelliteAssembliesWithTargetPathDependsOn)"> |
|
||||
<!--Get Localized string before display message--> |
|
||||
<GetPublishingLocalizedString |
|
||||
ID="PublishLocalizedString_GatherSpecificOutputsFromProject" |
|
||||
ArgumentCount="1" |
|
||||
Arguments="IntermediateSatelliteAssembliesWithTargetPath" |
|
||||
LogType="Message" /> |
|
||||
<Message Text="@(IntermediateSatelliteAssembliesWithTargetPath->'$(OutDir)%(TargetPath) to bin\%(TargetPath)')" |
|
||||
Condition="Exists('$(OutDir)\%(TargetPath)')"/> |
|
||||
<ItemGroup> |
|
||||
<FilesForPackagingFromProject |
|
||||
Include="@(IntermediateSatelliteAssembliesWithTargetPath->'$(OutDir)%(TargetPath)')"> |
|
||||
<DestinationRelativePath>bin\%(IntermediateSatelliteAssembliesWithTargetPath.TargetPath)</DestinationRelativePath> |
|
||||
<FromTarget>CollectFilesFromIntermediateSatelliteAssembliesWithTargetPath</FromTarget> |
|
||||
<Category>Run</Category> |
|
||||
</FilesForPackagingFromProject> |
|
||||
</ItemGroup> |
|
||||
<CallTarget Targets="$(OnAfterCollectFilesFromIntermediateSatelliteAssembliesWithTargetPath)" RunEachTargetSeparately="false" /> |
|
||||
</Target> |
|
||||
|
|
||||
|
|
||||
<!--********************************************************************--> |
|
||||
<!-- Task CollectFilesFromReference --> |
|
||||
<!--********************************************************************--> |
|
||||
<PropertyGroup> |
|
||||
<CollectFilesFromReferenceDependsOn> |
|
||||
$(OnBeforeCollectFilesFromReference); |
|
||||
$(CollectFilesFromReferenceDependsOn); |
|
||||
ResolveProjectReferences; |
|
||||
ResolveAssemblyReferences; |
|
||||
</CollectFilesFromReferenceDependsOn> |
|
||||
</PropertyGroup> |
|
||||
<Target Name="CollectFilesFromReference" |
|
||||
DependsOnTargets="$(CollectFilesFromReferenceDependsOn)"> |
|
||||
|
|
||||
<!--Get Localized string before display message--> |
|
||||
<GetPublishingLocalizedString |
|
||||
ID="PublishLocalizedString_GatherSpecificItemsFromProjectNoDetail" |
|
||||
ArgumentCount="1" |
|
||||
Arguments="ReferenceCopyLocalPaths,ReferenceComWrappersToCopyLocal,ResolvedIsolatedComModules,_DeploymentLooseManifestFile,NativeReferenceFile" |
|
||||
LogType="Message" /> |
|
||||
|
|
||||
<ItemGroup> |
|
||||
<FilesForPackagingFromProject |
|
||||
Include="@(ReferenceCopyLocalPaths)"> |
|
||||
<DestinationRelativePath>bin\%(ReferenceCopyLocalPaths.DestinationSubDirectory)%(FileName)%(Extension)</DestinationRelativePath> |
|
||||
<FromTarget>CollectFilesFromReference</FromTarget> |
|
||||
<Category>Run</Category> |
|
||||
</FilesForPackagingFromProject> |
|
||||
</ItemGroup> |
|
||||
|
|
||||
<ItemGroup> |
|
||||
<FilesForPackagingFromProject |
|
||||
Include="@(ReferenceComWrappersToCopyLocal); |
|
||||
@(ResolvedIsolatedComModules); |
|
||||
@(_DeploymentLooseManifestFile); |
|
||||
@(NativeReferenceFile)"> |
|
||||
<DestinationRelativePath>bin\%(FileName)%(Extension)</DestinationRelativePath> |
|
||||
<FromTarget>CollectFilesFromReference</FromTarget> |
|
||||
<Category>Run</Category> |
|
||||
</FilesForPackagingFromProject> |
|
||||
</ItemGroup> |
|
||||
<CallTarget Targets="$(OnAfterCollectFilesFromReference)" RunEachTargetSeparately="false" /> |
|
||||
</Target> |
|
||||
|
|
||||
<!--********************************************************************--> |
|
||||
<!-- Task CollectFilesFromAllExtraReferenceFiles --> |
|
||||
<!--********************************************************************--> |
|
||||
<PropertyGroup> |
|
||||
<CollectFilesFromAllExtraReferenceFilesDependsOn> |
|
||||
$(OnBeforeCollectFilesFromAllExtraReferenceFiles); |
|
||||
$(CollectFilesFromAllExtraReferenceFilesDependsOn); |
|
||||
</CollectFilesFromAllExtraReferenceFilesDependsOn> |
|
||||
</PropertyGroup> |
|
||||
<Target Name="CollectFilesFromAllExtraReferenceFiles" |
|
||||
DependsOnTargets="$(CollectFilesFromAllExtraReferenceFilesDependsOn)"> |
|
||||
|
|
||||
<!--Get Localized string before display message--> |
|
||||
<GetPublishingLocalizedString |
|
||||
ID="PublishLocalizedString_GatherSpecificItemsFromProject" |
|
||||
ArgumentCount="1" |
|
||||
Arguments="AllExtraReferenceFiles" |
|
||||
LogType="Message" /> |
|
||||
<Message Text="@(AllExtraReferenceFiles->'$(OutDir)%(FileName)%(Extension)')" /> |
|
||||
<ItemGroup> |
|
||||
<FilesForPackagingFromProject Include="@(AllExtraReferenceFiles->'$(OutDir)%(FileName)%(Extension)')"> |
|
||||
<DestinationRelativePath>bin\%(FileName)%(Extension)</DestinationRelativePath> |
|
||||
<FromTarget>CollectFilesFromAllExtraReferenceFiles</FromTarget> |
|
||||
<Category>Run</Category> |
|
||||
</FilesForPackagingFromProject> |
|
||||
</ItemGroup> |
|
||||
<CallTarget Targets="$(OnAfterCollectFilesFromAllExtraReferenceFiles)" RunEachTargetSeparately="false"/> |
|
||||
</Target> |
|
||||
|
|
||||
|
|
||||
<!--********************************************************************--> |
|
||||
<!-- Task CollectFilesFrom_SourceItemsToCopyToOutputDirectory --> |
|
||||
<!--********************************************************************--> |
|
||||
<PropertyGroup> |
|
||||
|
|
||||
<CollectFilesFrom_SourceItemsToCopyToOutputDirectoryDependsOn> |
|
||||
$(OnBeforeCollectFilesFrom_SourceItemsToCopyToOutputDirectory); |
|
||||
$(CollectFilesFrom_SourceItemsToCopyToOutputDirectoryDependsOn); |
|
||||
</CollectFilesFrom_SourceItemsToCopyToOutputDirectoryDependsOn> |
|
||||
</PropertyGroup> |
|
||||
<Target Name="CollectFilesFrom_SourceItemsToCopyToOutputDirectory" |
|
||||
DependsOnTargets="$(CollectFilesFrom_SourceItemsToCopyToOutputDirectoryDependsOn)" |
|
||||
Condition="'@(_SourceItemsToCopyToOutputDirectoryAlways)' != '' or '@(_SourceItemsToCopyToOutputDirectory)' != ''"> |
|
||||
|
|
||||
<!--Get Localized string before display message--> |
|
||||
<GetPublishingLocalizedString |
|
||||
ID="PublishLocalizedString_GatherSpecificItemsFromProject" |
|
||||
ArgumentCount="1" |
|
||||
Arguments="_SourceItemsToCopyToOutputDirectoryAlways,_SourceItemsToCopyToOutputDirectory" |
|
||||
LogType="Message" /> |
|
||||
|
|
||||
<ItemGroup> |
|
||||
<_TempSourceItemsToCopyToOutputDirectory Include="@(_SourceItemsToCopyToOutputDirectoryAlways); @(_SourceItemsToCopyToOutputDirectory)" /> |
|
||||
</ItemGroup> |
|
||||
|
|
||||
<Message Text="@(_TempSourceItemsToCopyToOutputDirectory->'bin\%(TargetPath)')" /> |
|
||||
<ItemGroup> |
|
||||
<FilesForPackagingFromProject |
|
||||
Include="@(_TempSourceItemsToCopyToOutputDirectory)"> |
|
||||
<DestinationRelativePath>bin\%(_TempSourceItemsToCopyToOutputDirectory.TargetPath)</DestinationRelativePath> |
|
||||
<FromTarget>CollectFilesFrom_SourceItemsToCopyToOutputDirectory</FromTarget> |
|
||||
<Category>Run</Category> |
|
||||
</FilesForPackagingFromProject> |
|
||||
</ItemGroup> |
|
||||
<CallTarget Targets="$(OnAfterCollectFilesFrom_SourceItemsToCopyToOutputDirectory)" RunEachTargetSeparately="false" /> |
|
||||
</Target> |
|
||||
|
|
||||
|
|
||||
<!--********************************************************************--> |
|
||||
<!-- Task CollectFilesFromDocFileItem --> |
|
||||
<!--********************************************************************--> |
|
||||
<PropertyGroup> |
|
||||
<CollectFilesFromDocFileItemDependsOn> |
|
||||
$(OnBeforeCollectFilesFromDocFileItem); |
|
||||
$(CollectFilesFromDocFileItemDependsOn); |
|
||||
</CollectFilesFromDocFileItemDependsOn> |
|
||||
</PropertyGroup> |
|
||||
<Target Name="CollectFilesFromDocFileItem" |
|
||||
DependsOnTargets="$(CollectFilesFromDocFileItemDependsOn)" |
|
||||
Condition="$(_DocumentationFileProduced)" > |
|
||||
|
|
||||
<!--Get Localized string before display message--> |
|
||||
<GetPublishingLocalizedString |
|
||||
ID="PublishLocalizedString_GatherSpecificItemsFromProject" |
|
||||
ArgumentCount="1" |
|
||||
Arguments="DocFileItem" |
|
||||
LogType="Message" /> |
|
||||
<Message Text="@(DocFileItem->'bin\%(FileName)%(Extension)')" /> |
|
||||
<ItemGroup> |
|
||||
<FilesForPackagingFromProject |
|
||||
Include="@(DocFileItem)"> |
|
||||
<DestinationRelativePath>bin\%(FileName)%(Extension)</DestinationRelativePath> |
|
||||
<FromTarget>CollectFilesFromDocFileItem</FromTarget> |
|
||||
<Category>Run</Category> |
|
||||
</FilesForPackagingFromProject> |
|
||||
</ItemGroup> |
|
||||
<CallTarget Targets="$(OnAfterCollectFilesFromDocFileItem)" RunEachTargetSeparately="false" /> |
|
||||
</Target> |
|
||||
|
|
||||
<!--********************************************************************--> |
|
||||
<!-- Task CollectFilesFrom_WebApplicationSilverlightXapFiles --> |
|
||||
<!--********************************************************************--> |
|
||||
<PropertyGroup> |
|
||||
<CollectFilesFrom_WebApplicationSilverlightXapFilesDependsOn> |
|
||||
$(OnBeforeCollectFilesFrom_WebApplicationSilverlightXapFiles); |
|
||||
$(CollectFilesFrom_WebApplicationSilverlightXapFilesDependsOn); |
|
||||
</CollectFilesFrom_WebApplicationSilverlightXapFilesDependsOn> |
|
||||
</PropertyGroup> |
|
||||
<Target Name="CollectFilesFrom_WebApplicationSilverlightXapFiles" |
|
||||
DependsOnTargets="$(CollectFilesFrom_WebApplicationSilverlightXapFilesDependsOn)" |
|
||||
Condition="'@(_WebApplicationSilverlightXapFiles)'!=''"> |
|
||||
|
|
||||
<FilterByItems PipelineItems="@(_WebApplicationSilverlightXapFiles)" |
|
||||
Filter="@(Content)"> |
|
||||
<Output TaskParameter="OutFilter" ItemName="_WebApplicationSilverlightXapFilesNotInContent"/> |
|
||||
</FilterByItems> |
|
||||
|
|
||||
<!--Get Localized string before display message--> |
|
||||
<GetPublishingLocalizedString |
|
||||
ID="PublishLocalizedString_GatherSpecificItemsFromProject" |
|
||||
ArgumentCount="1" |
|
||||
Arguments="_WebApplicationSilverlightXapFilesNotInContent" |
|
||||
LogType="Message" /> |
|
||||
<Message Text="@(_WebApplicationSilverlightXapFilesNotInContent)" /> |
|
||||
<ItemGroup> |
|
||||
<FilesForPackagingFromProject Include="@(_WebApplicationSilverlightXapFilesNotInContent)"> |
|
||||
<DestinationRelativePath>%(_WebApplicationSilverlightXapFiles.Identity)</DestinationRelativePath> |
|
||||
<FromTarget>CollectFilesFrom_WebApplicationSilverlightXapFiles</FromTarget> |
|
||||
<Category>Run</Category> |
|
||||
</FilesForPackagingFromProject> |
|
||||
</ItemGroup> |
|
||||
<CallTarget Targets="$(OnAfterCollectFilesFrom_WebApplicationSilverlightXapFiles)" RunEachTargetSeparately="false" /> |
|
||||
</Target> |
|
||||
|
|
||||
<!--********************************************************************--> |
|
||||
<!-- Task CollectFilesFrom_binDeployableAssemblies --> |
|
||||
<!--********************************************************************--> |
|
||||
<PropertyGroup> |
|
||||
<CollectFilesFrom_binDeployableAssembliesDependsOn> |
|
||||
$(OnBeforeCollectFilesFrom_binDeployableAssemblies); |
|
||||
$(CollectFilesFrom_binDeployableAssembliesDependsOn); |
|
||||
_CopyBinDeployableAssemblies; |
|
||||
</CollectFilesFrom_binDeployableAssembliesDependsOn> |
|
||||
</PropertyGroup> |
|
||||
<Target Name="CollectFilesFrom_binDeployableAssemblies" |
|
||||
DependsOnTargets="$(CollectFilesFrom_binDeployableAssembliesDependsOn)"> |
|
||||
<!--Make sure binDeployableAssemblies is in None group. This is mainly for the dev10--> |
|
||||
<FilterByItems PipelineItems="@(_binDeployableAssemblies)" |
|
||||
SourceMetadataName="FullPath" |
|
||||
Filter="@(None)" |
|
||||
FilterMetadataName="FullPath"> |
|
||||
<Output TaskParameter="InFilter" ItemName="_binDeployableAssemblies_None"/> |
|
||||
</FilterByItems> |
|
||||
<!--Get Localized string before display message--> |
|
||||
<GetPublishingLocalizedString |
|
||||
ID="PublishLocalizedString_GatherSpecificItemsFromProject" |
|
||||
ArgumentCount="1" |
|
||||
Arguments="_binDeployableAssemblies" |
|
||||
LogType="Message" /> |
|
||||
<Message Text="@(_binDeployableAssemblies_None)" /> |
|
||||
|
|
||||
<ItemGroup> |
|
||||
<FilesForPackagingFromProject Include="@(_binDeployableAssemblies_None)" Condition="'%(_binDeployableAssemblies_None.DestinationRelPath)'==''"> |
|
||||
<DestinationRelativePath>bin\%(RecursiveDir)%(FileName)%(Extension)</DestinationRelativePath> |
|
||||
<FromTarget>CollectFilesFrom_binDeployableAssemblies_NoDestinationRelPath</FromTarget> |
|
||||
<Category>Run</Category> |
|
||||
</FilesForPackagingFromProject> |
|
||||
<!--VS11, _binDeployAssembly begin to have %(DestinationRelPath), we should honer that instead of %(recursiveDir)--> |
|
||||
<FilesForPackagingFromProject Include="@(_binDeployableAssemblies_None)" Condition="'%(_binDeployableAssemblies_None.DestinationRelPath)'!=''"> |
|
||||
<DestinationRelativePath>bin\%(_binDeployableAssemblies_None.DestinationRelPath)%(FileName)%(Extension)</DestinationRelativePath> |
|
||||
<FromTarget>CollectFilesFrom_binDeployableAssemblies_WithDestinationRelPath</FromTarget> |
|
||||
<Category>Run</Category> |
|
||||
</FilesForPackagingFromProject> |
|
||||
</ItemGroup> |
|
||||
<CallTarget Targets="$(OnAfterCollectFilesFrom_binDeployableAssemblies)" RunEachTargetSeparately="false" /> |
|
||||
</Target> |
|
||||
|
|
||||
<!--ImportAfter Extension--> |
|
||||
<PropertyGroup> |
|
||||
<ImportByWildcardAfterMicrosoftWebPublishingOnlyFilesToRunTheAppTargets Condition="'$(ImportByWildcardAfterMicrosoftWebPublishingOnlyFilesToRunTheAppTargets)'==''">true</ImportByWildcardAfterMicrosoftWebPublishingOnlyFilesToRunTheAppTargets> |
|
||||
</PropertyGroup> |
|
||||
<Import Project="$(MSBuildThisFileDirectory)\$(MSBuildThisFileName)\ImportAfter\*" Condition="'$(ImportByWildcardAfterMicrosoftWebPublishingOnlyFilesToRunTheAppTargets)' == 'true' and exists('$(MSBuildThisFileDirectory)\$(MSBuildThisFileName)\ImportAfter')"/> |
|
||||
|
|
||||
</Project> |
|
||||
@ -1,59 +0,0 @@ |
|||||
<!-- |
|
||||
*********************************************************************************************** |
|
||||
Microsoft.Web.Publishing.Deploy.FPSE.targets |
|
||||
|
|
||||
WARNING: DO NOT MODIFY this file unless you are knowledgeable about MSBuild and have |
|
||||
created a backup copy. Incorrect changes to this file will make it |
|
||||
impossible to load or build your web deploy projects from the command-line or the IDE. |
|
||||
|
|
||||
This file defines the steps in the standard package/publish process for Deploy |
|
||||
Currently |
|
||||
|
|
||||
Copyright (C) Microsoft Corporation. All rights reserved. |
|
||||
*********************************************************************************************** |
|
||||
--> |
|
||||
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> |
|
||||
<!--Import task from our dll--> |
|
||||
<UsingTask TaskName="GetPublishingLocalizedString" AssemblyFile="..\Microsoft.Web.Publishing.Tasks.dll"/> |
|
||||
|
|
||||
|
|
||||
<!--Append WebFTPPublish to the supported list.--> |
|
||||
<PropertyGroup> |
|
||||
<_WPPWebPublishMethodSupports>$(_WPPWebPublishMethodSupports);WebFPSEPublish</_WPPWebPublishMethodSupports> |
|
||||
</PropertyGroup> |
|
||||
|
|
||||
|
|
||||
<!--********************************************************************--> |
|
||||
<!--Target WebFPSEPublish --> |
|
||||
<!--********************************************************************--> |
|
||||
<PropertyGroup> |
|
||||
<WebFPSEPublishDependsOn> |
|
||||
$(OnBeforeWebFPSEPublish); |
|
||||
$(WebFPSEPublishDependsOn); |
|
||||
</WebFPSEPublishDependsOn> |
|
||||
</PropertyGroup> |
|
||||
|
|
||||
<Target Name="WebFPSEPublish" |
|
||||
DependsOnTargets="$(WebFPSEPublishDependsOn)" |
|
||||
Condition="'$(WebFPSEPublish)' != 'False'"> |
|
||||
|
|
||||
<!--This is not yet implemented through the command line for now error it out--> |
|
||||
<GetPublishingLocalizedString |
|
||||
ID="PublishLocalizedString_WebPublishMethodIsNotSupportedInCmdLine" |
|
||||
ArgumentCount="1" |
|
||||
Arguments="$(WebPublishMethod)" |
|
||||
LogType="Error" /> |
|
||||
|
|
||||
<Error Text ="Target WebFPSEPublish Failed" /> |
|
||||
|
|
||||
<CallTarget Targets="$(OnAfterWebFPSEPublish)" RunEachTargetSeparately="False" /> |
|
||||
</Target> |
|
||||
|
|
||||
|
|
||||
<!--ImportAfter Extension--> |
|
||||
<PropertyGroup> |
|
||||
<ImportByWildcardAfterMicrosoftWebPublishingDeployFPSETargets Condition="'$(ImportByWildcardAfterMicrosoftWebPublishingDeployFPSETargets)'==''">true</ImportByWildcardAfterMicrosoftWebPublishingDeployFPSETargets> |
|
||||
</PropertyGroup> |
|
||||
<Import Project="$(MSBuildThisFileDirectory)\$(MSBuildThisFileName)\ImportAfter\*" Condition="'$(ImportByWildcardAfterMicrosoftWebPublishingDeployFPSETargets)' == 'true' and exists('$(MSBuildThisFileDirectory)\$(MSBuildThisFileName)\ImportAfter')"/> |
|
||||
|
|
||||
</Project> |
|
||||
@ -1,60 +0,0 @@ |
|||||
<!-- |
|
||||
*********************************************************************************************** |
|
||||
Microsoft.Web.Publishing.Deploy.FTP.targets |
|
||||
|
|
||||
WARNING: DO NOT MODIFY this file unless you are knowledgeable about MSBuild and have |
|
||||
created a backup copy. Incorrect changes to this file will make it |
|
||||
impossible to load or build your web deploy projects from the command-line or the IDE. |
|
||||
|
|
||||
This file defines the steps in the standard package/publish process for Deploy |
|
||||
Currently |
|
||||
|
|
||||
Copyright (C) Microsoft Corporation. All rights reserved. |
|
||||
*********************************************************************************************** |
|
||||
--> |
|
||||
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> |
|
||||
<!--Import task from our dll--> |
|
||||
<UsingTask TaskName="GetPublishingLocalizedString" AssemblyFile="..\Microsoft.Web.Publishing.Tasks.dll"/> |
|
||||
|
|
||||
|
|
||||
<!--Append WebFTPPublish to the supported list.--> |
|
||||
<PropertyGroup> |
|
||||
<_WPPWebPublishMethodSupports>$(_WPPWebPublishMethodSupports);WebFTPPublish</_WPPWebPublishMethodSupports> |
|
||||
</PropertyGroup> |
|
||||
|
|
||||
|
|
||||
<!--********************************************************************--> |
|
||||
<!--Target WebFTPPublish --> |
|
||||
<!--Current this is not supported through the command line, show the error message.--> |
|
||||
<!--********************************************************************--> |
|
||||
<PropertyGroup> |
|
||||
<WebFTPPublishDependsOn> |
|
||||
$(OnBeforeWebFTPPublish); |
|
||||
$(WebFTPPublishDependsOn); |
|
||||
</WebFTPPublishDependsOn> |
|
||||
</PropertyGroup> |
|
||||
|
|
||||
<Target Name="WebFTPPublish" |
|
||||
DependsOnTargets="$(WebFTPPublishDependsOn)" |
|
||||
Condition="'$(WebFTPPublish)' != 'False'"> |
|
||||
|
|
||||
<!--This is not yet implemented through the command line for Log the error --> |
|
||||
<GetPublishingLocalizedString |
|
||||
ID="PublishLocalizedString_WebPublishMethodIsNotSupportedInCmdLine" |
|
||||
ArgumentCount="1" |
|
||||
Arguments="$(WebPublishMethod)" |
|
||||
LogType="Error" /> |
|
||||
|
|
||||
<Error Text ="Target WebFTPPublish Failed" /> |
|
||||
|
|
||||
<CallTarget Targets="$(OnAfterWebFTPPublish)" RunEachTargetSeparately="False" /> |
|
||||
</Target> |
|
||||
|
|
||||
<!--ImportAfter Extension--> |
|
||||
<PropertyGroup> |
|
||||
<ImportByWildcardAfterMicrosoftWebPublishingDeployFTPTargets Condition="'$(ImportByWildcardAfterMicrosoftWebPublishingDeployFTPTargets)'==''">true</ImportByWildcardAfterMicrosoftWebPublishingDeployFTPTargets> |
|
||||
</PropertyGroup> |
|
||||
<Import Project="$(MSBuildThisFileDirectory)\$(MSBuildThisFileName)\ImportAfter\*" Condition="'$(ImportByWildcardAfterMicrosoftWebPublishingDeployFTPTargets)' == 'true' and exists('$(MSBuildThisFileDirectory)\$(MSBuildThisFileName)\ImportAfter')"/> |
|
||||
|
|
||||
|
|
||||
</Project> |
|
||||
@ -1,116 +0,0 @@ |
|||||
<!-- |
|
||||
*********************************************************************************************** |
|
||||
Microsoft.Web.Publishing.Deploy.FPSE.targets |
|
||||
|
|
||||
WARNING: DO NOT MODIFY this file unless you are knowledgeable about MSBuild and have |
|
||||
created a backup copy. Incorrect changes to this file will make it |
|
||||
impossible to load or build your web deploy projects from the command-line or the IDE. |
|
||||
|
|
||||
This file defines the steps in the standard package/publish process for Deploy |
|
||||
Currently |
|
||||
|
|
||||
Copyright (C) Microsoft Corporation. All rights reserved. |
|
||||
*********************************************************************************************** |
|
||||
--> |
|
||||
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> |
|
||||
<!--Import task from our dll--> |
|
||||
<UsingTask TaskName="GetPublishingLocalizedString" AssemblyFile="..\Microsoft.Web.Publishing.Tasks.dll"/> |
|
||||
<UsingTask TaskName="CopyPipelineFiles" AssemblyFile="..\Microsoft.Web.Publishing.Tasks.dll"/> |
|
||||
|
|
||||
|
|
||||
<!--Append WebFTPPublish to the supported list.--> |
|
||||
<PropertyGroup> |
|
||||
<_WPPWebPublishMethodSupports>$(_WPPWebPublishMethodSupports);WebFileSystemPublish</_WPPWebPublishMethodSupports> |
|
||||
</PropertyGroup> |
|
||||
|
|
||||
|
|
||||
|
|
||||
<!--********************************************************************--> |
|
||||
<!--Target WebFileSystemPublish --> |
|
||||
<!--********************************************************************--> |
|
||||
<PropertyGroup> |
|
||||
<WebFileSystemPublishDependsOn> |
|
||||
$(OnBeforeWebFileSystemPublish); |
|
||||
$(WebFileSystemPublishDependsOn); |
|
||||
</WebFileSystemPublishDependsOn> |
|
||||
<WebFileSystemPublishDependsOn> |
|
||||
$(WebFileSystemPublishDependsOn); |
|
||||
PipelinePreDeployCopyAllFilesToOneFolder; |
|
||||
</WebFileSystemPublishDependsOn> |
|
||||
</PropertyGroup> |
|
||||
|
|
||||
<Target Name="WebFileSystemPublish" |
|
||||
DependsOnTargets="$(WebFileSystemPublishDependsOn)" |
|
||||
Condition="'$(WebFileSystemPublish)' != 'False'"> |
|
||||
|
|
||||
<PropertyGroup> |
|
||||
<_DoWebFileSystemPublishDeleteExtraFiles>False</_DoWebFileSystemPublishDeleteExtraFiles> |
|
||||
<_DoWebFileSystemPublishDeleteExtraFiles Condition= "'$(DeleteExistingFiles)' == 'True'" >True</_DoWebFileSystemPublishDeleteExtraFiles> |
|
||||
<_HttpHeader>http://</_HttpHeader> |
|
||||
<_DoWebFileSystemPublish>False</_DoWebFileSystemPublish> |
|
||||
<_DoWebFileSystemPublish Condition="'$(PublishUrl)'!='' And '$(PublishUrl.StartsWith($(_HttpHeader), StringComparison.OrdinalIgnoreCase))' == 'False' And '$([System.IO.Path]::GetFullPath($(PublishUrl)))' != ''">True</_DoWebFileSystemPublish> |
|
||||
</PropertyGroup> |
|
||||
|
|
||||
<!--This is not yet implemented through the command line for now error it out--> |
|
||||
<GetPublishingLocalizedString |
|
||||
Condition="!$(_DoWebFileSystemPublish)" |
|
||||
ID="PublishLocalizedString_WebPublishMethodIsNotSupportedInCmdLine" |
|
||||
ArgumentCount="1" |
|
||||
Arguments="$(WebPublishMethod)" |
|
||||
LogType="Error" /> |
|
||||
|
|
||||
<Error Text ="Target WebFileSystemPublish Failed" |
|
||||
Condition="!$(_DoWebFileSystemPublish)" |
|
||||
/> |
|
||||
|
|
||||
<ItemGroup Condition="$(_DoWebFileSystemPublish)"> |
|
||||
<FilesForFileCopy Remove="$(FilesForFileCopy)" /> |
|
||||
</ItemGroup> |
|
||||
|
|
||||
<CollectFilesinFolder RootPath="$(WPPAllFilesInSingleFolder)" |
|
||||
Condition="$(_DoWebFileSystemPublish)" > |
|
||||
<Output TaskParameter="Result" ItemName="_AllFilesUnder_WPPAllFilesInSingleFolder" /> |
|
||||
</CollectFilesinFolder> |
|
||||
|
|
||||
<ItemGroup> |
|
||||
<FilesForFileCopy Include="@(_AllFilesUnder_WPPAllFilesInSingleFolder)" > |
|
||||
<DestinationRelativePath>%(_AllFilesUnder_WPPAllFilesInSingleFolder.Identity)</DestinationRelativePath> |
|
||||
<FromTarget>WebFileSystemPublish</FromTarget> |
|
||||
<Category>AllFilesInFolder</Category> |
|
||||
</FilesForFileCopy> |
|
||||
</ItemGroup> |
|
||||
|
|
||||
|
|
||||
<!-- In the case of the incremental Packaging/Publish, we need to find out the extra file and delee them--> |
|
||||
<ItemGroup Condition="'$(DeleteExistingFiles)' == 'True'"> |
|
||||
<_AllExtraFilesUnderPublishUrl Include="$(PublishUrl)\**" /> |
|
||||
<_AllExtraFilesUnderPublishUrl |
|
||||
Remove="@(FilesForFileCopy->'$(PublishUrl)\%(DestinationRelativePath)')" /> |
|
||||
</ItemGroup> |
|
||||
<!--Remove all extra files in the temp folder that's not in the @(FilesForPackagingFromProject--> |
|
||||
<Delete Files="@(_AllExtraFilesUnderPublishUrl)" /> |
|
||||
<!-- Make sure the folder exist --> |
|
||||
<MakeDir Directories="$(PublishUrl)" Condition="$(_DoWebFileSystemPublish) And !Exists('$(PublishUrl)')"/> |
|
||||
|
|
||||
<!--Force Copy Of all file to the WPPAllFilesInSingleFolder if needed--> |
|
||||
<CopyPipelineFiles Condition="$(_DoWebFileSystemPublish)" |
|
||||
PipelineItems="@(FilesForFileCopy)" |
|
||||
SourceDirectory="$(WPPAllFilesInSingleFolder)" |
|
||||
TargetDirectory="$(PublishUrl)" |
|
||||
SkipMetadataExcludeTrueItems="False" |
|
||||
UpdateItemSpec="True" |
|
||||
DeleteItemsMarkAsExcludeTrue ="False"> |
|
||||
<Output TaskParameter="ResultPipelineItems" ItemName="_FilesForFileCopyAfterFileSystemPublish"/> |
|
||||
</CopyPipelineFiles> |
|
||||
|
|
||||
|
|
||||
<CallTarget Targets="$(OnAfterWebFileSystemPublish)" RunEachTargetSeparately="False" /> |
|
||||
</Target> |
|
||||
|
|
||||
<!--ImportAfter Extension--> |
|
||||
<PropertyGroup> |
|
||||
<ImportByWildcardAfterMicrosoftWebPublishingDeployFileSystemTargets Condition="'$(ImportByWildcardAfterMicrosoftWebPublishingDeployFileSystemTargets)'==''">true</ImportByWildcardAfterMicrosoftWebPublishingDeployFileSystemTargets> |
|
||||
</PropertyGroup> |
|
||||
<Import Project="$(MSBuildThisFileDirectory)\$(MSBuildThisFileName)\ImportAfter\*" Condition="'$(ImportByWildcardAfterMicrosoftWebPublishingDeployFileSystemTargets)' == 'true' and exists('$(MSBuildThisFileDirectory)\$(MSBuildThisFileName)\ImportAfter')"/> |
|
||||
|
|
||||
</Project> |
|
||||
@ -1,49 +0,0 @@ |
|||||
<!-- |
|
||||
*********************************************************************************************** |
|
||||
Microsoft.Web.Publishing.Deploy.MSDeploy.targets |
|
||||
|
|
||||
WARNING: DO NOT MODIFY this file unless you are knowledgeable about MSBuild and have |
|
||||
created a backup copy. Incorrect changes to this file will make it |
|
||||
impossible to load or build your web deploy projects from the command-line or the IDE. |
|
||||
|
|
||||
This file defines the steps in the standard package/publish process for Deploy |
|
||||
Currently |
|
||||
|
|
||||
Copyright (C) Microsoft Corporation. All rights reserved. |
|
||||
*********************************************************************************************** |
|
||||
--> |
|
||||
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> |
|
||||
<!--Import task from our dll--> |
|
||||
<UsingTask TaskName="GetPublishingLocalizedString" AssemblyFile="..\Microsoft.Web.Publishing.Tasks.dll"/> |
|
||||
|
|
||||
<!--ImportBefore Extension--> |
|
||||
<PropertyGroup> |
|
||||
<ImportByWildcardBeforeMicrosoftWebPublishingDeployMSDeployTargets Condition="'$(ImportByWildcardBeforeMicrosoftWebPublishingDeployMSDeployTargets)'==''">true</ImportByWildcardBeforeMicrosoftWebPublishingDeployMSDeployTargets> |
|
||||
</PropertyGroup> |
|
||||
<Import Project="$(MSBuildThisFileDirectory)\$(MSBuildThisFileName)\ImportBefore\*" Condition="'$(ImportByWildcardBeforeMicrosoftWebPublishingDeployMSDeployTargets)' == 'true' and exists('$(MSBuildThisFileDirectory)\$(MSBuildThisFileName)\ImportBefore')"/> |
|
||||
|
|
||||
<!--This only support new /t:WebPublish with the 'WebPublishMethod'=='MSDeploy'--> |
|
||||
|
|
||||
|
|
||||
<PropertyGroup> |
|
||||
<Microsoft_Web_Publishing_MSDeploy_Common_targets Condition="'$(Microsoft_Web_Publishing_MSDeploy_Common_targets)' == ''">Microsoft.Web.Publishing.MSDeploy.Common.targets</Microsoft_Web_Publishing_MSDeploy_Common_targets> |
|
||||
</PropertyGroup> |
|
||||
<Import Project="$(Microsoft_Web_Publishing_MSDeploy_Common_targets)" Condition="'$(Microsoft_Web_Publishing_MSDeploy_Common_targets_Imported)' != 'true' And Exists($(Microsoft_Web_Publishing_MSDeploy_Common_targets))"/> |
|
||||
|
|
||||
<PropertyGroup> |
|
||||
<Microsoft_Web_Publishing_Deploy_MSDeploy_targets_Imported>True</Microsoft_Web_Publishing_Deploy_MSDeploy_targets_Imported> |
|
||||
<PipelineDeployPhaseDependsOn> |
|
||||
$(PipelineDeployPhaseDependsOn); |
|
||||
PipelineMsdeploySpecificTransformPhase; |
|
||||
</PipelineDeployPhaseDependsOn> |
|
||||
</PropertyGroup> |
|
||||
|
|
||||
|
|
||||
|
|
||||
<!--ImportAfter Extension--> |
|
||||
<PropertyGroup> |
|
||||
<ImportByWildcardAfterMicrosoftWebPublishingDeployMSDeployTargets Condition="'$(ImportByWildcardAfterMicrosoftWebPublishingDeployMSDeployTargets)'==''">true</ImportByWildcardAfterMicrosoftWebPublishingDeployMSDeployTargets> |
|
||||
</PropertyGroup> |
|
||||
<Import Project="$(MSBuildThisFileDirectory)\$(MSBuildThisFileName)\ImportAfter\*" Condition="'$(ImportByWildcardAfterMicrosoftWebPublishingDeployMSDeployTargets)' == 'true' and exists('$(MSBuildThisFileDirectory)\$(MSBuildThisFileName)\ImportAfter')"/> |
|
||||
|
|
||||
</Project> |
|
||||
@ -1,54 +0,0 @@ |
|||||
<!-- |
|
||||
*********************************************************************************************** |
|
||||
Microsoft.Web.Publishing.Deploy.Package.targets |
|
||||
|
|
||||
WARNING: DO NOT MODIFY this file unless you are knowledgeable about MSBuild and have |
|
||||
created a backup copy. Incorrect changes to this file will make it |
|
||||
impossible to load or build your web deploy projects from the command-line or the IDE. |
|
||||
|
|
||||
This file defines the steps in the standard package/publish process for Deploy |
|
||||
Currently |
|
||||
|
|
||||
Copyright (C) Microsoft Corporation. All rights reserved. |
|
||||
*********************************************************************************************** |
|
||||
--> |
|
||||
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> |
|
||||
<!--Import task from our dll--> |
|
||||
<UsingTask TaskName="GetPublishingLocalizedString" AssemblyFile="..\Microsoft.Web.Publishing.Tasks.dll"/> |
|
||||
<UsingTask TaskName="MSDeploy" AssemblyFile="..\Microsoft.Web.Publishing.Tasks.dll"/> |
|
||||
<UsingTask TaskName="VSMSDeploy" AssemblyFile="..\Microsoft.Web.Publishing.Tasks.dll"/> |
|
||||
<UsingTask TaskName="ImportParametersFile" AssemblyFile="..\Microsoft.Web.Publishing.Tasks.dll"/> |
|
||||
<UsingTask TaskName="ExportParametersFile" AssemblyFile="..\Microsoft.Web.Publishing.Tasks.dll"/> |
|
||||
<UsingTask TaskName="SortParametrsByPriority" AssemblyFile="..\Microsoft.Web.Publishing.Tasks.dll"/> |
|
||||
|
|
||||
|
|
||||
<!--ImportBefore Extension--> |
|
||||
<PropertyGroup> |
|
||||
<ImportByWildcardBeforeMicrosoftWebPublishingDeployPackageTargets Condition="'$(ImportByWildcardBeforeMicrosoftWebPublishingDeployPackageTargets)'==''">true</ImportByWildcardBeforeMicrosoftWebPublishingDeployPackageTargets> |
|
||||
</PropertyGroup> |
|
||||
<Import Project="$(MSBuildThisFileDirectory)\$(MSBuildThisFileName)\ImportBefore\*" Condition="'$(ImportByWildcardBeforeMicrosoftWebPublishingDeployPackageTargets)' == 'true' and exists('$(MSBuildThisFileDirectory)\$(MSBuildThisFileName)\ImportBefore')"/> |
|
||||
|
|
||||
<PropertyGroup> |
|
||||
<Microsoft_Web_Publishing_MSDeploy_Common_targets Condition="'$(Microsoft_Web_Publishing_MSDeploy_Common_targets)' == ''">Microsoft.Web.Publishing.MSDeploy.Common.targets</Microsoft_Web_Publishing_MSDeploy_Common_targets> |
|
||||
</PropertyGroup> |
|
||||
<Import Project="$(Microsoft_Web_Publishing_MSDeploy_Common_targets)" Condition="'$(Microsoft_Web_Publishing_MSDeploy_Common_targets_Imported)' != 'true' And Exists($(Microsoft_Web_Publishing_MSDeploy_Common_targets))"/> |
|
||||
|
|
||||
<PropertyGroup> |
|
||||
<Microsoft_Web_Publishing_Deploy_Package_targets_Imported>True</Microsoft_Web_Publishing_Deploy_Package_targets_Imported> |
|
||||
<PipelineDeployPhaseDependsOn> |
|
||||
$(PipelineDeployPhaseDependsOn); |
|
||||
PipelineMsdeploySpecificTransformPhase; |
|
||||
</PipelineDeployPhaseDependsOn> |
|
||||
</PropertyGroup> |
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
<!--ImportAfter Extension--> |
|
||||
<PropertyGroup> |
|
||||
<ImportByWildcardAfterMicrosoftWebPublishingDeployPackageTargets Condition="'$(ImportByWildcardAfterMicrosoftWebPublishingDeployPackageTargets)'==''">true</ImportByWildcardAfterMicrosoftWebPublishingDeployPackageTargets> |
|
||||
</PropertyGroup> |
|
||||
<Import Project="$(MSBuildThisFileDirectory)\$(MSBuildThisFileName)\ImportAfter\*" Condition="'$(ImportByWildcardAfterMicrosoftWebPublishingDeployPackageTargets)' == 'true' and exists('$(MSBuildThisFileDirectory)\$(MSBuildThisFileName)\ImportAfter')"/> |
|
||||
|
|
||||
</Project> |
|
||||
File diff suppressed because it is too large
@ -1,459 +0,0 @@ |
|||||
<!-- |
|
||||
*********************************************************************************************** |
|
||||
Microsoft.DNX.Publishing.targets |
|
||||
|
|
||||
WARNING: DO NOT MODIFY this file unless you are knowledgeable about MSBuild and have |
|
||||
created a backup copy. Incorrect changes to this file will make it |
|
||||
impossible to load or build your web deploy projects from the command-line or the IDE. |
|
||||
|
|
||||
This file defines the steps in the standard build process to deploy web application projects. |
|
||||
|
|
||||
Copyright (C) Microsoft Corporation. All rights reserved. |
|
||||
*********************************************************************************************** |
|
||||
--> |
|
||||
|
|
||||
<Project |
|
||||
xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> |
|
||||
<!-- The build process can be extended in a similar way as MS.Common.targets --> |
|
||||
|
|
||||
<PropertyGroup> |
|
||||
<ImportByWildcardBeforeMicrosoftWebPublishingTargets Condition="'$(ImportByWildcardBeforeMicrosoftWebPublishingTargets)'==''">true</ImportByWildcardBeforeMicrosoftWebPublishingTargets> |
|
||||
</PropertyGroup> |
|
||||
|
|
||||
<Import Project="$(MSBuildThisFileDirectory)\$(MSBuildThisFileName)\ImportBefore\*" Condition="'$(ImportByWildcardBeforeMicrosoftWebPublishingTargets)' == 'true' and exists('$(MSBuildThisFileDirectory)\$(MSBuildThisFileName)\ImportBefore')"/> |
|
||||
|
|
||||
|
|
||||
<!-- |
|
||||
*********************************************************************************************** |
|
||||
Including the tasks |
|
||||
*********************************************************************************************** |
|
||||
--> |
|
||||
<PropertyGroup> |
|
||||
<WebPublishTasksDir Condition=" '$(WebPublishTasksDir)'=='' ">$(MSBuildThisFileDirectory)</WebPublishTasksDir> |
|
||||
<DNXTasksDir Condition=" '$(DNXTasksDir)'=='' ">$(MSBuildThisFileDirectory)..\DNX\</DNXTasksDir> |
|
||||
</PropertyGroup> |
|
||||
<UsingTask TaskName="MSDeploy" AssemblyFile="$(WebPublishTasksDir)Microsoft.Web.Publishing.Tasks.dll"/> |
|
||||
<UsingTask TaskName="VSMSDeploy" AssemblyFile="$(WebPublishTasksDir)Microsoft.Web.Publishing.Tasks.dll"/> |
|
||||
<UsingTask TaskName="NormalizeServiceUrl" AssemblyFile="$(WebPublishTasksDir)Microsoft.Web.Publishing.Tasks.dll"/> |
|
||||
<UsingTask TaskName="InvokePowerShell" AssemblyFile="$(WebPublishTasksDir)Microsoft.Web.Publishing.Tasks.dll"/> |
|
||||
<UsingTask TaskName="ValidateParameter" AssemblyFile="$(WebPublishTasksDir)Microsoft.Web.Publishing.Tasks.dll"/> |
|
||||
<UsingTask TaskName="GetAllPublishProperties" AssemblyFile="$(WebPublishTasksDir)Microsoft.Web.Publishing.Tasks.dll"/> |
|
||||
<UsingTask TaskName="Dnu" AssemblyFile="$(DNXTasksDir)Microsoft.DNX.Tasks.dll"/> |
|
||||
|
|
||||
<!-- |
|
||||
*********************************************************************************************** |
|
||||
Import the publish profile |
|
||||
*********************************************************************************************** |
|
||||
--> |
|
||||
<PropertyGroup Condition="'$(PublishProfile)' != ''"> |
|
||||
<PublishProfileRootFolder Condition="'$(PublishProfileRootFolder)' == '' ">$(MSBuildProjectDirectory)\Properties\PublishProfiles\</PublishProfileRootFolder> |
|
||||
<PublishProfileName Condition="'$(PublishProfileName)' == ''">$([System.IO.Path]::GetFileNameWithoutExtension($(PublishProfile)))</PublishProfileName> |
|
||||
<WebPublishProfileFile Condition="'$(WebPublishProfileFile)' == ''">$(PublishProfileRootFolder)$(PublishProfileName).pubxml</WebPublishProfileFile> |
|
||||
</PropertyGroup> |
|
||||
<Import Project="$(WebPublishProfileFile)" Condition="Exists($(WebPublishProfileFile))"/> |
|
||||
|
|
||||
|
|
||||
<!-- |
|
||||
*********************************************************************************************** |
|
||||
Global Properties |
|
||||
*********************************************************************************************** |
|
||||
--> |
|
||||
<PropertyGroup> |
|
||||
<PublishOutputPathNoTrailingSlash Condition="'$(PublishOutputPathNoTrailingSlash)' == ''">$([System.IO.Path]::GetTempPath())PublishTemp</PublishOutputPathNoTrailingSlash> |
|
||||
<PublishOutputPath Condition="'$(PublishOutputPath)' == ''">$(PublishOutputPathNoTrailingSlash)\</PublishOutputPath> |
|
||||
</PropertyGroup> |
|
||||
|
|
||||
|
|
||||
<!-- |
|
||||
*********************************************************************************************** |
|
||||
TARGET : WebPublish |
|
||||
*********************************************************************************************** |
|
||||
--> |
|
||||
<Target Name="WebPublish" AfterTargets="Build" Condition=" '$(DeployOnBuild)'=='true' "> |
|
||||
|
|
||||
<MSBuild Projects ="$(MSBuildProjectFullPath)" |
|
||||
Targets="DefaultPublish" |
|
||||
Condition=" '$(WebPublishMethod)'=='' " /> |
|
||||
|
|
||||
<MSBuild Projects ="$(MSBuildProjectFullPath)" |
|
||||
Targets="FileSystemPublish" |
|
||||
Condition=" '$(WebPublishMethod)'=='FileSystem' " /> |
|
||||
|
|
||||
<MSBuild Projects ="$(MSBuildProjectFullPath)" |
|
||||
Targets="MSDeployPublish" |
|
||||
Condition=" '$(WebPublishMethod)'=='MSDeploy' " /> |
|
||||
|
|
||||
<MSBuild Projects ="$(MSBuildProjectFullPath)" |
|
||||
Targets="DockerPublish" |
|
||||
Condition=" '$(WebPublishMethod)'=='Docker' " /> |
|
||||
|
|
||||
</Target> |
|
||||
|
|
||||
<!-- |
|
||||
*********************************************************************************************** |
|
||||
TARGET: GatherAllFilesToPublish |
|
||||
*********************************************************************************************** |
|
||||
--> |
|
||||
<PropertyGroup> |
|
||||
<GatherAllFilesToPublishDependsOn> |
|
||||
$(GatherAllFilesToPublishDependsOn); |
|
||||
GetRuntimeToolingPathTarget |
|
||||
</GatherAllFilesToPublishDependsOn> |
|
||||
</PropertyGroup> |
|
||||
<Target Name="GatherAllFilesToPublish" |
|
||||
DependsOnTargets="$(GatherAllFilesToPublishDependsOn)"> |
|
||||
|
|
||||
<!-- Dnu bundle arguments --> |
|
||||
<PropertyGroup> |
|
||||
<!-- Dnu bundle arguments begin --> |
|
||||
<KPackWorkingDirectory Condition=" '$(KPackWorkingDirectory)'=='' ">$(MSBuildProjectDirectory)</KPackWorkingDirectory> |
|
||||
|
|
||||
<!-- Setting the default webroot in the case of CI build scenarios --> |
|
||||
<WebRoot Condition="'$(WebRoot)' == '' And '$(DeployOnBuild)'=='true'">wwwroot</WebRoot> |
|
||||
<!-- wwwroot-out switch is only provided for web projects. --> |
|
||||
<WebRootOut Condition= "'$(WebRootOut)'=='' and '$(WebRoot)' != ''">$(WebRoot)</WebRootOut> |
|
||||
|
|
||||
<!-- If compile source is set, then no-source flag is passed to Dnu bundle --> |
|
||||
<NoSourceFlag Condition=" '$(NoSourceFlag)'=='' And '$(CompileSource)'=='true' ">true</NoSourceFlag> |
|
||||
<QuietFlag Condition=" '$(QuietFlag)'=='' And '$(DeployOnBuild)'!='true' ">true</QuietFlag> |
|
||||
<PublishConfiguration Condition=" '$(PublishConfiguration)'=='' And '$(LastUsedBuildConfiguration)'!='' ">$(LastUsedBuildConfiguration)</PublishConfiguration> |
|
||||
|
|
||||
<!-- Setting the default publish configuration to $(Configuration) --> |
|
||||
<PublishConfiguration Condition=" '$(PublishConfiguration)'=='' ">$(Configuration)</PublishConfiguration> |
|
||||
<PublishConfiguration Condition=" '$(PublishConfiguration)'=='' ">Release</PublishConfiguration> |
|
||||
|
|
||||
<!-- Dnu bundle arguments end --> |
|
||||
</PropertyGroup> |
|
||||
|
|
||||
<!-- If an external tools path has not been set, set it to the default --> |
|
||||
<DefaultExternalToolsPath ProjectFolder="$(MSBuildProjectDirectory)" Condition="'$(ExternalToolsPath)' == ''"> |
|
||||
<Output PropertyName="ExternalToolsPath" TaskParameter="ExternalToolsPath"></Output> |
|
||||
</DefaultExternalToolsPath> |
|
||||
|
|
||||
<GetRuntimeVersion |
|
||||
RuntimeVersionOverride="$(PublishDNXVersion)" |
|
||||
TargetDNXVersion="$(TargetDNXVersion)" |
|
||||
RuntimeToolingVersion="$(RuntimeToolingVersion)" |
|
||||
Want64Bit="$(Bundle64BitRuntime)" |
|
||||
WantCoreClr="$(BundleCoreClrRuntime)"> |
|
||||
<Output PropertyName="FinalPublishVersion" TaskParameter="RuntimeVersion"></Output> |
|
||||
</GetRuntimeVersion> |
|
||||
|
|
||||
<Exec |
|
||||
Condition="Exists('$(PublishOutputPath)')" |
|
||||
Command="rmdir /S /Q "$(PublishOutputPath)"" |
|
||||
WorkingDirectory="$(MSBuildProjectDirectory)" /> |
|
||||
|
|
||||
<Dnu |
|
||||
RuntimeToolingDirectory ="$(RuntimeToolingDirectory)" |
|
||||
ProjectFolder="$(MSBuildProjectDirectory)" |
|
||||
Project="$(KPackWorkingDirectory)" |
|
||||
Command="publish" |
|
||||
Runtime="$(FinalPublishVersion)" |
|
||||
WwwRootOut="$(WebRootOut)" |
|
||||
NoSource="$(NoSourceFlag)" |
|
||||
Quiet="$(QuietFlag)" |
|
||||
Configuration="$(PublishConfiguration)" |
|
||||
Out="$(PublishOutputPathNoTrailingSlash)" |
|
||||
ExternalToolsPath="$(ExternalToolsPath)" |
|
||||
IsFilePreview="$(FilePreview)" |
|
||||
/> |
|
||||
</Target> |
|
||||
|
|
||||
|
|
||||
<!-- |
|
||||
*********************************************************************************************** |
|
||||
TARGET: FileSystem Publish |
|
||||
*********************************************************************************************** |
|
||||
--> |
|
||||
<PropertyGroup> |
|
||||
<FileSystemPublishDependsOn> |
|
||||
$(FileSystemPublishDependsOn); |
|
||||
GatherAllFilesToPublish; |
|
||||
</FileSystemPublishDependsOn> |
|
||||
</PropertyGroup> |
|
||||
|
|
||||
<Target Name="FileSystemPublish" |
|
||||
DependsOnTargets="$(FileSystemPublishDependsOn)"> |
|
||||
|
|
||||
<MSBuild Projects ="$(MSBuildProjectFullPath)" |
|
||||
Targets="PowerShellPublish" /> |
|
||||
|
|
||||
</Target> |
|
||||
|
|
||||
<!-- |
|
||||
*********************************************************************************************** |
|
||||
TARGET: Docker Publish |
|
||||
*********************************************************************************************** |
|
||||
--> |
|
||||
<PropertyGroup> |
|
||||
<DockerPublishDependsOn> |
|
||||
$(DockerPublishDependsOn); |
|
||||
GatherAllFilesToPublish; |
|
||||
</DockerPublishDependsOn> |
|
||||
</PropertyGroup> |
|
||||
|
|
||||
<Target Name="DockerPublish" |
|
||||
DependsOnTargets="$(DockerPublishDependsOn)"> |
|
||||
|
|
||||
<MSBuild Projects ="$(MSBuildProjectFullPath)" |
|
||||
Targets="PowerShellPublish" /> |
|
||||
</Target> |
|
||||
|
|
||||
<!-- |
|
||||
*********************************************************************************************** |
|
||||
TARGET : MSDeploy Publish |
|
||||
*********************************************************************************************** |
|
||||
--> |
|
||||
<PropertyGroup> |
|
||||
<MSDeployPublishDependsOn> |
|
||||
$(MSDeployPublishDependsOn); |
|
||||
GatherAllFilesToPublish; |
|
||||
GenerateSkipRuleForAppData |
|
||||
</MSDeployPublishDependsOn> |
|
||||
</PropertyGroup> |
|
||||
|
|
||||
<Target Name="MSDeployPublish" DependsOnTargets="$(MSDeployPublishDependsOn)"> |
|
||||
|
|
||||
<MSBuild Projects ="$(MSBuildProjectFullPath)" |
|
||||
Targets="VSMSDeployPublish" /> |
|
||||
|
|
||||
<MSBuild Projects ="$(MSBuildProjectFullPath)" |
|
||||
Targets="PowerShellPublish" /> |
|
||||
</Target> |
|
||||
|
|
||||
<!-- |
|
||||
*********************************************************************************************** |
|
||||
TARGET : VSMSDeploy Publish |
|
||||
*********************************************************************************************** |
|
||||
--> |
|
||||
<Target Name="VSMSDeployPublish" Condition=" '$(FilePreview)' == 'true' Or '$(UsePowerShell)' != 'true'" > |
|
||||
|
|
||||
<ValidateParameter |
|
||||
ParameterName="MsDeployServiceUrl" |
|
||||
ParameterValue="$(MsDeployServiceUrl)"/> |
|
||||
|
|
||||
<!-- Normalize service url such as convert a server name to format like https://<server>:8172/msdeploy.axd--> |
|
||||
<NormalizeServiceUrl ServiceUrl="$(MsDeployServiceUrl)" UseWMSVC="true" UseRemoteAgent="false"> |
|
||||
<Output TaskParameter="ResultUrl" PropertyName="MsDeployServiceUrl" /> |
|
||||
</NormalizeServiceUrl> |
|
||||
<!-- Data Passed to MSDeploy --> |
|
||||
<ItemGroup> |
|
||||
<MsDeploySourceProviderSetting Include="IisApp"> |
|
||||
<Path>$(PublishOutputPath)$(WebRoot)</Path> |
|
||||
</MsDeploySourceProviderSetting> |
|
||||
<MsDeployDestinationProviderSetting Include="IisApp"> |
|
||||
<Path>$(DeployIisAppPath)</Path> |
|
||||
<ComputerName>$(MsDeployServiceUrl)</ComputerName> |
|
||||
<UserName>$(UserName)</UserName> |
|
||||
<Password>$(Password)</Password> |
|
||||
<IncludeAcls>False</IncludeAcls> |
|
||||
<AuthType>Basic</AuthType> |
|
||||
</MsDeployDestinationProviderSetting> |
|
||||
</ItemGroup> |
|
||||
|
|
||||
<PropertyGroup> |
|
||||
<PublishEnableLinks Condition=" '$(PublishEnableLinks)' == '' ">contentLibExtension</PublishEnableLinks> |
|
||||
<RetryAttemptsForDeployment Condition=" '$(RetryAttemptsForDeployment)' == '' ">2</RetryAttemptsForDeployment> |
|
||||
<MsDeployDoNotDeleteRule Condition="$(SkipExtraFilesOnServer) == 'true'">DoNotDeleteRule</MsDeployDoNotDeleteRule> |
|
||||
<_EnableRuleList>$(MsDeployDoNotDeleteRule)</_EnableRuleList> |
|
||||
|
|
||||
<MSDeployUseChecksum Condition=" '$(MSDeployUseChecksum)' == '' ">false</MSDeployUseChecksum> |
|
||||
<AllowUntrustedCertificate Condition=" '$(AllowUntrustedCertificate)' == '' ">false</AllowUntrustedCertificate> |
|
||||
|
|
||||
<!-- UserAgent string sent to msdeploy --> |
|
||||
<_MSDeployUserAgentSource Condition=" '$(BuildingInsideVisualStudio)' != 'true'">$(VisualStudioVersion):CmdLine</_MSDeployUserAgentSource> |
|
||||
<_MSDeployUserAgentSource Condition=" '$(BuildingInsideVisualStudio)' == 'true'">$(VisualStudioVersion):PublishDialog</_MSDeployUserAgentSource> |
|
||||
<_MSDeployUserAgent>VS$(_MSDeployUserAgentSource)</_MSDeployUserAgent> |
|
||||
</PropertyGroup> |
|
||||
|
|
||||
<VSMSDeploy |
|
||||
Condition=" '$(FilePreview)' == 'true' Or '$(UsePowerShell)' != 'true'" |
|
||||
Source="@(MsDeploySourceProviderSetting)" |
|
||||
Destination="@(MsDeployDestinationProviderSetting)" |
|
||||
EnableLink="$(PublishEnableLinks)" |
|
||||
AllowUntrustedCertificate="$(AllowUntrustedCertificate)" |
|
||||
BuildingInsideVisualStudio="$(BuildingInsideVisualStudio)" |
|
||||
SkipExtraFilesOnServer="$(SkipExtraFilesOnServer)" |
|
||||
SkipRuleItems="@(MsDeploySkipRules)" |
|
||||
WhatIf="$(FilePreview)" |
|
||||
RetryAttempts="$(RetryAttemptsForDeployment)" |
|
||||
EnableMSDeployBackup="$(EnableMSDeployBackup)" |
|
||||
UseChecksum="$(MSDeployUseChecksum)" |
|
||||
UserAgent="$(_MSDeployUserAgent)" |
|
||||
InvokedByPublish="true"> |
|
||||
<Output TaskParameter="Result" PropertyName="_PublishResult" /> |
|
||||
</VSMSDeploy> |
|
||||
|
|
||||
</Target> |
|
||||
|
|
||||
<!-- |
|
||||
*********************************************************************************************** |
|
||||
TARGET : Package Publish |
|
||||
*********************************************************************************************** |
|
||||
--> |
|
||||
<PropertyGroup> |
|
||||
<PackagePublishDependsOn> |
|
||||
$(PackagePublishDependsOn); |
|
||||
FileSystemPublish |
|
||||
</PackagePublishDependsOn> |
|
||||
</PropertyGroup> |
|
||||
|
|
||||
<Target Name="PackagePublish" DependsOnTargets="$(PackagePublishDependsOn)"> |
|
||||
|
|
||||
<PropertyGroup> |
|
||||
<PackagePowerShellScriptFile Condition= "'$(PackagePowerShellScriptFile)'=='' ">$([System.IO.Path]::GetFullPath($(MSBuildThisFileDirectory)..\Web\Powershell\1.0.1\default-publish.ps1))</PackagePowerShellScriptFile> |
|
||||
<PackagePubxmlFile Condition=" '$(PackagePubxmlFile)'=='' ">$([System.IO.Path]::GetFullPath($(MSBuildThisFileDirectory)..\Web\Powershell\1.0.1\package.pubxml))</PackagePubxmlFile> |
|
||||
</PropertyGroup> |
|
||||
|
|
||||
<MSBuild Projects ="$(MSBuildProjectFullPath)" |
|
||||
Targets="PowerShellPublish" |
|
||||
Properties="UsePowerShell=true; |
|
||||
FilePreview=false; |
|
||||
PowerShellScriptFile=$(PackagePowerShellScriptFile); |
|
||||
WebPublishProfileFile=$(PackagePubxmlFile);" /> |
|
||||
|
|
||||
</Target> |
|
||||
|
|
||||
<!-- |
|
||||
*********************************************************************************************** |
|
||||
TARGET : Default Publish |
|
||||
*********************************************************************************************** |
|
||||
--> |
|
||||
<PropertyGroup> |
|
||||
<DefaultPublishDependsOn> |
|
||||
$(DefaultPublishDependsOn); |
|
||||
FileSystemPublish |
|
||||
</DefaultPublishDependsOn> |
|
||||
</PropertyGroup> |
|
||||
|
|
||||
<Target Name="DefaultPublish" DependsOnTargets="$(DefaultPublishDependsOn)"> |
|
||||
|
|
||||
<PropertyGroup> |
|
||||
<DefaultPowerShellScriptFile Condition= "'$(DefaultPowerShellScriptFile)'=='' ">$([System.IO.Path]::GetFullPath($(MSBuildThisFileDirectory)..\Web\Powershell\1.0.1\default-publish.ps1))</DefaultPowerShellScriptFile> |
|
||||
<DefaultPubxmlFile Condition=" '$(DefaultPubxmlFile)'=='' ">$([System.IO.Path]::GetFullPath($(MSBuildThisFileDirectory)..\Web\Powershell\1.0.1\FileSystem.pubxml))</DefaultPubxmlFile> |
|
||||
</PropertyGroup> |
|
||||
|
|
||||
<MSBuild Projects ="$(MSBuildProjectFullPath)" |
|
||||
Targets="PowerShellPublish" |
|
||||
Properties="UsePowerShell=true; |
|
||||
FilePreview=false; |
|
||||
PowerShellScriptFile=$(DefaultPowerShellScriptFile); |
|
||||
WebPublishProfileFile=$(DefaultPubxmlFile);" /> |
|
||||
|
|
||||
<ItemGroup> |
|
||||
<SourceFiles Include="$(DefaultPowerShellScriptFile)"/> |
|
||||
<SourceFiles Include="$(DefaultPubxmlFile)"/> |
|
||||
<SourceFiles Include="$(MSBuildProjectDirectory)\Properties\PublishProfiles\*.*"/> |
|
||||
</ItemGroup> |
|
||||
|
|
||||
<Copy |
|
||||
SourceFiles="@(SourceFiles)" |
|
||||
DestinationFolder="$(OutDir)\$(Configuration)\PublishProfiles\" /> |
|
||||
</Target> |
|
||||
|
|
||||
<!-- |
|
||||
*********************************************************************************************** |
|
||||
TARGET : PowerShell Publish |
|
||||
*********************************************************************************************** |
|
||||
--> |
|
||||
|
|
||||
<Target Name="PowerShellPublish" Condition=" '$(FilePreview)' != 'true' And '$(UsePowerShell)' == 'true' " > |
|
||||
<PropertyGroup> |
|
||||
<PowerShellScriptFile Condition= "'$(PowerShellScriptFile)'=='' ">$([System.String]::Copy('$(WebPublishProfileFile)').Replace('.pubxml','-publish.ps1'))</PowerShellScriptFile> |
|
||||
<!-- If a .ps1 file is present in the PublishProfiles folder with format <publishprofile>-publish.ps1, then the generated powershell script will be overridden with this file --> |
|
||||
<PowerShellScript Condition="Exists('$(PowerShellScriptFile)')" >$([System.IO.File]::ReadAllText($(PowerShellScriptFile)))</PowerShellScript> |
|
||||
</PropertyGroup> |
|
||||
|
|
||||
<GetAllPublishProperties |
|
||||
PublishProfilePath="$(WebPublishProfileFile)" > |
|
||||
<Output TaskParameter="AllPublishProperties" ItemName="_PublishProperties" /> |
|
||||
</GetAllPublishProperties> |
|
||||
|
|
||||
<ItemGroup> |
|
||||
<PublishPropertiesOverride Include="%(_PublishProperties.Identity)"> |
|
||||
<Value>$(%(_PublishProperties.Identity))</Value> |
|
||||
</PublishPropertiesOverride> |
|
||||
</ItemGroup> |
|
||||
|
|
||||
<InvokePowerShell |
|
||||
Script="$(PowerShellScript)" |
|
||||
PublishProfilePath="$(WebPublishProfileFile)" |
|
||||
PackOutput="$(PublishOutputPath)" |
|
||||
ProjectPath="$(MSBuildProjectDirectory)" |
|
||||
Password ="$(Password)" |
|
||||
MSDeployPath ="$(MSDeployPath)" |
|
||||
PublishPropertiesOverride ="@(PublishPropertiesOverride)"/> |
|
||||
</Target> |
|
||||
|
|
||||
<!--================================================--> |
|
||||
<!--Create skip rules used in sample script generation as well as publish--> |
|
||||
<!--================================================--> |
|
||||
<Target Name="GenerateSkipRuleForAppData" Condition="$(ExcludeApp_Data) == 'true'"> |
|
||||
<EscapeTextForRegularExpressions Text="$(PublishOutputPath)"> |
|
||||
<Output TaskParameter="Result" PropertyName="_Escaped_PublishOutputPath" /> |
|
||||
</EscapeTextForRegularExpressions> |
|
||||
<ItemGroup> |
|
||||
<MsDeploySkipRules Include="SkipAppDataOnDeploy"> |
|
||||
<SkipAction></SkipAction> |
|
||||
<ObjectName>dirPath</ObjectName> |
|
||||
<AbsolutePath>$(_Escaped_PublishOutputPath)\\App_Data$</AbsolutePath> |
|
||||
<Apply>Source</Apply> |
|
||||
<XPath></XPath> |
|
||||
</MsDeploySkipRules> |
|
||||
</ItemGroup> |
|
||||
</Target> |
|
||||
|
|
||||
<!-- |
|
||||
*********************************************************************************************** |
|
||||
Item Definitions |
|
||||
*********************************************************************************************** |
|
||||
--> |
|
||||
|
|
||||
<ItemDefinitionGroup> |
|
||||
<MsDeploySourceProviderSetting> |
|
||||
<Path></Path> |
|
||||
<ComputerName></ComputerName> |
|
||||
<!--<Wmsvc></Wmsvc> Not supported yet--> |
|
||||
<UserName></UserName> |
|
||||
<Password></Password> |
|
||||
<EncryptPassword></EncryptPassword> |
|
||||
<IncludeAcls></IncludeAcls> |
|
||||
<authType></authType> |
|
||||
<prefetchPayload></prefetchPayload> |
|
||||
</MsDeploySourceProviderSetting> |
|
||||
</ItemDefinitionGroup> |
|
||||
<ItemDefinitionGroup> |
|
||||
<MsDeployDestinationProviderSetting> |
|
||||
<Path></Path> |
|
||||
<ComputerName></ComputerName> |
|
||||
<!--<Wmsvc></Wmsvc> Not supported yet--> |
|
||||
<UserName></UserName> |
|
||||
<Password></Password> |
|
||||
<EncryptPassword></EncryptPassword> |
|
||||
<IncludeAcls></IncludeAcls> |
|
||||
<authType></authType> |
|
||||
<prefetchPayload></prefetchPayload> |
|
||||
</MsDeployDestinationProviderSetting> |
|
||||
</ItemDefinitionGroup> |
|
||||
<!-- |
|
||||
DeploymentSkipRule(string skipAction, string objectName, string absolutePath, string XPath);--> |
|
||||
<ItemDefinitionGroup> |
|
||||
<MsDeploySkipRules> |
|
||||
<SkipAction></SkipAction> |
|
||||
<ObjectName></ObjectName> |
|
||||
<AbsolutePath></AbsolutePath> |
|
||||
<XPath></XPath> |
|
||||
<KeyAttribute></KeyAttribute> |
|
||||
<!--Source, Destination, Both(the default)--> |
|
||||
<Apply></Apply> |
|
||||
</MsDeploySkipRules> |
|
||||
</ItemDefinitionGroup> |
|
||||
|
|
||||
<!-- The build process can be extended in a similar way as MS.Common.targets --> |
|
||||
<PropertyGroup> |
|
||||
<ImportByWildcardAfterMicrosoftWebPublishingTargets Condition="'$(ImportByWildcardAfterMicrosoftWebPublishingTargets)'==''">true</ImportByWildcardAfterMicrosoftWebPublishingTargets> |
|
||||
</PropertyGroup> |
|
||||
|
|
||||
<Import Project="$(MSBuildThisFileDirectory)\$(MSBuildThisFileName)\ImportAfter\*" Condition="'$(ImportByWildcardAfterMicrosoftWebPublishingTargets)' == 'true' and exists('$(MSBuildThisFileDirectory)\$(MSBuildThisFileName)\ImportAfter')"/> |
|
||||
</Project> |
|
||||
Binary file not shown.
File diff suppressed because it is too large
@ -1,300 +0,0 @@ |
|||||
<!-- |
|
||||
*********************************************************************************************** |
|
||||
Microsoft.Web.AzureAD.Publishing.targets |
|
||||
|
|
||||
WARNING: DO NOT MODIFY this file unless you are knowledgeable about MSBuild and have |
|
||||
created a backup copy. Incorrect changes to this file will make it |
|
||||
impossible to load or build your web deploy projects from the command-line or the IDE. |
|
||||
|
|
||||
Copyright (C) Microsoft Corporation. All rights reserved. |
|
||||
*********************************************************************************************** |
|
||||
--> |
|
||||
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> |
|
||||
<!--********************************************************************--> |
|
||||
<!-- This will create the parameters required when publishing an web app leveraging |
|
||||
Windows Azure Active Directory for auth --> |
|
||||
<PropertyGroup> |
|
||||
<PipelineTransformPhaseDependsOn>$(PipelineTransformPhaseDependsOn);_TransformWebConfigForAzureAuthentication</PipelineTransformPhaseDependsOn> |
|
||||
</PropertyGroup> |
|
||||
<Target Name="_TransformWebConfigForAzureAuthenticationCore"> |
|
||||
<PropertyGroup> |
|
||||
<_WebConfigTransformFolderForAzureAuthentication>$(_WPPDefaultIntermediateOutputPath)WebConfigTransformFolderForAzureAuthentication</_WebConfigTransformFolderForAzureAuthentication> |
|
||||
</PropertyGroup> |
|
||||
<ItemGroup> |
|
||||
<_WebConfigsToTransformForAzureAuthentication Include="@(FilesForPackagingFromProject)" |
|
||||
Condition="'%(FilesForPackagingFromProject.Filename)%(FilesForPackagingFromProject.Extension)'=='$(ProjectConfigFileName)' |
|
||||
And !%(FilesForPackagingFromProject.Exclude) |
|
||||
And '%(DestinationRelativePath)' == '$(ProjectConfigFileName)'"> |
|
||||
<TransformOriginalFolder>$(_WebConfigTransformFolderForAzureAuthentication)\original</TransformOriginalFolder> |
|
||||
<TransformFileFolder>$(_WebConfigTransformFolderForAzureAuthentication)\assist</TransformFileFolder> |
|
||||
<TransformOutputFile>$(_WebConfigTransformFolderForAzureAuthentication)\transformed\%(DestinationRelativePath)</TransformOutputFile> |
|
||||
<TransformScope>$([System.IO.Path]::GetFullPath($(WPPAllFilesInSingleFolder)\%(DestinationRelativePath)))</TransformScope> |
|
||||
</_WebConfigsToTransformForAzureAuthentication> |
|
||||
<_WebConfigsToTransformForAzureAuthenticationOuputFiles Include="@(_WebConfigsToTransformForAzureAuthentication->'%(TransformOutputFile)')"> |
|
||||
</_WebConfigsToTransformForAzureAuthenticationOuputFiles> |
|
||||
</ItemGroup> |
|
||||
|
|
||||
<PropertyGroup> |
|
||||
<_WebConfigsToTransformForAzureAuthenticationOuputDirectories>@(_WebConfigsToTransformForAzureAuthenticationOuputFiles->'%(RootDir)%(Directory)')</_WebConfigsToTransformForAzureAuthenticationOuputDirectories> |
|
||||
<_WebConfigsToTransformForAzureAuthenticationOuput>@(_WebConfigsToTransformForAzureAuthentication->'%(TransformOutputFile)');</_WebConfigsToTransformForAzureAuthenticationOuput> |
|
||||
</PropertyGroup> |
|
||||
|
|
||||
<ItemGroup> |
|
||||
<_WebConfigsToTransformForAzureAuthenticationOuputDirectories Include="$(_WebConfigsToTransformForAzureAuthenticationOuputDirectories)" /> |
|
||||
</ItemGroup> |
|
||||
|
|
||||
<!-- Make sure required directories exist --> |
|
||||
<MakeDir Directories="@(_WebConfigsToTransformForAzureAuthenticationOuputDirectories)" Condition="!Exists(%(Identity))"/> |
|
||||
|
|
||||
<!-- Copy the original web.config --> |
|
||||
<CopyPipelineFiles PipelineItems="@(_WebConfigsToTransformForAzureAuthentication)" |
|
||||
SourceDirectory="$(WebPublishPipelineProjectDirectory)" |
|
||||
TargetDirectory="%(TransformOriginalFolder)" |
|
||||
SkipMetadataExcludeTrueItems="True" |
|
||||
UpdateItemSpec="False" |
|
||||
DeleteItemsMarkAsExcludeTrue ="True" |
|
||||
Condition="'@(_WebConfigsToTransformForAzureAuthentication)' != ''"> |
|
||||
<Output TaskParameter="UpdatedPipelineItems" ItemName="_UpdatedWebConfigsToTransformForAzureAuthentication"/> |
|
||||
</CopyPipelineFiles> |
|
||||
|
|
||||
<!-- Delete those web.config have been updated if existed--> |
|
||||
<Delete Files="@(_WebConfigsToTransformForAzureAuthenticationOuputDirectories->'%(TransformOutputFile)')" /> |
|
||||
|
|
||||
<ItemGroup> |
|
||||
<MSDeployParameterValue Include="AD_APPIDUri"> |
|
||||
<ParameterValue>$(ADAppIDUri)</ParameterValue> |
|
||||
</MSDeployParameterValue> |
|
||||
</ItemGroup> |
|
||||
|
|
||||
<PropertyGroup> |
|
||||
<RemoveCertValidationElement Condition="'$(RemoveCertValidationElement)'=='' ">false</RemoveCertValidationElement> |
|
||||
<_RemoveCertificateValidationTransform Condition="'$(RemoveCertValidationElement)' == 'true'"><certificateValidation certificateValidationMode="None" xdt:Transform="Remove" /></_RemoveCertificateValidationTransform> |
|
||||
<_RemoveExistingAudienceUrisTransform Condition="'$(PreserveExistingAudienceUris)' != 'true'"><add xdt:Transform="RemoveAll" /></_RemoveExistingAudienceUrisTransform> |
|
||||
</PropertyGroup> |
|
||||
|
|
||||
<PropertyGroup> |
|
||||
<_ReplaceRealmAndAudienceUriAppSetting Condition="'$(ADWebAPIBased)'!='true' And '$(ADUsesOwinOrOpenIdConnect)'!='true'"> |
|
||||
<appSettings> |
|
||||
<add key="ida:AudienceUri" |
|
||||
value="{% parameter='AD_AudienceUriAppSetting' xpathlocator='key' description='AD Audience Uri App Setting' defaultValue='%24(value)' tags='AD_AudienceUriAppSetting' %}" |
|
||||
xdt:Transform="SetTokenizedAttributes(value)" xdt:SupressWarnings="True" xdt:Locator="Match(key)"/> |
|
||||
<add key="ida:Realm" |
|
||||
value="{% parameter='AD_RealmAppSetting' xpathlocator='key' description='AD Realm App Setting' defaultValue='%24(value)' tags='AD_RealmAppSetting' %}" |
|
||||
xdt:Transform="SetTokenizedAttributes(value)" xdt:SupressWarnings="True" xdt:Locator="Match(key)"/> |
|
||||
<add key="ida:FederationMetadataLocation" |
|
||||
value="{% parameter='AD_MetadataUrl' xpathlocator='key' description='AD MetadataUrl App Setting' defaultValue='%24(value)' tags='AD_MetadataUrlAppSetting' %}" |
|
||||
xdt:Transform="SetTokenizedAttributes(value)" xdt:SupressWarnings="True" xdt:Locator="Match(key)"/> |
|
||||
</appSettings> |
|
||||
</_ReplaceRealmAndAudienceUriAppSetting> |
|
||||
<_ReplaceADClientID Condition="'$(ADClientAPPID)'!='' And '$(ADUsesOwinOrOpenIdConnect)'!='true'"> |
|
||||
<appSettings> |
|
||||
<add key="ida:ClientID" |
|
||||
value="{% parameter='AD_ClientID' xpathlocator='key' description='AD Client Application ID' defaultValue='%24(value)' tags='AD_ClientAPPID' %}" |
|
||||
xdt:Transform="SetTokenizedAttributes(value)" xdt:SupressWarnings="True" xdt:Locator="Match(key)"/> |
|
||||
</appSettings> |
|
||||
</_ReplaceADClientID> |
|
||||
<_ReplaceADClientPassword Condition="'$(ADClientPassword)'!='' And '$(ADUsesOwinOrOpenIdConnect)'!='true'"> |
|
||||
<appSettings> |
|
||||
<add key="ida:Password" |
|
||||
value="{% parameter='AD_ClientPassword' xpathlocator='key' description='AD Client Password' defaultValue='%24(value)' tags='AD_Password' %}" |
|
||||
xdt:Transform="SetTokenizedAttributes(value)" xdt:SupressWarnings="True" xdt:Locator="Match(key)"/> |
|
||||
</appSettings> |
|
||||
</_ReplaceADClientPassword> |
|
||||
<_ReplaceADWebAPIAudienceAppSetting Condition="'$(ADWebAPIBased)'=='true' And '$(ADUsesOwinOrOpenIdConnect)'!='true'"> |
|
||||
<appSettings> |
|
||||
<add key="ida:Audience" |
|
||||
value="{% parameter='AD_WebAPI_Audience' xpathlocator='key' description='AD Web API Audience' defaultValue='%24(value)' tags='AD_WebAPI_Audience' %}" |
|
||||
xdt:Transform="SetTokenizedAttributes(value)" xdt:SupressWarnings="True" xdt:Locator="Match(key)"/> |
|
||||
</appSettings> |
|
||||
</_ReplaceADWebAPIAudienceAppSetting> |
|
||||
<_ReplaceADWIFArtifacts Condition="'$(ADWebAPIBased)'!='true' And '$(ADUsesOwinOrOpenIdConnect)'!='true'"> |
|
||||
<system.identityModel> |
|
||||
<identityConfiguration> |
|
||||
$(_RemoveCertificateValidationTransform) |
|
||||
<audienceUris> |
|
||||
$(_RemoveExistingAudienceUrisTransform) |
|
||||
<add |
|
||||
value="APPIDUri" |
|
||||
xdt:Transform="Insert" xdt:SupressWarnings="True" /> |
|
||||
</audienceUris> |
|
||||
|
|
||||
<audienceUris> |
|
||||
<add |
|
||||
value="{% token='%24(value)' parameter='AD_%24(value)' xpathlocator='value' description='AD AppIDUri' defaultValue='%24(value)' tags='ADrealmUri' %}" |
|
||||
xdt:Transform="SetTokenizedAttributes(value)" xdt:SupressWarnings="True" /> |
|
||||
</audienceUris> |
|
||||
|
|
||||
</identityConfiguration> |
|
||||
</system.identityModel> |
|
||||
<system.identityModel.services> |
|
||||
<federationConfiguration> |
|
||||
<wsFederation |
|
||||
realm="{% xpathlocator='requireHttps' parameter='AD_APPIDUri' description='AD AppIDUri' defaultValue='%24(realm)' tags='ADAPPIDUri' %}" |
|
||||
xdt:Transform="SetTokenizedAttributes(realm)" xdt:SupressWarnings="True" /> |
|
||||
<wsFederation |
|
||||
issuer="{% xpathlocator='requireHttps' parameter='AD_Issuer' description='AD Issuer' defaultValue='%24(issuer)' tags='ADISSUER' %}" |
|
||||
xdt:Transform="SetTokenizedAttributes(issuer)" xdt:SupressWarnings="True" /> |
|
||||
</federationConfiguration> |
|
||||
</system.identityModel.services> |
|
||||
</_ReplaceADWIFArtifacts> |
|
||||
<_ReplaceADClientIDDev14 Condition="'$(ADClientAPPID)'!='' And '$(ADUsesOwinOrOpenIdConnect)'=='true'"> |
|
||||
<appSettings> |
|
||||
<add key="ida:ClientId" |
|
||||
value="{% parameter='AD_ClientID' xpathlocator='key' description='AD Client Application ID' defaultValue='%24(value)' tags='AD_ClientAPPID' %}" |
|
||||
xdt:Transform="SetTokenizedAttributes(value)" xdt:SupressWarnings="True" xdt:Locator="Match(key)"/> |
|
||||
</appSettings> |
|
||||
</_ReplaceADClientIDDev14> |
|
||||
<_ReplaceADClientPasswordDev14 Condition="'$(ADClientPassword)'!='' And '$(ADUsesOwinOrOpenIdConnect)'=='true'"> |
|
||||
<appSettings> |
|
||||
<add key="ida:ClientSecret" |
|
||||
value="{% parameter='AD_ClientPassword' xpathlocator='key' description='AD Client Password' defaultValue='%24(value)' tags='AD_Password' %}" |
|
||||
xdt:Transform="SetTokenizedAttributes(value)" xdt:SupressWarnings="True" xdt:Locator="Match(key)"/> |
|
||||
</appSettings> |
|
||||
</_ReplaceADClientPasswordDev14> |
|
||||
<_ReplaceADTenantIdDev14 Condition="'$(ADTenantId)'!='' And '$(ADUsesOwinOrOpenIdConnect)'=='true'"> |
|
||||
<appSettings> |
|
||||
<add key="ida:TenantId" |
|
||||
value="{% parameter='AD_TenantId' xpathlocator='key' description='AD Tenant Id' defaultValue='%24(value)' tags='AD_TenantId' %}" |
|
||||
xdt:Transform="SetTokenizedAttributes(value)" xdt:SupressWarnings="True" xdt:Locator="Match(key)"/> |
|
||||
</appSettings> |
|
||||
</_ReplaceADTenantIdDev14> |
|
||||
<_ReplaceADDomainDev14 Condition="'$(ADDomain)'!='' And '$(ADUsesOwinOrOpenIdConnect)'=='true'"> |
|
||||
<appSettings> |
|
||||
<add key="ida:Domain" |
|
||||
value="{% parameter='AD_Domain' xpathlocator='key' description='AD Domain' defaultValue='%24(value)' tags='AD_Domain' %}" |
|
||||
xdt:Transform="SetTokenizedAttributes(value)" xdt:SupressWarnings="True" xdt:Locator="Match(key)"/> |
|
||||
</appSettings> |
|
||||
</_ReplaceADDomainDev14> |
|
||||
<_ReplaceADPostLogoutRedirectUriDev14 Condition="'$(ADPostLogoutRedirectUri)'!='' And '$(ADUsesOwinOrOpenIdConnect)'=='true'"> |
|
||||
<appSettings> |
|
||||
<add key="ida:PostLogoutRedirectUri" |
|
||||
value="{% parameter='AD_PostLogoutRedirectUri' xpathlocator='key' description='AD PostLogoutRedirectUri' defaultValue='%24(value)' tags='AD_PostLogoutRedirectUri' %}" |
|
||||
xdt:Transform="SetTokenizedAttributes(value)" xdt:SupressWarnings="True" xdt:Locator="Match(key)"/> |
|
||||
</appSettings> |
|
||||
</_ReplaceADPostLogoutRedirectUriDev14> |
|
||||
</PropertyGroup> |
|
||||
|
|
||||
<ItemGroup> |
|
||||
<MSDeployParameterValue Include="AD_ClientID" Condition="'$(ADClientAPPID)'!=''"> |
|
||||
<ParameterValue>$(ADClientAPPID)</ParameterValue> |
|
||||
</MSDeployParameterValue> |
|
||||
<MSDeployParameterValue Include="AD_Issuer" Condition="'$(ADIssuer)'!=''"> |
|
||||
<ParameterValue>$(ADIssuer)</ParameterValue> |
|
||||
</MSDeployParameterValue> |
|
||||
<MSDeployParameterValue Include="AD_MetadataUrl" Condition="'$(ADDomain)'!=''"> |
|
||||
<ParameterValue>https://login.windows.net/$(ADDomain)/FederationMetadata/2007-06/FederationMetadata.xml</ParameterValue> |
|
||||
</MSDeployParameterValue> |
|
||||
<MSDeployParameterValue Include="AD_ClientPassword" Condition="'$(ADClientPassword)'!=''"> |
|
||||
<ParameterValue>$(ADClientPassword)</ParameterValue> |
|
||||
</MSDeployParameterValue> |
|
||||
<MSDeployParameterValue Include="AD_WebAPI_Audience" Condition="'$(ADWebAPIBased)'=='true'"> |
|
||||
<ParameterValue>$(ADAppIDUri)</ParameterValue> |
|
||||
</MSDeployParameterValue> |
|
||||
<MSDeployParameterValue Include="AD_RealmAppSetting" Condition="'$(ADWebAPIBased)'!='true'"> |
|
||||
<ParameterValue>$(ADAppIDUri)</ParameterValue> |
|
||||
</MSDeployParameterValue> |
|
||||
<MSDeployParameterValue Include="AD_AudienceUriAppSetting" Condition="'$(ADWebAPIBased)'!='true'"> |
|
||||
<ParameterValue>$(ADAppIDUri)</ParameterValue> |
|
||||
</MSDeployParameterValue> |
|
||||
<MSDeployParameterValue Include="AD_TenantId" Condition="'$(ADTenantId)'!=''"> |
|
||||
<ParameterValue>$(ADTenantId)</ParameterValue> |
|
||||
</MSDeployParameterValue> |
|
||||
<MSDeployParameterValue Include="AD_Domain" Condition="'$(ADDomain)'!=''"> |
|
||||
<ParameterValue>$(ADDomain)</ParameterValue> |
|
||||
</MSDeployParameterValue> |
|
||||
<MSDeployParameterValue Include="AD_PostLogoutRedirectUri" Condition="'$(ADPostLogoutRedirectUri)'!=''"> |
|
||||
<ParameterValue>$(ADPostLogoutRedirectUri)</ParameterValue> |
|
||||
</MSDeployParameterValue> |
|
||||
</ItemGroup> |
|
||||
|
|
||||
<CreateProperty Value="<?xml version="1.0"?> |
|
||||
<configuration xmlns:xdt="http://schemas.microsoft.com/XML-Document-Transform"> |
|
||||
$(_ReplaceRealmAndAudienceUriAppSetting) |
|
||||
$(_ReplaceADClientID) |
|
||||
$(_ReplaceADClientPassword) |
|
||||
$(_ReplaceADWebAPIAudienceAppSetting) |
|
||||
$(_ReplaceADWIFArtifacts) |
|
||||
$(_ReplaceADClientIDDev14) |
|
||||
$(_ReplaceADClientPasswordDev14) |
|
||||
$(_ReplaceADTenantIdDev14) |
|
||||
$(_ReplaceADDomainDev14) |
|
||||
$(_ReplaceADPostLogoutRedirectUriDev14) |
|
||||
</configuration>"> |
|
||||
<Output TaskParameter="Value" PropertyName="_WebConfigsTransformForAzureAuthentication"/> |
|
||||
</CreateProperty> |
|
||||
|
|
||||
<PropertyGroup> |
|
||||
<_WebConfigsToTransformForAzureAuthentication_Identity>%(_WebConfigsToTransformForAzureAuthentication.Identity)</_WebConfigsToTransformForAzureAuthentication_Identity> |
|
||||
<_WebConfigsToTransformForAzureAuthentication_TransformOutputFile>%(_WebConfigsToTransformForAzureAuthentication.TransformOutputFile)</_WebConfigsToTransformForAzureAuthentication_TransformOutputFile> |
|
||||
<_WebConfigsToTransformForAzureAuthentication_TransformScope>%(_WebConfigsToTransformForAzureAuthentication.TransformScope)</_WebConfigsToTransformForAzureAuthentication_TransformScope> |
|
||||
</PropertyGroup> |
|
||||
|
|
||||
<ParameterizeTransformXml |
|
||||
Source="$(_WebConfigsToTransformForAzureAuthentication_Identity)" |
|
||||
IsSourceAFile="True" |
|
||||
Transform="$(_WebConfigsTransformForAzureAuthentication)" |
|
||||
IsTransformAFile="False" |
|
||||
Destination="$(_WebConfigsToTransformForAzureAuthentication_TransformOutputFile)" |
|
||||
IsDestinationAFile="True" |
|
||||
Scope="$(_WebConfigsToTransformForAzureAuthentication_TransformScope)" |
|
||||
StackTrace="$(TransformWebConfigStackTraceEnabled)" |
|
||||
EnableTokenizeParameters="True" |
|
||||
SourceRootPath="$(WebPublishPipelineSourceRootDirectory)"> |
|
||||
<Output TaskParameter="DeclareParameters" ItemName="_ParamsFromWebConfigsToTransformForAzureAuthentication"/> |
|
||||
</ParameterizeTransformXml> |
|
||||
|
|
||||
<PropertyGroup> |
|
||||
<_WebConfigsToTransformForAzureAuthenticationOutputFolder>$(_WPPDefaultIntermediateOutputPath)AzureAuthentication</_WebConfigsToTransformForAzureAuthenticationOutputFolder> |
|
||||
<_WebConfigsToTransformForAzureAuthenticationOutputParametersFile>$(_WebConfigsToTransformForAzureAuthenticationOutputFolder)\TransformForAzureAuthentication.parameters.xml</_WebConfigsToTransformForAzureAuthenticationOutputParametersFile> |
|
||||
</PropertyGroup> |
|
||||
|
|
||||
<MakeDir Directories="$(_WebConfigsToTransformForAzureAuthenticationOutputFolder)" Condition="!Exists($(_WebConfigsToTransformForAzureAuthenticationOutputFolder))"/> |
|
||||
|
|
||||
<ExportParametersFile |
|
||||
Parameters="@(_ParamsFromWebConfigsToTransformForAzureAuthentication)" |
|
||||
DeclareParameterFile="$(_WebConfigsToTransformForAzureAuthenticationOutputParametersFile)" |
|
||||
GenerateFileEvenIfEmpty="True" |
|
||||
/> |
|
||||
|
|
||||
<ImportParametersFile Files="$(_WebConfigsToTransformForAzureAuthenticationOutputParametersFile)" |
|
||||
DisableEscapeMSBuildVariable="$(ImportParametersFile_DisableEscapeMSBuildVariable)" |
|
||||
Condition="!$(DisableAllVSGeneratedMSDeployParameter) And Exists($(_WebConfigsToTransformForAzureAuthenticationOutputParametersFile))" > |
|
||||
<Output TaskParameter="Result" ItemName="_ImportAutoParameterizeAzureAuthenticationWebConfig"/> |
|
||||
</ImportParametersFile> |
|
||||
|
|
||||
<ItemGroup> |
|
||||
<MsDeployDeclareParameters Include="@(_ImportAutoParameterizeAzureAuthenticationWebConfig)" Condition="'%(_ImportAutoParameterizeAzureAuthenticationWebConfig.Identity)' !=''"> |
|
||||
<Value>%(_ImportAutoParameterizeAzureAuthenticationWebConfig.DefaultValue)</Value> |
|
||||
<Priority>$(VsWebConfigAutoCsParametersPriority)</Priority> |
|
||||
</MsDeployDeclareParameters> |
|
||||
</ItemGroup> |
|
||||
</Target> |
|
||||
|
|
||||
<!--********************************************************************--> |
|
||||
<!-- Commit parameterized web.config into pipeline so later phase will pick up--> |
|
||||
<!--********************************************************************--> |
|
||||
<Target Name="_PostTransformWebConfigForAzureAuthentication"> |
|
||||
<ItemGroup> |
|
||||
<!--Remove untransformed Web.configs from the pipeline--> |
|
||||
<FilesForPackagingFromProject Remove="@(_WebConfigsToTransformForAzureAuthentication)" Condition="'@(_WebConfigsToTransformForAzureAuthentication)'!='' And !%(_WebConfigsToTransformForAzureAuthentication.Exclude) And Exists(%(_WebConfigsToTransformForAzureAuthentication.TransformOutputFile))"/> |
|
||||
<!--Add the transformed Web.configs at the new loction to the pipeline--> |
|
||||
<FilesForPackagingFromProject Include="@(_WebConfigsToTransformForAzureAuthentication->'%(TransformOutputFile)')" Condition="'@(_WebConfigsToTransformForAzureAuthentication)'!='' And !%(_WebConfigsToTransformForAzureAuthentication.Exclude) And Exists(%(_WebConfigsToTransformForAzureAuthentication.TransformOutputFile))"/> |
|
||||
</ItemGroup> |
|
||||
</Target> |
|
||||
|
|
||||
<PropertyGroup> |
|
||||
<_TransformWebConfigForAzureAuthenticationDependsOn> |
|
||||
_TransformWebConfigForAzureAuthenticationCore; |
|
||||
_PostTransformWebConfigForAzureAuthentication; |
|
||||
</_TransformWebConfigForAzureAuthenticationDependsOn> |
|
||||
</PropertyGroup> |
|
||||
|
|
||||
<!--********************************************************************--> |
|
||||
<!-- Entry point of parameterizing web.config containing Win Azure Active Directory (WAAD) related artifacts --> |
|
||||
<!--********************************************************************--> |
|
||||
<Target Name="_TransformWebConfigForAzureAuthentication" |
|
||||
DependsOnTargets="$(_TransformWebConfigForAzureAuthenticationDependsOn)" |
|
||||
Condition="('$(WebPublishMethod)' =='MsDeploy' or '$(WebPublishMethod)' =='Package') and '$(EnableADPublish)' =='true'"> |
|
||||
</Target> |
|
||||
|
|
||||
</Project> |
|
||||
Binary file not shown.
@ -1,530 +0,0 @@ |
|||||
<!-- |
|
||||
*********************************************************************************************** |
|
||||
Microsoft.WebDeploy.targets |
|
||||
|
|
||||
WARNING: DO NOT MODIFY this file unless you are knowledgeable about MSBuild and have |
|
||||
created a backup copy. Incorrect changes to this file will make it |
|
||||
impossible to load or build your web deploy projects from the command-line or the IDE. |
|
||||
|
|
||||
This file defines the steps in the standard build process for web deploy projects. |
|
||||
|
|
||||
Copyright (C) 2005 Microsoft Corporation. All rights reserved. |
|
||||
*********************************************************************************************** |
|
||||
--> |
|
||||
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> |
|
||||
|
|
||||
<UsingTask TaskName="FilterByItems" AssemblyFile="$(MSBuildThisFileDirectory)\Microsoft.Web.Publishing.Tasks.dll" Condition="Exists('Microsoft.Web.Publishing.Tasks.dll')"/> |
|
||||
<UsingTask TaskName="CollectFilesinFolder" AssemblyFile="$(MSBuildThisFileDirectory)\Microsoft.Web.Publishing.Tasks.dll" Condition="Exists('Microsoft.Web.Publishing.Tasks.dll')"/> |
|
||||
<UsingTask TaskName="CopyPipelineFiles" AssemblyFile="$(MSBuildThisFileDirectory)\Microsoft.Web.Publishing.Tasks.dll" Condition="Exists('Microsoft.Web.Publishing.Tasks.dll')"/> |
|
||||
|
|
||||
<!--***************************************************************--> |
|
||||
<!-- Setting up the property like MS.Common.Targets files has it. --> |
|
||||
<!--This is to handle some project doesn't include the MS.Common.Targets file--> |
|
||||
<!--***************************************************************--> |
|
||||
<PropertyGroup> |
|
||||
<_WebProjectType>WebSite</_WebProjectType> |
|
||||
<OutputPath Condition="'$(OutputPath)' == ''">$([System.IO.Path]::GetTempPath())WebSitePublish\$([System.IO.Path]::GetFileName($(MSBuildProjectDirectory)))-$(MSBuildProjectDirectory.GetHashCode())</OutputPath> |
|
||||
<OutputPath Condition="'$(OutputPath)' != '' and !HasTrailingSlash('$(OutputPath)')">$(OutputPath)\</OutputPath> |
|
||||
<OutDir Condition=" '$(OutDir)' == '' ">$(OutputPath)</OutDir> |
|
||||
<!-- Example, bin\Debug\. Ensure OutDir has a trailing slash, so it can be concatenated --> |
|
||||
<OutDir Condition="'$(OutDir)' != '' and !HasTrailingSlash('$(OutDir)')">$(OutDir)\</OutDir> |
|
||||
</PropertyGroup> |
|
||||
|
|
||||
<PropertyGroup Condition="'$(BaseIntermediateOutputPath)'=='' "> |
|
||||
<BaseIntermediateOutputPath>$(OutputPath)obj\</BaseIntermediateOutputPath> |
|
||||
<BaseIntermediateOutputPath Condition="!HasTrailingSlash('$(BaseIntermediateOutputPath)')">$(BaseIntermediateOutputPath)\</BaseIntermediateOutputPath> |
|
||||
</PropertyGroup> |
|
||||
|
|
||||
<PropertyGroup Condition=" '$(IntermediateOutputPath)' == '' "> |
|
||||
<IntermediateOutputPath Condition=" '$(PlatformName)' == 'AnyCPU' Or '$(PlatformName)' == ''">$(BaseIntermediateOutputPath)$(Configuration)\</IntermediateOutputPath> |
|
||||
<IntermediateOutputPath Condition=" '$(IntermediateOutputPath)' == '' ">$(BaseIntermediateOutputPath)$(PlatformName)\$(Configuration)\</IntermediateOutputPath> |
|
||||
<IntermediateOutputPath Condition="!HasTrailingSlash('$(IntermediateOutputPath)')">$(IntermediateOutputPath)\</IntermediateOutputPath> |
|
||||
</PropertyGroup> |
|
||||
|
|
||||
<Target Name="PrepareResourceNames" /> |
|
||||
<Target Name="ComputeIntermediateSatelliteAssemblies" /> |
|
||||
<Target Name="GetCopyToOutputDirectoryItems" /> |
|
||||
<Target Name="_SGenCheckForOutputs" /> |
|
||||
<Target Name="CreateManifestResourceNames" /> |
|
||||
|
|
||||
<!-- |
|
||||
============================================================ |
|
||||
Initialial setup |
|
||||
============================================================ |
|
||||
--> |
|
||||
<PropertyGroup> |
|
||||
<!-- Make sure OutputPath has a trailing slash on it --> |
|
||||
<WDOutDir Condition="'$(OutDir)' != '$(OutputPath)'">$(OutDir)</WDOutDir> |
|
||||
<CopyBeforeBuildTargetPath Condition="'$(CopyBeforeBuildTargetPath)' == ''">$(IntermediateOutputPath)AspnetCompileMerge\source</CopyBeforeBuildTargetPath> |
|
||||
<_WDPSourceWebPhysicalPath>$(SourceWebPhysicalPath)</_WDPSourceWebPhysicalPath> |
|
||||
<TempBuildDir Condition="'$(TempBuildDir)' == ''" >$(IntermediateOutputPath)TempBuildDir</TempBuildDir> |
|
||||
<_ExcludeAppOffline Condition="'$(_ExcludeAppOffline)' ==''">true</_ExcludeAppOffline> |
|
||||
<_ExcludeWebInfo Condition="'$(_ExcludeWebInfo)' ==''">true</_ExcludeWebInfo> |
|
||||
</PropertyGroup> |
|
||||
|
|
||||
<PropertyGroup> |
|
||||
<_SkipHiddenItems Condition="'$(_SkipHiddenItems)'==''">true</_SkipHiddenItems> |
|
||||
</PropertyGroup> |
|
||||
<ItemGroup> |
|
||||
<ExcludeFromPackageFiles Include="$(SourceWebPhysicalPath)\App_Data\PublishProfiles\**\*.*"/> |
|
||||
<ExcludeFromPackageFiles Include="$(SourceWebPhysicalPath)\*.publishproj"/> |
|
||||
<ExcludeFromPackageFiles Include="$(SourceWebPhysicalPath)\app_offline.htm" Condition="'$(_ExcludeAppOffline)'== 'true'"/> |
|
||||
<ExcludeFromPackageFiles Include="$(SourceWebPhysicalPath)\Bin\*.refresh" /> |
|
||||
<ExcludeFromPackageFiles Include="$(SourceWebPhysicalPath)\**\*.exclude" /> |
|
||||
<ExcludeFromPackageFiles Include="$(SourceWebPhysicalPath)\**\*.webinfo" Condition="'$(_ExcludeWebInfo)'=='true'" /> |
|
||||
</ItemGroup> |
|
||||
|
|
||||
<PropertyGroup Condition="'$(SourceWebMetabasePath)' != ''"> |
|
||||
<UseIis Condition="'$(UseIis)'==''">True</UseIis> |
|
||||
<IisUrl Condition="'$(IisUrl)'==''">$(SourceWebProjectPath)</IisUrl> |
|
||||
</PropertyGroup> |
|
||||
|
|
||||
<PropertyGroup Condition="'$(SourceWebMetabasePath)' == ''"> |
|
||||
<UseIis Condition="'$(UseIis)'==''">false</UseIis> |
|
||||
</PropertyGroup> |
|
||||
|
|
||||
<!-- Create the output path as an item so that we can use %(FullPath) on it. --> |
|
||||
<!-- _PublishedWebsites folder enables team build scenarios when OutDir is overiden --> |
|
||||
<ItemGroup> |
|
||||
<_WDOutputPathItem Condition="'$(WDOutDir)' != '' and !HasTrailingSlash('$(WDOutDir)')" Include="$(WDOutDir)\_PublishedWebsites\$(MSBuildProjectName)\"/> |
|
||||
<_WDOutputPathItem Condition="'$(WDOutDir)' != '' and HasTrailingSlash('$(WDOutDir)')" Include="$(WDOutDir)_PublishedWebsites\$(MSBuildProjectName)\"/> |
|
||||
<_WDOutputPathItem Condition="'$(WDOutDir)' == ''" Include="$(OutputPath)"/> |
|
||||
<_WDPSourceWebPathItem Include="$(_WDPSourceWebPhysicalPath)"/> |
|
||||
<_KeyFile Include="$(KeyFile)"/> |
|
||||
</ItemGroup> |
|
||||
|
|
||||
<!-- AvailablePlatforms is the list of platform targets available. --> |
|
||||
<PropertyGroup> |
|
||||
<AvailablePlatforms>Any CPU</AvailablePlatforms> |
|
||||
</PropertyGroup> |
|
||||
|
|
||||
<PropertyGroup> |
|
||||
<WDTargetDir Condition="'$(WDTargetDir)' == ''">$(WDOutDir)\_PublishedWebsites\$(MSBuildProjectName)\</WDTargetDir> |
|
||||
<_FullSourceWebDir>$(_WDPSourceWebPhysicalPath)</_FullSourceWebDir> |
|
||||
<_FullKeyFile Condition="'$(KeyFile)' != ''">@(_KeyFile->'%(FullPath)')</_FullKeyFile> |
|
||||
</PropertyGroup> |
|
||||
|
|
||||
<!-- |
|
||||
The set of properties passed to the aspnet_compiler when merge is not enabled |
|
||||
--> |
|
||||
<PropertyGroup> |
|
||||
<_AspNetCompilerFixedNames Condition="'$(UseMerge)' != 'true'">$(UseFixedNames)</_AspNetCompilerFixedNames> |
|
||||
<_AspNetCompilerKeyContainer Condition="'$(UseMerge)' != 'true'">$(KeyContainer)</_AspNetCompilerKeyContainer> |
|
||||
<_AspNetCompilerMetabasePath Condition="'$(UseMetabasePath)' == 'true'">$(SourceWebMetabasePath)</_AspNetCompilerMetabasePath> |
|
||||
<_AspNetCompilerSourceWebPath Condition="'$(UseMetabasePath)' != 'true'">$(_FullSourceWebDir)</_AspNetCompilerSourceWebPath> |
|
||||
<_AspNetCompilerVirtualPath Condition="'$(UseMetabasePath)' != 'true'">$(SourceWebVirtualPath)</_AspNetCompilerVirtualPath> |
|
||||
</PropertyGroup> |
|
||||
|
|
||||
<PropertyGroup> |
|
||||
<BuildingProject>true</BuildingProject> |
|
||||
</PropertyGroup> |
|
||||
|
|
||||
<PropertyGroup> |
|
||||
<AddAdditionalExplicitAssemblyReferences>false</AddAdditionalExplicitAssemblyReferences> |
|
||||
</PropertyGroup> |
|
||||
<!-- |
|
||||
============================================================ |
|
||||
Basic Hook in for WPP |
|
||||
============================================================ |
|
||||
--> |
|
||||
<PropertyGroup> |
|
||||
<WebPublishPipelineProjectDirectory Condition="'$(WebPublishPipelineProjectDirectory)'==''">$(MSBuildProjectDirectory)</WebPublishPipelineProjectDirectory> |
|
||||
<DefaultDeployIisAppPhysicalPath Condition="'$(DefaultDeployIisAppPhysicalPath)'==''">$(MSBuildProjectDirectory)$(DefaultMsDeployAltSuffix)</DefaultDeployIisAppPhysicalPath> |
|
||||
<FilesToIncludeForPublish>AllFilesInProjectFolder</FilesToIncludeForPublish> |
|
||||
<!--We do want to exclude TransformAssistFile--> |
|
||||
<ExcludeTransformAssistFilesFromPublish Condition="'$(ExcludeTransformAssistFilesFromPublish)'==''">True</ExcludeTransformAssistFilesFromPublish> |
|
||||
<ExcludeGeneratedDebugSymbol Condition="'$(ExcludeGeneratedDebugSymbol)'=='' And '$(DebugSymbols)' == 'true'">False</ExcludeGeneratedDebugSymbol> |
|
||||
<ProjectParametersXMLFile Condition="'$(ProjectParametersXMLFile)'=='' And Exists('$(MSBuildProjectDirectory)\Parameters.xml')">$(OutputPath)\Parameters.xml</ProjectParametersXMLFile> |
|
||||
<_WDPDefaultIntermediateOutputPathPathRoot Condition="'$(_WPPDefaultIntermediateOutputPathPathRoot)' == ''">$(OutputPath)\</_WDPDefaultIntermediateOutputPathPathRoot> |
|
||||
</PropertyGroup> |
|
||||
|
|
||||
<PropertyGroup Condition="'$(_WDPDefaultIntermediateOutputPath)' == ''"> |
|
||||
<_WDPDefaultIntermediateOutputPath>$(IntermediateOutputPath)</_WDPDefaultIntermediateOutputPath> |
|
||||
<_WDPDefaultIntermediateOutputPath Condition="!$([System.IO.path]::IsPathRooted($(IntermediateOutputPath)))">$(_WDPDefaultIntermediateOutputPathPathRoot)$(IntermediateOutputPath)</_WDPDefaultIntermediateOutputPath> |
|
||||
</PropertyGroup> |
|
||||
|
|
||||
<!--******************************************************--> |
|
||||
<!--Include the WPP targets file--> |
|
||||
<!--******************************************************--> |
|
||||
<Import Project="$(MSBuildBinPath)\Microsoft.Common.targets" /> |
|
||||
<Import Project="Microsoft.Web.Publishing.targets" /> |
|
||||
|
|
||||
<PropertyGroup> |
|
||||
<!--In earlier version of WPP, Web.config transformation doesn't support anthing other than the Msbuild Project project folder to find the web.config--> |
|
||||
<PreTransformWebConfigDependsOn> |
|
||||
$(PreTransformWebConfigDependsOn); |
|
||||
FixupTransformAssistFilesAsExclude; |
|
||||
</PreTransformWebConfigDependsOn> |
|
||||
</PropertyGroup> |
|
||||
|
|
||||
<ItemGroup> |
|
||||
<_AllExecutableUnderBin Include="$(SourceWebPhysicalPath)\Bin\*.dll;$(SourceWebPhysicalPath)\Bin\*.exe"/> |
|
||||
<ExcludeFromPackageFiles Include="@(_AllExecutableUnderBin -> '%(RelativeDir)%(FileName).xml')" Condition=" '$(ExcludeXmlAssemblyFiles)'=='true' "/> |
|
||||
</ItemGroup> |
|
||||
|
|
||||
<Target Name="FixupTransformAssistFilesAsExclude" |
|
||||
DependsOnTargets="CollectWebConfigsToTransform" |
|
||||
Condition="'$(FixupTransformAssistFilesAsExclude)' != 'False'"> |
|
||||
<PropertyGroup> |
|
||||
<_WDP_IdentifyTransformAssistFile>web\.[^\\\.]*\.config$</_WDP_IdentifyTransformAssistFile> |
|
||||
</PropertyGroup> |
|
||||
<!--Find all item with web.*.config--> |
|
||||
<CollectFilesinFolder RootPath="$(WebPublishPipelineProjectDirectory)" |
|
||||
RelativePathMatchs="$(_WDP_IdentifyTransformAssistFile)" > |
|
||||
<Output TaskParameter="Result" ItemName="_WDP_WebConfigAssistFilesToFixupTemp" /> |
|
||||
</CollectFilesinFolder> |
|
||||
|
|
||||
<FilterByItems PipelineItems="@(FilesForPackagingFromProject)" |
|
||||
Filter="@(_WDP_WebConfigAssistFilesToFixupTemp)"> |
|
||||
<Output TaskParameter="InFilter" ItemName="_WDP_WebConfigAssistFilesToFixup"/> |
|
||||
</FilterByItems> |
|
||||
|
|
||||
<ItemGroup> |
|
||||
<!--Change all web.*.config to full path and add DependentUpon with Web.config--> |
|
||||
<FilesForPackagingFromProject Remove="@(_WDP_WebConfigAssistFilesToFixup)" /> |
|
||||
<FilesForPackagingFromProject Include="@(_WDP_WebConfigAssistFilesToFixup->'$(WebPublishPipelineProjectDirectory)%(Identity)')"> |
|
||||
<DependentUpon>Web.config</DependentUpon> |
|
||||
</FilesForPackagingFromProject> |
|
||||
</ItemGroup> |
|
||||
</Target> |
|
||||
|
|
||||
<!-- |
|
||||
============================================================ |
|
||||
_PrepareForBuild |
|
||||
|
|
||||
Sets up variables in preparation to build. |
|
||||
============================================================ |
|
||||
--> |
|
||||
<Target Name="_PrepareForBuild"> |
|
||||
<!-- |
|
||||
Here converting to a property is required because TargetDir and TargetPath are defined |
|
||||
to contain an item list. We want that item list to be expanded so that it can be used |
|
||||
as a regular property value and not as an item-list-with-transform. |
|
||||
--> |
|
||||
<PropertyGroup> |
|
||||
<WDTargetDir>$(WDTargetDir)</WDTargetDir> |
|
||||
</PropertyGroup> |
|
||||
<PropertyGroup> |
|
||||
<_FullSourceWebDir>$(_FullSourceWebDir)</_FullSourceWebDir> |
|
||||
</PropertyGroup> |
|
||||
|
|
||||
<MakeDir Directories="$(IntermediateOutputPath)" /> |
|
||||
</Target> |
|
||||
|
|
||||
<!-- |
|
||||
============================================================ |
|
||||
_CollectFilesForCopyBeforeBuild |
|
||||
|
|
||||
Copy the web to a new folder excluding predefined items in @(ExcludeFromBuild) |
|
||||
<ItemGroup> |
|
||||
<ExcludeFromBuild Include="$(SourceWebPhysicalPath)\Test\**\*.*"/> |
|
||||
<ExcludeFromBuild Include="$(SourceWebPhysicalPath)\Images\**\*.*"/> |
|
||||
</ItemGroup> |
|
||||
The following support regular expreesion Exclude For example |
|
||||
<PropertyGroup> |
|
||||
<_WDPExcludeFullPathFromBuildRegEx>$(_WDPExcludeFullPathFromBuildRegEx);C:\\myfoo</_WDPExcludeFullPathFromBuildRegEx> |
|
||||
<_WDPExcludeRelativePathFromBuildRegex>$(_WDPExcludeRelativePathFromBuildRegex);[^\\]*\.scc$;[^\\]*\.vssscc$;[^\\]*\.vspscc$</_WDPExcludeRelativePathFromBuildRegex> |
|
||||
</PropertyGroup> |
|
||||
<CopyBeforeBuildTargetPath Condition="'$(CopyBeforeBuildTargetPath)' == ''">$(IntermediateOutputPath)Source</CopyBeforeBuildTargetPath> |
|
||||
============================================================ |
|
||||
--> |
|
||||
<ItemDefinitionGroup> |
|
||||
<_WebFiles> |
|
||||
<DestinationRelativePath></DestinationRelativePath> |
|
||||
<Exclude>False</Exclude> |
|
||||
<FromTarget>Unknown</FromTarget> |
|
||||
<Category>Run</Category> |
|
||||
<ProjectFileType>Default</ProjectFileType> |
|
||||
</_WebFiles> |
|
||||
</ItemDefinitionGroup> |
|
||||
|
|
||||
<Target Name="_CollectFilesForCopyBeforeBuild" |
|
||||
DependsOnTargets="$(_CollectFilesForCopyBeforeBuildDependsOn)"> |
|
||||
|
|
||||
<!--********************************************************************--> |
|
||||
<!-- Enforce that all items have these metadata values --> |
|
||||
<!-- Default for Exclude is False --> |
|
||||
<!--********************************************************************--> |
|
||||
<CollectFilesinFolder RootPath="$(_WDPSourceWebPhysicalPath)" |
|
||||
ExcludeFullPathMatchs="$(_WDPExcludeFullPathFromBuildRegEx)" |
|
||||
ExcludeRelativePathMatchs="$(_WDPExcludeRelativePathFromBuildRegex)"> |
|
||||
<Output TaskParameter="Result" ItemName="_WebFilesNoMetadata" /> |
|
||||
</CollectFilesinFolder> |
|
||||
|
|
||||
<PropertyGroup> |
|
||||
<_OriginalSourceWebPhysicalFullPath>$([System.IO.Path]::GetFullPath($(SourceWebPhysicalPath)))</_OriginalSourceWebPhysicalFullPath> |
|
||||
<_OriginalSourceWebPhysicalFullPath Condition="!HasTrailingSlash('$(_OriginalSourceWebPhysicalFullPath)')">$(_OriginalSourceWebPhysicalFullPath)\</_OriginalSourceWebPhysicalFullPath> |
|
||||
</PropertyGroup> |
|
||||
|
|
||||
<!-- For Team Build scenarios when WAP is used the exclude may be different from the source path --> |
|
||||
<ItemGroup Condition ="'$(_WDPSourceWebPhysicalPath)' != '$(SourceWebPhysicalPath)'"> |
|
||||
<_WebFilesExclude Include="%(ExcludeFromBuild.Identity)"> |
|
||||
<SourceRelativePath Condition="$([System.String]::new(%(ExcludeFromBuild.FullPath)).StartsWith($(_OriginalSourceWebPhysicalFullPath), StringComparison.OrdinalIgnoreCase ))" >$([System.String]::new(%(ExcludeFromBuild.FullPath)).SubString($(_OriginalSourceWebPhysicalFullPath.Length)))</SourceRelativePath> |
|
||||
</_WebFilesExclude> |
|
||||
<_WebFilesExclude Condition="'%(SourceRelativePath)'==''"> |
|
||||
<SourceRelativePath>%(Identity)</SourceRelativePath> |
|
||||
</_WebFilesExclude> |
|
||||
<_WebFilesNoMetadata Remove="%(_WebFilesExclude.SourceRelativePath)" Condition="'%(_WebFilesExclude.SourceRelativePath)' != ''"/> |
|
||||
</ItemGroup> |
|
||||
|
|
||||
<!-- Log debug for potential issue --> |
|
||||
<WriteLinesToFile Condition ="$(EnablePackageProcessLoggingAndAssert) And '$(_WDPSourceWebPhysicalPath)' != '$(SourceWebPhysicalPath)'" |
|
||||
Encoding="utf-8" |
|
||||
File="$(IntermediateOutputPath)\_WebFilesExclude.txt" |
|
||||
Lines="@(_WebFilesExclude->' |
|
||||
Files:%(Identity) |
|
||||
SourceRelativePath:%(SourceRelativePath)')" |
|
||||
Overwrite="True" /> |
|
||||
|
|
||||
<!-- _WebFilesNoMetadata doesn't have metadata yet, need to fill the data. Fill in the metadata now for CopyPipelineFiles to use --> |
|
||||
<ItemGroup> |
|
||||
<_WebFiles Include="$([System.IO.Path]::Combine($(_WDPSourceWebPhysicalPath), %(_WebFilesNoMetadata.Identity)))" > |
|
||||
<DestinationRelativePath>%(_WebFilesNoMetadata.Identity)</DestinationRelativePath> |
|
||||
</_WebFiles> |
|
||||
</ItemGroup> |
|
||||
|
|
||||
<!-- For backwards compatability --> |
|
||||
<ItemGroup Condition ="'$(_WDPSourceWebPhysicalPath)' == '$(SourceWebPhysicalPath)'"> |
|
||||
<_WebFiles Remove="@(ExcludeFromBuild)" /> |
|
||||
</ItemGroup> |
|
||||
|
|
||||
<MakeDir Directories="$(IntermediateOutputPath)" /> |
|
||||
|
|
||||
<WriteLinesToFile Condition="$(EnablePackageProcessLoggingAndAssert)" |
|
||||
Encoding="utf-8" |
|
||||
File="$(IntermediateOutputPath)\webfilesToBeCopied.txt" |
|
||||
Lines="@(_WebFiles->' |
|
||||
Files:%(Identity) |
|
||||
FromTarget:%(FromTarget) |
|
||||
DestinationRelativePath:%(DestinationRelativePath)')" |
|
||||
Overwrite="True" /> |
|
||||
</Target> |
|
||||
|
|
||||
<Target Name="_CopyBeforeBuild" |
|
||||
Condition=" '$(EnableCopyBeforeBuild)' == 'true' or '@(ExcludeFromBuild)' != '' " |
|
||||
DependsOnTargets="_CollectFilesForCopyBeforeBuild"> |
|
||||
|
|
||||
<ItemGroup> |
|
||||
<_WDPAllExtraFilesUnderTempFolder Condition="'$(CopyBeforeBuildTargetPath)' != ''" Include="$(CopyBeforeBuildTargetPath)\**" /> |
|
||||
<_WDPAllExtraFilesUnderTempFolder |
|
||||
Remove="@(FilesForPackagingFromProject->'$(CopyBeforeBuildTargetPath)\%(DestinationRelativePath)')" /> |
|
||||
</ItemGroup> |
|
||||
<!-- Remove all extra files in the temp folder that's not in the @(FilesForPackagingFromProject) --> |
|
||||
<Delete Files="@(_WDPAllExtraFilesUnderTempFolder)" /> |
|
||||
|
|
||||
<!-- This method supports incremental copy, instead of a full copy everytime --> |
|
||||
<!-- We've already expanded the path as relative path to the project. There is no need for sourceDirectory --> |
|
||||
<CopyPipelineFiles PipelineItems="@(_WebFiles)" |
|
||||
SourceDirectory="$(MSBuildProjectDirectory)" |
|
||||
TargetDirectory="$(CopyBeforeBuildTargetPath)" |
|
||||
SkipMetadataExcludeTrueItems="True" |
|
||||
UpdateItemSpec="False" |
|
||||
DeleteItemsMarkAsExcludeTrue ="True"> |
|
||||
<Output TaskParameter="UpdatedPipelineItems" ItemName="_WebFilesCopied"/> |
|
||||
</CopyPipelineFiles> |
|
||||
|
|
||||
<PropertyGroup> |
|
||||
<_AspNetCompilerSourceWebPath>$(CopyBeforeBuildTargetPath)</_AspNetCompilerSourceWebPath> |
|
||||
</PropertyGroup> |
|
||||
</Target> |
|
||||
|
|
||||
<!-- |
|
||||
============================================================ |
|
||||
Clean |
|
||||
============================================================ |
|
||||
--> |
|
||||
<Target Name="Clean"> |
|
||||
<PropertyGroup> |
|
||||
<Clean>true</Clean> |
|
||||
</PropertyGroup> |
|
||||
|
|
||||
<RemoveDir Condition="Exists('$(CopyBeforeBuildTargetPath)')" Directories="$(CopyBeforeBuildTargetPath)"/> |
|
||||
<RemoveDir Condition="Exists('$(TempBuildDir)')" Directories="$(TempBuildDir)" /> |
|
||||
<RemoveDir Condition="Exists('$(WDTargetDir)')" Directories="$(WDTargetDir)" /> |
|
||||
</Target> |
|
||||
|
|
||||
<!-- |
|
||||
============================================================ |
|
||||
Reference Resolving |
|
||||
|
|
||||
Updates the bin folder with the lastest .refresh files |
|
||||
============================================================ |
|
||||
--> |
|
||||
<Target Name="_ResolveAssemblyReferencesWithRefreshFile" DependsOnTargets="_PrepareForBuild"> |
|
||||
<ItemGroup> |
|
||||
<References_RefreshFile Include="$(_FullSourceWebDir)\Bin\*.refresh"/> |
|
||||
</ItemGroup> |
|
||||
<ReadLinesFromFile File="%(References_RefreshFile.Identity)" Condition=" '%(References_RefreshFile.Identity)' != '' "> |
|
||||
<Output TaskParameter="Lines" ItemName="References_ReferenceRelPath" /> |
|
||||
</ReadLinesFromFile> |
|
||||
<CombinePath BasePath="$(_FullSourceWebDir)" Paths="@(References_ReferenceRelPath)"> |
|
||||
<Output TaskParameter="CombinedPaths" ItemName="References" /> |
|
||||
</CombinePath> |
|
||||
|
|
||||
<Copy |
|
||||
SourceFiles="@(References->'%(FullPath)')" |
|
||||
DestinationFolder="$(_FullSourceWebDir)\Bin\" |
|
||||
Condition="!Exists('%(References.Identity)')" |
|
||||
ContinueOnError="true" |
|
||||
SkipUnchangedFiles="true" |
|
||||
Retries="$(CopyRetryCount)" |
|
||||
RetryDelayMilliseconds="$(CopyRetryDelayMilliseconds)"/> |
|
||||
</Target> |
|
||||
|
|
||||
<!-- |
|
||||
============================================================ |
|
||||
AfterResolveReferences |
|
||||
============================================================ |
|
||||
--> |
|
||||
<Target Name="AfterResolveReferences"> |
|
||||
|
|
||||
<Copy SourceFiles="@(ReferencePath->'%(FullPath)')" |
|
||||
DestinationFolder="$(_FullSourceWebDir)\Bin\" |
|
||||
ContinueOnError="true" |
|
||||
SkipUnchangedFiles="true" |
|
||||
Retries="$(CopyRetryCount)" |
|
||||
RetryDelayMilliseconds="$(CopyRetryDelayMilliseconds)"/> |
|
||||
|
|
||||
<Copy SourceFiles="@(ReferenceComWrappersToCopyLocal); @(ResolvedIsolatedComModules); @(_DeploymentLooseManifestFile); @(NativeReferenceFile)" |
|
||||
DestinationFolder="$(_FullSourceWebDir)\bin" |
|
||||
SkipUnchangedFiles="true" |
|
||||
Retries="$(CopyRetryCount)" |
|
||||
RetryDelayMilliseconds="$(CopyRetryDelayMilliseconds)"/> |
|
||||
|
|
||||
<Copy SourceFiles="@(ReferenceCopyLocalPaths)" |
|
||||
DestinationFiles="@(ReferenceCopyLocalPaths->'$(_FullSourceWebDir)\bin\%(DestinationSubDirectory)%(Filename)%(Extension)')" |
|
||||
SkipUnchangedFiles="true" |
|
||||
Retries="$(CopyRetryCount)" |
|
||||
RetryDelayMilliseconds="$(CopyRetryDelayMilliseconds)"/> |
|
||||
</Target> |
|
||||
|
|
||||
<!-- |
|
||||
============================================================ |
|
||||
Build |
|
||||
The main build entry point. |
|
||||
============================================================ |
|
||||
--> |
|
||||
<PropertyGroup> |
|
||||
<BuildDependsOn> |
|
||||
_PrepareForBuild; |
|
||||
ResolveProjectReferences; |
|
||||
_ResolveAssemblyReferencesWithRefreshFile; |
|
||||
ResolveReferences; |
|
||||
_CopyBeforeBuild; |
|
||||
</BuildDependsOn> |
|
||||
<PipelineDeployPhaseAfterTargets Condition="'$(DeployOnBuild)'=='True'">_CopyBeforeBuild</PipelineDeployPhaseAfterTargets> |
|
||||
</PropertyGroup> |
|
||||
|
|
||||
<Target |
|
||||
Name="Build" |
|
||||
DependsOnTargets="$(BuildDependsOn)" /> |
|
||||
|
|
||||
<!-- |
|
||||
============================================================ |
|
||||
CopyToOutputDir |
|
||||
From the temp building location copy the output to the actual oput dir |
|
||||
============================================================ |
|
||||
--> |
|
||||
<ItemDefinitionGroup> |
|
||||
<_WDPOutputFiles> |
|
||||
<DestinationRelativePath></DestinationRelativePath> |
|
||||
<Exclude>False</Exclude> |
|
||||
<FromTarget>Unknown</FromTarget> |
|
||||
<Category>Run</Category> |
|
||||
<ProjectFileType>Default</ProjectFileType> |
|
||||
</_WDPOutputFiles> |
|
||||
</ItemDefinitionGroup> |
|
||||
|
|
||||
<Target Name="_CollectFilesForCopyToOutputDir" |
|
||||
DependsOnTargets="$(_CollectFilesForCopyToOutputDirDependsOn)"> |
|
||||
<PropertyGroup> |
|
||||
<_TempDirFullPath>$(MSBuildProjectDirectory)\$(TempBuildDir)</_TempDirFullPath> |
|
||||
</PropertyGroup> |
|
||||
|
|
||||
<MakeDir Directories="$(_TempDirFullPath)" /> |
|
||||
<!--********************************************************************--> |
|
||||
<!-- Enforce that all items have these metadata values --> |
|
||||
<!-- Default for Exclude is False --> |
|
||||
<!--********************************************************************--> |
|
||||
<CollectFilesinFolder RootPath="$(_TempDirFullPath)" |
|
||||
ExcludeFullPathMatchs="$(_WDPExcludeFullPathToOutputDirRegEx)" |
|
||||
ExcludeRelativePathMatchs="$(_WDPExcludeRelativePathToOutputDirRegex)"> |
|
||||
<Output TaskParameter="Result" ItemName="_WDPOutputFilesNoMetadata" /> |
|
||||
</CollectFilesinFolder> |
|
||||
|
|
||||
<!-- _WDPOutputFilesNoMetadata doesn't have metadata yet, need to fill the data. Fill in the metadata now for CopyPipelineFiles to use --> |
|
||||
<ItemGroup> |
|
||||
<_WDPOutputFiles Include="@(_WDPOutputFilesNoMetadata)" > |
|
||||
<DestinationRelativePath>%(_WDPOutputFilesNoMetadata.Identity)</DestinationRelativePath> |
|
||||
</_WDPOutputFiles> |
|
||||
</ItemGroup> |
|
||||
|
|
||||
<MakeDir Directories="$(IntermediateOutputPath)" /> |
|
||||
<WriteLinesToFile Condition="$(EnablePackageProcessLoggingAndAssert)" |
|
||||
Encoding="utf-8" |
|
||||
File="$(IntermediateOutputPath)\WDPOutputFilesToBeCopied.txt" |
|
||||
Lines="@(_WDPOutputFiles->' |
|
||||
Files:%(Identity) |
|
||||
FromTarget:%(FromTarget) |
|
||||
DestinationRelativePath:%(DestinationRelativePath)')" |
|
||||
Overwrite="True" /> |
|
||||
</Target> |
|
||||
|
|
||||
<PropertyGroup> |
|
||||
<_CopyToOutputDirDependsOn> |
|
||||
$(_CopyToOutputDirDependsOn); |
|
||||
CoreCopyToOutputDir; |
|
||||
CleanTempBuildDir |
|
||||
</_CopyToOutputDirDependsOn> |
|
||||
</PropertyGroup> |
|
||||
|
|
||||
<Target Name="CopyToOutputDir" DependsOnTargets="$(_CopyToOutputDirDependsOn)"/> |
|
||||
|
|
||||
<Target Name="CoreCopyToOutputDir" |
|
||||
Condition=" '$(CopyToOutputDir)' != 'False'" |
|
||||
DependsOnTargets="_CollectFilesForCopyToOutputDir"> |
|
||||
|
|
||||
<ItemGroup> |
|
||||
<_WDPAllExtraFilesUnderTargetDir Condition="'$(WDTargetDir)' != ''" Include="$(WDTargetDir)\**" /> |
|
||||
<_WDPAllExtraFilesUnderTargetDir |
|
||||
Remove="@(_WDPOutputFiles->'$(WDTargetDir)\%(DestinationRelativePath)')" /> |
|
||||
</ItemGroup> |
|
||||
<!-- Remove all extra files in the temp folder that's not in the @(FilesForPackagingFromProject --> |
|
||||
<Delete Files="@(_WDPAllExtraFilesUnderTargetDir)" /> |
|
||||
|
|
||||
<!-- This method supports incremental copy, instead of a full copy everytime --> |
|
||||
<!-- @(_WDPOutputFiles) contain relative path to $(TempBuildDir), pass in sourceDirectory --> |
|
||||
<CopyPipelineFiles PipelineItems="@(_WDPOutputFiles)" |
|
||||
SourceDirectory="$(TempBuildDir)" |
|
||||
TargetDirectory="$(WDTargetDir)" |
|
||||
SkipMetadataExcludeTrueItems="True" |
|
||||
UpdateItemSpec="False" |
|
||||
DeleteItemsMarkAsExcludeTrue ="True"> |
|
||||
<Output TaskParameter="UpdatedPipelineItems" ItemName="_WDPOutputFilesCopied"/> |
|
||||
</CopyPipelineFiles> |
|
||||
</Target> |
|
||||
|
|
||||
<!-- |
|
||||
============================================================ |
|
||||
CleanTempBuildDir |
|
||||
Clean Temp Build Dir |
|
||||
============================================================ |
|
||||
--> |
|
||||
<Target Name="CleanTempBuildDir" |
|
||||
Condition="'$(CleanTempBuildDir)' == 'True'"> |
|
||||
<RemoveDir Directories="$(TempBuildDir)" /> |
|
||||
</Target> |
|
||||
|
|
||||
<!-- |
|
||||
This is required for setup project support |
|
||||
--> |
|
||||
<Target Name="BuiltProjectOutputGroup" DependsOnTargets="_PrepareForBuild"> |
|
||||
<ItemGroup> |
|
||||
<_BuiltProjectOutputGroupOutput Include="$(WDTargetDir)**\*.*"/> |
|
||||
<BuiltProjectOutputGroupOutput Include="@(_BuiltProjectOutputGroupOutput)"> |
|
||||
<TargetPath>%(_BuiltProjectOutputGroupOutput.SubFolder)%(_BuiltProjectOutputGroupOutput.RecursiveDir)%(Filename)%(Extension)</TargetPath> |
|
||||
</BuiltProjectOutputGroupOutput> |
|
||||
</ItemGroup> |
|
||||
</Target> |
|
||||
|
|
||||
</Project> |
|
||||
@ -1,101 +0,0 @@ |
|||||
[cmdletbinding(SupportsShouldProcess=$true)] |
|
||||
param($publishProperties, $packOutput, $nugetUrl) |
|
||||
|
|
||||
# to learn more about this file visit http://go.microsoft.com/fwlink/?LinkId=524327 |
|
||||
$publishModuleVersion = '1.0.1' |
|
||||
function Get-VisualStudio2015InstallPath{ |
|
||||
[cmdletbinding()] |
|
||||
param() |
|
||||
process{ |
|
||||
$keysToCheck = @('hklm:\SOFTWARE\Wow6432Node\Microsoft\VisualStudio\14.0', |
|
||||
'hklm:\SOFTWARE\Microsoft\VisualStudio\14.0', |
|
||||
'hklm:\SOFTWARE\Wow6432Node\Microsoft\VWDExpress\14.0', |
|
||||
'hklm:\SOFTWARE\Microsoft\VWDExpress\14.0' |
|
||||
) |
|
||||
[string]$vsInstallPath=$null |
|
||||
|
|
||||
foreach($keyToCheck in $keysToCheck){ |
|
||||
if(Test-Path $keyToCheck){ |
|
||||
$vsInstallPath = (Get-itemproperty $keyToCheck -Name InstallDir -ErrorAction SilentlyContinue | select -ExpandProperty InstallDir -ErrorAction SilentlyContinue) |
|
||||
} |
|
||||
|
|
||||
if($vsInstallPath){ |
|
||||
break; |
|
||||
} |
|
||||
} |
|
||||
|
|
||||
$vsInstallPath |
|
||||
} |
|
||||
} |
|
||||
|
|
||||
$vsInstallPath = Get-VisualStudio2015InstallPath |
|
||||
$publishModulePath = "{0}Extensions\Microsoft\Web Tools\Publish\Scripts\{1}\" -f $vsInstallPath,'1.0.1' |
|
||||
|
|
||||
if(!(Test-Path $publishModulePath)){ |
|
||||
$publishModulePath = "{0}VWDExpressExtensions\Microsoft\Web Tools\Publish\Scripts\{1}\" -f $vsInstallPath,'1.0.1' |
|
||||
} |
|
||||
|
|
||||
$defaultPublishSettings = New-Object psobject -Property @{ |
|
||||
LocalInstallDir = $publishModulePath |
|
||||
} |
|
||||
|
|
||||
function Enable-PackageDownloader{ |
|
||||
[cmdletbinding()] |
|
||||
param( |
|
||||
$toolsDir = "$env:LOCALAPPDATA\Microsoft\Web Tools\Publish\package-downloader-$publishModuleVersion\", |
|
||||
$pkgDownloaderDownloadUrl = 'http://go.microsoft.com/fwlink/?LinkId=524325') # package-downloader.psm1 |
|
||||
process{ |
|
||||
if(get-module package-downloader){ |
|
||||
remove-module package-downloader | Out-Null |
|
||||
} |
|
||||
|
|
||||
if(!(get-module package-downloader)){ |
|
||||
if(!(Test-Path $toolsDir)){ New-Item -Path $toolsDir -ItemType Directory -WhatIf:$false } |
|
||||
|
|
||||
$expectedPath = (Join-Path ($toolsDir) 'package-downloader.psm1') |
|
||||
if(!(Test-Path $expectedPath)){ |
|
||||
'Downloading [{0}] to [{1}]' -f $pkgDownloaderDownloadUrl,$expectedPath | Write-Verbose |
|
||||
(New-Object System.Net.WebClient).DownloadFile($pkgDownloaderDownloadUrl, $expectedPath) |
|
||||
} |
|
||||
|
|
||||
if(!$expectedPath){throw ('Unable to download package-downloader.psm1')} |
|
||||
|
|
||||
'importing module [{0}]' -f $expectedPath | Write-Output |
|
||||
Import-Module $expectedPath -DisableNameChecking -Force |
|
||||
} |
|
||||
} |
|
||||
} |
|
||||
|
|
||||
function Enable-PublishModule{ |
|
||||
[cmdletbinding()] |
|
||||
param() |
|
||||
process{ |
|
||||
if(get-module publish-module){ |
|
||||
remove-module publish-module | Out-Null |
|
||||
} |
|
||||
|
|
||||
if(!(get-module publish-module)){ |
|
||||
$localpublishmodulepath = Join-Path $defaultPublishSettings.LocalInstallDir 'publish-module.psm1' |
|
||||
if(Test-Path $localpublishmodulepath){ |
|
||||
'importing module [publish-module="{0}"] from local install dir' -f $localpublishmodulepath | Write-Verbose |
|
||||
Import-Module $localpublishmodulepath -DisableNameChecking -Force |
|
||||
$true |
|
||||
} |
|
||||
} |
|
||||
} |
|
||||
} |
|
||||
|
|
||||
try{ |
|
||||
|
|
||||
if (!(Enable-PublishModule)){ |
|
||||
Enable-PackageDownloader |
|
||||
Enable-NuGetModule -name 'publish-module' -version $publishModuleVersion -nugetUrl $nugetUrl |
|
||||
} |
|
||||
|
|
||||
'Calling Publish-AspNet' | Write-Verbose |
|
||||
# call Publish-AspNet to perform the publish operation |
|
||||
Publish-AspNet -publishProperties $publishProperties -packOutput $packOutput |
|
||||
} |
|
||||
catch{ |
|
||||
"An error occurred during publish.`n{0}" -f $_.Exception.Message | Write-Error |
|
||||
} |
|
||||
@ -1,13 +0,0 @@ |
|||||
<?xml version="1.0" encoding="utf-8"?> |
|
||||
<!-- |
|
||||
This file is used by the publish/package process of your Web project. You can customize the behavior of this process |
|
||||
by editing this MSBuild file. In order to learn more about this please visit http://go.microsoft.com/fwlink/?LinkID=208121. |
|
||||
--> |
|
||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> |
|
||||
<PropertyGroup> |
|
||||
<WebPublishMethod>FileSystem</WebPublishMethod> |
|
||||
<WebRoot>wwwroot</WebRoot> |
|
||||
<publishUrl>$(OutDir)\$(Configuration)\PublishOutput</publishUrl> |
|
||||
<DeleteExistingFiles>False</DeleteExistingFiles> |
|
||||
</PropertyGroup> |
|
||||
</Project> |
|
||||
@ -1,13 +0,0 @@ |
|||||
<?xml version="1.0" encoding="utf-8"?> |
|
||||
<!-- |
|
||||
This file is used by the publish/package process of your Web project. You can customize the behavior of this process |
|
||||
by editing this MSBuild file. In order to learn more about this please visit http://go.microsoft.com/fwlink/?LinkID=208121. |
|
||||
--> |
|
||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> |
|
||||
<PropertyGroup> |
|
||||
<WebPublishMethod>Package</WebPublishMethod> |
|
||||
<WebRoot>wwwroot</WebRoot> |
|
||||
<DesktopBuildPackageLocation>$(OutDir)\$(Configuration)\MSDeployPackage\$(MSBuildProjectName).zip</DesktopBuildPackageLocation> |
|
||||
<DeployIisAppPath>Default Web Site</DeployIisAppPath> |
|
||||
</PropertyGroup> |
|
||||
</Project> |
|
||||
@ -1,658 +0,0 @@ |
|||||
[cmdletbinding(SupportsShouldProcess=$true)] |
|
||||
param() |
|
||||
|
|
||||
$script:AspNetPublishHandlers = @{} |
|
||||
|
|
||||
$global:AspNetPublishSettings = New-Object -TypeName PSCustomObject @{ |
|
||||
MsdeployDefaultProperties = @{ |
|
||||
'MSDeployUseChecksum'=$false |
|
||||
'WebRoot'='wwwroot' |
|
||||
'SkipExtraFilesOnServer'=$true |
|
||||
'retryAttempts' = 2 |
|
||||
'EnableMSDeployBackup' = $false |
|
||||
'DeleteExistingFiles' = $false |
|
||||
'MSDeployPackageContentFoldername'='website\' |
|
||||
} |
|
||||
} |
|
||||
|
|
||||
function Register-AspnetPublishHandler{ |
|
||||
[cmdletbinding()] |
|
||||
param( |
|
||||
[Parameter(Mandatory=$true,Position=0)] |
|
||||
$name, |
|
||||
[Parameter(Mandatory=$true,Position=1)] |
|
||||
[ScriptBlock]$handler, |
|
||||
[switch]$force |
|
||||
) |
|
||||
process{ |
|
||||
if(!($script:AspNetPublishHandlers[$name]) -or $force ){ |
|
||||
'Adding handler for [{0}]' -f $name | Write-Verbose |
|
||||
$script:AspNetPublishHandlers[$name] = $handler |
|
||||
} |
|
||||
elseif(!($force)){ |
|
||||
'Ignoring call to Register-AspnetPublishHandler for [name={0}], because a handler with that name exists and -force was not passed.' -f $name | Write-Verbose |
|
||||
} |
|
||||
} |
|
||||
} |
|
||||
|
|
||||
function Get-AspnetPublishHandler{ |
|
||||
[cmdletbinding()] |
|
||||
param( |
|
||||
[Parameter(Mandatory=$true,Position=0)] |
|
||||
$name |
|
||||
) |
|
||||
process{ |
|
||||
$foundHandler = $script:AspNetPublishHandlers[$name] |
|
||||
|
|
||||
if(!$foundHandler){ |
|
||||
throw ('AspnetPublishHandler with name "{0}" was not found' -f $name) |
|
||||
} |
|
||||
|
|
||||
$foundHandler |
|
||||
} |
|
||||
} |
|
||||
|
|
||||
function GetInternal-ExcludeFilesArg{ |
|
||||
[cmdletbinding()] |
|
||||
param( |
|
||||
$publishProperties |
|
||||
) |
|
||||
process{ |
|
||||
$excludeFiles = $publishProperties['ExcludeFiles'] |
|
||||
foreach($exclude in $excludeFiles){ |
|
||||
if($exclude){ |
|
||||
[string]$objName = $exclude['objectname'] |
|
||||
|
|
||||
if([string]::IsNullOrEmpty($objName)){ |
|
||||
$objName = 'filePath' |
|
||||
} |
|
||||
|
|
||||
$excludePath = $exclude['absolutepath'] |
|
||||
|
|
||||
# output the result to the return list |
|
||||
('-skip:objectName={0},absolutePath={1}' -f $objName, $excludePath) |
|
||||
} |
|
||||
} |
|
||||
} |
|
||||
} |
|
||||
|
|
||||
function GetInternal-ReplacementsMSDeployArgs{ |
|
||||
[cmdletbinding()] |
|
||||
param( |
|
||||
$publishProperties |
|
||||
) |
|
||||
process{ |
|
||||
foreach($replace in ($publishProperties['Replacements'])){ |
|
||||
if($replace){ |
|
||||
$typeValue = $replace['type'] |
|
||||
if(!$typeValue){ $typeValue = 'TextFile' } |
|
||||
|
|
||||
$file = $replace['file'] |
|
||||
$match = $replace['match'] |
|
||||
$newValue = $replace['newValue'] |
|
||||
|
|
||||
if($file -and $match -and $newValue){ |
|
||||
$setParam = ('-setParam:type={0},scope={1},match={2},value={3}' -f $typeValue,$file, $match,$newValue) |
|
||||
'Adding setparam [{0}]' -f $setParam | Write-Verbose |
|
||||
|
|
||||
# return it |
|
||||
$setParam |
|
||||
} |
|
||||
else{ |
|
||||
'Skipping replacement because its missing a required value.[file="{0}",match="{1}",newValue="{2}"]' -f $file,$match,$newValue | Write-Verbose |
|
||||
} |
|
||||
} |
|
||||
} |
|
||||
} |
|
||||
} |
|
||||
|
|
||||
<# |
|
||||
.SYNOPSIS |
|
||||
Returns an array of msdeploy arguments that are used across different providers. |
|
||||
For example this wil handle useChecksum, appOffline, etc. |
|
||||
This will also add default properties if they are missing. |
|
||||
#> |
|
||||
function GetInternal-SharedMSDeployParametersFrom{ |
|
||||
[cmdletbinding()] |
|
||||
param( |
|
||||
[Parameter(Mandatory=$true,Position=0)] |
|
||||
$publishProperties |
|
||||
) |
|
||||
process{ |
|
||||
$sharedArgs = New-Object psobject -Property @{ |
|
||||
ExtraArgs = @() |
|
||||
DestFragment = '' |
|
||||
} |
|
||||
|
|
||||
# add default properties if they are missing |
|
||||
foreach($propName in $global:AspNetPublishSettings.MsdeployDefaultProperties.Keys){ |
|
||||
if($publishProperties["$propName"] -eq $null){ |
|
||||
$defValue = $global:AspNetPublishSettings.MsdeployDefaultProperties["$propName"] |
|
||||
'Adding default property to publishProperties ["{0}"="{1}"]' -f $propName,$defValue | Write-Verbose |
|
||||
$publishProperties["$propName"] = $defValue |
|
||||
} |
|
||||
} |
|
||||
|
|
||||
if($publishProperties['MSDeployUseChecksum'] -eq $true){ |
|
||||
$sharedArgs.ExtraArgs += '-usechecksum' |
|
||||
} |
|
||||
|
|
||||
if($publishProperties['WebPublishMethod'] -eq 'MSDeploy'){ |
|
||||
$offlineArgs = GetInternal-PublishAppOfflineProperties -publishProperties $publishProperties |
|
||||
$sharedArgs.ExtraArgs += $offlineArgs.AdditionalArguments |
|
||||
$sharedArgs.DestFragment += $offlineArgs.DestFragment |
|
||||
|
|
||||
if($publishProperties['SkipExtraFilesOnServer'] -eq $true){ |
|
||||
$sharedArgs.ExtraArgs += '-enableRule:DoNotDeleteRule' |
|
||||
} |
|
||||
} |
|
||||
|
|
||||
if($publishProperties['WebPublishMethod'] -eq 'FileSystem'){ |
|
||||
if($publishProperties['DeleteExistingFiles'] -eq $false){ |
|
||||
$sharedArgs.ExtraArgs += '-enableRule:DoNotDeleteRule' |
|
||||
} |
|
||||
} |
|
||||
|
|
||||
if($publishProperties['retryAttempts']){ |
|
||||
$sharedArgs.ExtraArgs += ('-retryAttempts:{0}' -f ([int]$publishProperties['retryAttempts'])) |
|
||||
} |
|
||||
|
|
||||
if($publishProperties['EncryptWebConfig'] -eq $true){ |
|
||||
$sharedArgs.ExtraArgs += '-EnableRule:EncryptWebConfig' |
|
||||
} |
|
||||
|
|
||||
if($publishProperties['EnableMSDeployBackup'] -eq $false){ |
|
||||
$sharedArgs.ExtraArgs += '-disablerule:BackupRule' |
|
||||
} |
|
||||
|
|
||||
# add excludes |
|
||||
$sharedArgs.ExtraArgs += (GetInternal-ExcludeFilesArg -publishProperties $publishProperties) |
|
||||
# add replacements |
|
||||
$sharedArgs.ExtraArgs += (GetInternal-ReplacementsMSDeployArgs -publishProperties $publishProperties) |
|
||||
|
|
||||
# return the args |
|
||||
$sharedArgs |
|
||||
} |
|
||||
} |
|
||||
|
|
||||
<# |
|
||||
.SYNOPSIS |
|
||||
This will publish the folder based on the properties in $publishProperties |
|
||||
|
|
||||
.EXAMPLE |
|
||||
Publish-AspNet -packOutput $packOutput -publishProperties @{ |
|
||||
'WebPublishMethod'='MSDeploy' |
|
||||
'MSDeployServiceURL'='contoso.scm.azurewebsites.net:443';` |
|
||||
'DeployIisAppPath'='contoso';'Username'='$contoso';'Password'="$env:PublishPwd"} |
|
||||
|
|
||||
.EXAMPLE |
|
||||
Publish-AspNet -packOutput $packOutput -publishProperties @{ |
|
||||
'WebPublishMethod'='FileSystem' |
|
||||
'publishUrl'="$publishDest" |
|
||||
} |
|
||||
|
|
||||
.EXAMPLE |
|
||||
Publish-AspNet -packOutput $packOutput -publishProperties @{ |
|
||||
'WebPublishMethod'='MSDeploy' |
|
||||
'MSDeployServiceURL'='contoso.scm.azurewebsites.net:443';` |
|
||||
'DeployIisAppPath'='contoso';'Username'='$contoso';'Password'="$env:PublishPwd" |
|
||||
'ExcludeFiles'=@( |
|
||||
@{'absolutepath'='wwwroot\\test.txt'}, |
|
||||
@{'absolutepath'='wwwroot\\_references.js'} |
|
||||
)} |
|
||||
|
|
||||
.EXAMPLE |
|
||||
Publish-AspNet -packOutput $packOutput -publishProperties @{ |
|
||||
'WebPublishMethod'='FileSystem' |
|
||||
'publishUrl'="$publishDest" |
|
||||
'ExcludeFiles'=@( |
|
||||
@{'absolutepath'='wwwroot\\test.txt'}, |
|
||||
@{'absolutepath'='wwwroot\\_references.js'}) |
|
||||
'Replacements' = @( |
|
||||
@{'file'='test.txt$';'match'='REPLACEME';'newValue'='updatedValue'}) |
|
||||
} |
|
||||
|
|
||||
Publish-AspNet -packOutput $packOutput -publishProperties @{ |
|
||||
'WebPublishMethod'='FileSystem' |
|
||||
'publishUrl'="$publishDest" |
|
||||
'ExcludeFiles'=@( |
|
||||
@{'absolutepath'='wwwroot\\test.txt'}, |
|
||||
@{'absolutepath'='c:\\full\\path\\ok\\as\\well\\_references.js'}) |
|
||||
'Replacements' = @( |
|
||||
@{'file'='test.txt$';'match'='REPLACEME';'newValue'='updatedValue'}) |
|
||||
} |
|
||||
|
|
||||
.EXAMPLE |
|
||||
Publish-AspNet -packOutput $packOutput -publishProperties @{ |
|
||||
'WebPublishMethod'='FileSystem' |
|
||||
'publishUrl'="$publishDest" |
|
||||
'EnableMSDeployAppOffline'='true' |
|
||||
'AppOfflineTemplate'='offline-template.html' |
|
||||
'MSDeployUseChecksum'='true' |
|
||||
} |
|
||||
#> |
|
||||
function Publish-AspNet{ |
|
||||
[cmdletbinding(SupportsShouldProcess=$true)] |
|
||||
param( |
|
||||
[Parameter(Mandatory = $true,Position=0,ValueFromPipeline=$true,ValueFromPipelineByPropertyName=$true)] |
|
||||
$publishProperties, |
|
||||
[Parameter(Mandatory = $true,Position=1,ValueFromPipelineByPropertyName=$true)] |
|
||||
$packOutput |
|
||||
) |
|
||||
process{ |
|
||||
if($publishProperties['WebPublishMethodOverride']){ |
|
||||
'Overriding publish method from $publishProperties[''WebPublishMethodOverride''] to [{0}]' -f ($publishProperties['WebPublishMethodOverride']) | Write-Verbose |
|
||||
$publishProperties['WebPublishMethod'] = $publishProperties['WebPublishMethodOverride'] |
|
||||
} |
|
||||
|
|
||||
if(!([System.IO.Path]::IsPathRooted($packOutput))){ |
|
||||
$packOutput = [System.IO.Path]::GetFullPath((Join-Path $pwd $packOutput)) |
|
||||
} |
|
||||
|
|
||||
$pubMethod = $publishProperties['WebPublishMethod'] |
|
||||
'Publishing with publish method [{0}]' -f $pubMethod | Write-Output |
|
||||
|
|
||||
# get the handler based on WebPublishMethod, and call it. |
|
||||
&(Get-AspnetPublishHandler -name $pubMethod) $publishProperties $packOutput |
|
||||
} |
|
||||
} |
|
||||
|
|
||||
function Publish-AspNetMSDeploy{ |
|
||||
[cmdletbinding(SupportsShouldProcess=$true)] |
|
||||
param( |
|
||||
[Parameter(Mandatory = $true,Position=0,ValueFromPipeline=$true,ValueFromPipelineByPropertyName=$true)] |
|
||||
$publishProperties, |
|
||||
[Parameter(Mandatory = $true,Position=1,ValueFromPipelineByPropertyName=$true)] |
|
||||
$packOutput |
|
||||
) |
|
||||
process{ |
|
||||
if($publishProperties){ |
|
||||
$publishPwd = $publishProperties['Password'] |
|
||||
|
|
||||
<# |
|
||||
"C:\Program Files (x86)\IIS\Microsoft Web Deploy V3\msdeploy.exe" |
|
||||
-source:IisApp='C:\Users\contoso\AppData\Local\Temp\AspNetPublish\WebApplication1\wwwroot' |
|
||||
-dest:IisApp='vramak4',ComputerName='https://contoso.scm.azurewebsites.net/msdeploy.axd',UserName='$contoso',Password='<PWD>',IncludeAcls='False',AuthType='Basic' |
|
||||
-verb:sync |
|
||||
-enableRule:DoNotDeleteRule |
|
||||
-enableLink:contentLibExtension |
|
||||
-retryAttempts=2 |
|
||||
-userAgent="VS14.0:PublishDialog:WTE14.0.51027.0" |
|
||||
#> |
|
||||
|
|
||||
$sharedArgs = GetInternal-SharedMSDeployParametersFrom -publishProperties $publishProperties |
|
||||
|
|
||||
# WebRoot is a required property which has a default |
|
||||
$webroot = $publishProperties['WebRoot'] |
|
||||
|
|
||||
$webrootOutputFolder = (get-item (Join-Path $packOutput $webroot)).FullName |
|
||||
$publishArgs = @() |
|
||||
$publishArgs += ('-source:IisApp=''{0}''' -f "$webrootOutputFolder") |
|
||||
$publishArgs += ('-dest:IisApp=''{0}'',ComputerName=''{1}'',UserName=''{2}'',Password=''{3}'',IncludeAcls=''False'',AuthType=''Basic''{4}' -f |
|
||||
$publishProperties['DeployIisAppPath'], |
|
||||
(Get-MSDeployFullUrlFor -msdeployServiceUrl $publishProperties['MSDeployServiceURL']), |
|
||||
$publishProperties['UserName'], |
|
||||
$publishPwd, |
|
||||
$sharedArgs.DestFragment) |
|
||||
$publishArgs += '-verb:sync' |
|
||||
$publishArgs += '-enableLink:contentLibExtension' |
|
||||
$publishArgs += $sharedArgs.ExtraArgs |
|
||||
|
|
||||
$command = '"{0}" {1}' -f (Get-MSDeploy),($publishArgs -join ' ') |
|
||||
|
|
||||
if (! [String]::IsNullOrEmpty($publishPwd)) { |
|
||||
$command.Replace($publishPwd,'{PASSWORD-REMOVED-FROM-LOG}') | Print-CommandString |
|
||||
} |
|
||||
Execute-Command -exePath (Get-MSDeploy) -arguments ($publishArgs -join ' ') |
|
||||
} |
|
||||
else{ |
|
||||
throw 'publishProperties is empty, cannot publish' |
|
||||
} |
|
||||
} |
|
||||
} |
|
||||
|
|
||||
function Escape-TextForRegularExpressions{ |
|
||||
[cmdletbinding()] |
|
||||
param( |
|
||||
[Parameter(Position=0,Mandatory=$true)] |
|
||||
[string]$text |
|
||||
) |
|
||||
process{ |
|
||||
# TODO: Get code from EscapeTextForRegularExpressions task |
|
||||
$text.Replace('\','\\') |
|
||||
} |
|
||||
} |
|
||||
|
|
||||
function Publish-AspNetMSDeployPackage{ |
|
||||
[cmdletbinding(SupportsShouldProcess=$true)] |
|
||||
param( |
|
||||
[Parameter(Mandatory = $true,Position=0,ValueFromPipeline=$true,ValueFromPipelineByPropertyName=$true)] |
|
||||
$publishProperties, |
|
||||
[Parameter(Mandatory = $true,Position=1,ValueFromPipelineByPropertyName=$true)] |
|
||||
$packOutput |
|
||||
) |
|
||||
process{ |
|
||||
if($publishProperties){ |
|
||||
$packageDestFilepah = $publishProperties['DesktopBuildPackageLocation'] |
|
||||
|
|
||||
if(!$packageDestFilepah){ |
|
||||
throw ('The package destination property (DesktopBuildPackageLocation) was not found in the publish properties') |
|
||||
} |
|
||||
|
|
||||
if(!([System.IO.Path]::IsPathRooted($packageDestFilepah))){ |
|
||||
$packageDestFilepah = [System.IO.Path]::GetFullPath((Join-Path $pwd $packageDestFilepah)) |
|
||||
} |
|
||||
|
|
||||
# if the dir doesn't exist create it |
|
||||
$pkgDir = ((new-object -typename System.IO.FileInfo($packageDestFilepah)).Directory) |
|
||||
if(!($pkgDir.Exists)) { |
|
||||
$pkgDir.Create() | Out-Null |
|
||||
} |
|
||||
|
|
||||
<# |
|
||||
"C:\Program Files (x86)\IIS\Microsoft Web Deploy V3\msdeploy.exe" |
|
||||
-source:IisApp='C:\Users\contoso\AppData\Local\Temp\AspNetPublish\WebApplication1\wwwroot' |
|
||||
-dest:package=c:\temp\path\contosoweb.zip |
|
||||
-verb:sync |
|
||||
-enableRule:DoNotDeleteRule |
|
||||
-enableLink:contentLibExtension |
|
||||
-retryAttempts=2 |
|
||||
#> |
|
||||
|
|
||||
$sharedArgs = GetInternal-SharedMSDeployParametersFrom -publishProperties $publishProperties |
|
||||
|
|
||||
# WebRoot is a required property which has a default |
|
||||
$webroot = $publishProperties['WebRoot'] |
|
||||
|
|
||||
$webrootOutputFolder = (get-item (Join-Path $packOutput $webroot)).FullName |
|
||||
$publishArgs = @() |
|
||||
$publishArgs += ('-source:IisApp=''{0}''' -f "$webrootOutputFolder") |
|
||||
$publishArgs += ('-dest:package=''{0}''' -f $packageDestFilepah) |
|
||||
$publishArgs += '-verb:sync' |
|
||||
$publishArgs += '-enableLink:contentLibExtension' |
|
||||
$packageContentFolder = $publishProperties['MSDeployPackageContentFoldername'] |
|
||||
if(!$packageContentFolder){ $packageContentFolder = 'website' } |
|
||||
$publishArgs += ('-replace:match=''{0}'',replace=''{1}''' -f (Escape-TextForRegularExpressions $packOutput), $packageContentFolder ) |
|
||||
$publishArgs += $sharedArgs.ExtraArgs |
|
||||
|
|
||||
$command = '"{0}" {1}' -f (Get-MSDeploy),($publishArgs -join ' ') |
|
||||
$command | Print-CommandString |
|
||||
Execute-Command -exePath (Get-MSDeploy) -arguments ($publishArgs -join ' ') |
|
||||
} |
|
||||
else{ |
|
||||
throw 'publishProperties is empty, cannot publish' |
|
||||
} |
|
||||
} |
|
||||
} |
|
||||
|
|
||||
<# |
|
||||
.SYNOPSIS |
|
||||
If the passed in $publishProperties has values for appOffline the |
|
||||
needed arguments will be in the return object. If there is no such configuraion |
|
||||
then nothing is returned. |
|
||||
#> |
|
||||
function GetInternal-PublishAppOfflineProperties{ |
|
||||
[cmdletbinding()] |
|
||||
param( |
|
||||
[Parameter(Mandatory=$true,Position=0)] |
|
||||
$publishProperties |
|
||||
) |
|
||||
process{ |
|
||||
$extraArg = ''; |
|
||||
$destFragment = '' |
|
||||
if($publishProperties['EnableMSDeployAppOffline'] -eq $true){ |
|
||||
$extraArg = '-enablerule:AppOffline' |
|
||||
|
|
||||
$appOfflineTemplate = $publishProperties['AppOfflineTemplate'] |
|
||||
if($appOfflineTemplate){ |
|
||||
$destFragment = (',appOfflineTemplate="{0}"' -f $appOfflineTemplate) |
|
||||
} |
|
||||
} |
|
||||
# return an object with both the properties that need to be in the command. |
|
||||
New-Object psobject -Property @{ |
|
||||
AdditionalArguments = $extraArg |
|
||||
DestFragment = $destFragment |
|
||||
} |
|
||||
} |
|
||||
} |
|
||||
|
|
||||
function Publish-AspNetFileSystem{ |
|
||||
[cmdletbinding(SupportsShouldProcess=$true)] |
|
||||
param( |
|
||||
[Parameter(Mandatory = $true,Position=0,ValueFromPipeline=$true,ValueFromPipelineByPropertyName=$true)] |
|
||||
$publishProperties, |
|
||||
[Parameter(Mandatory = $true,Position=1,ValueFromPipelineByPropertyName=$true)] |
|
||||
$packOutput |
|
||||
) |
|
||||
process{ |
|
||||
$pubOut = $publishProperties['publishUrl'] |
|
||||
|
|
||||
if([string]::IsNullOrWhiteSpace($pubOut)){ |
|
||||
throw ('publishUrl is a required property for FileSystem publish but it was empty.') |
|
||||
} |
|
||||
|
|
||||
# if it's a relative path then update it to a full path |
|
||||
if(!([System.IO.Path]::IsPathRooted($pubOut))){ |
|
||||
$pubOut = [System.IO.Path]::GetFullPath((Join-Path $pwd $pubOut)) |
|
||||
$publishProperties['publishUrl'] = "$pubOut" |
|
||||
} |
|
||||
|
|
||||
'Publishing files to {0}' -f $pubOut | Write-Output |
|
||||
|
|
||||
# we use msdeploy.exe because it supports incremental publish/skips/replacements/etc |
|
||||
# msdeploy.exe -verb:sync -source:contentPath='C:\srcpath' -dest:contentPath='c:\destpath' |
|
||||
|
|
||||
$sharedArgs = GetInternal-SharedMSDeployParametersFrom -publishProperties $publishProperties |
|
||||
|
|
||||
$publishArgs = @() |
|
||||
$publishArgs += ('-source:contentPath=''{0}''' -f "$packOutput") |
|
||||
$publishArgs += ('-dest:contentPath=''{0}''{1}' -f "$pubOut",$sharedArgs.DestFragment) |
|
||||
$publishArgs += '-verb:sync' |
|
||||
$publishArgs += $sharedArgs.ExtraArgs |
|
||||
|
|
||||
$command = '"{0}" {1}' -f (Get-MSDeploy),($publishArgs -join ' ') |
|
||||
$command | Print-CommandString |
|
||||
Execute-Command -exePath (Get-MSDeploy) -arguments ($publishArgs -join ' ') |
|
||||
} |
|
||||
} |
|
||||
|
|
||||
|
|
||||
function Print-CommandString{ |
|
||||
[cmdletbinding()] |
|
||||
param( |
|
||||
[Parameter(Mandatory=$true,Position=0,ValueFromPipeline=$true)] |
|
||||
$command |
|
||||
) |
|
||||
process{ |
|
||||
'Executing command [{0}]' -f $command | Write-Output |
|
||||
} |
|
||||
} |
|
||||
|
|
||||
function Execute-CommandString{ |
|
||||
[cmdletbinding()] |
|
||||
param( |
|
||||
[Parameter(Mandatory=$true,Position=0,ValueFromPipeline=$true)] |
|
||||
[string[]]$command, |
|
||||
|
|
||||
[switch] |
|
||||
$useInvokeExpression, |
|
||||
|
|
||||
[switch] |
|
||||
$ignoreErrors |
|
||||
) |
|
||||
process{ |
|
||||
foreach($cmdToExec in $command){ |
|
||||
'Executing command [{0}]' -f $cmdToExec | Write-Verbose |
|
||||
if($useInvokeExpression){ |
|
||||
try { |
|
||||
Invoke-Expression -Command $cmdToExec |
|
||||
} |
|
||||
catch { |
|
||||
if(-not $ignoreErrors){ |
|
||||
$msg = ('The command [{0}] exited with exception [{1}]' -f $cmdToExec, $_.ToString()) |
|
||||
throw $msg |
|
||||
} |
|
||||
} |
|
||||
} |
|
||||
else { |
|
||||
cmd.exe /D /C $cmdToExec |
|
||||
|
|
||||
if(-not $ignoreErrors -and ($LASTEXITCODE -ne 0)){ |
|
||||
$msg = ('The command [{0}] exited with code [{1}]' -f $cmdToExec, $LASTEXITCODE) |
|
||||
throw $msg |
|
||||
} |
|
||||
} |
|
||||
} |
|
||||
} |
|
||||
} |
|
||||
|
|
||||
function Execute-Command { |
|
||||
[cmdletbinding()] |
|
||||
param( |
|
||||
[Parameter(Mandatory = $true,Position=0,ValueFromPipeline=$true,ValueFromPipelineByPropertyName=$true)] |
|
||||
[String]$exePath, |
|
||||
[Parameter(Mandatory = $true,Position=1,ValueFromPipelineByPropertyName=$true)] |
|
||||
[String]$arguments |
|
||||
) |
|
||||
process{ |
|
||||
$psi = New-Object -TypeName System.Diagnostics.ProcessStartInfo |
|
||||
$psi.CreateNoWindow = $true |
|
||||
$psi.UseShellExecute = $false |
|
||||
$psi.RedirectStandardOutput = $true |
|
||||
$psi.RedirectStandardError=$true |
|
||||
$psi.FileName = $exePath |
|
||||
$psi.Arguments = $arguments |
|
||||
|
|
||||
$process = New-Object -TypeName System.Diagnostics.Process |
|
||||
$process.StartInfo = $psi |
|
||||
$process.EnableRaisingEvents=$true |
|
||||
|
|
||||
# Register the event handler for error |
|
||||
$stdErrEvent = Register-ObjectEvent -InputObject $process -EventName 'ErrorDataReceived' -Action { |
|
||||
if (! [String]::IsNullOrEmpty($EventArgs.Data)) { |
|
||||
$EventArgs.Data | Write-Error |
|
||||
} |
|
||||
} |
|
||||
|
|
||||
# Starting process. |
|
||||
[Void]$process.Start() |
|
||||
$process.BeginErrorReadLine() |
|
||||
$output = $process.StandardOutput.ReadToEnd() |
|
||||
[Void]$process.WaitForExit() |
|
||||
$output | Write-Output |
|
||||
|
|
||||
# UnRegister the event handler for error |
|
||||
Unregister-Event -SourceIdentifier $stdErrEvent.Name |
|
||||
} |
|
||||
} |
|
||||
|
|
||||
|
|
||||
function Get-MSDeploy{ |
|
||||
[cmdletbinding()] |
|
||||
param() |
|
||||
process{ |
|
||||
$installPath = $env:msdeployinstallpath |
|
||||
|
|
||||
if(!$installPath){ |
|
||||
$keysToCheck = @('hklm:\SOFTWARE\Microsoft\IIS Extensions\MSDeploy\3','hklm:\SOFTWARE\Microsoft\IIS Extensions\MSDeploy\2','hklm:\SOFTWARE\Microsoft\IIS Extensions\MSDeploy\1') |
|
||||
|
|
||||
foreach($keyToCheck in $keysToCheck){ |
|
||||
if(Test-Path $keyToCheck){ |
|
||||
$installPath = (Get-itemproperty $keyToCheck -Name InstallPath -ErrorAction SilentlyContinue | select -ExpandProperty InstallPath -ErrorAction SilentlyContinue) |
|
||||
} |
|
||||
|
|
||||
if($installPath){ |
|
||||
break; |
|
||||
} |
|
||||
} |
|
||||
} |
|
||||
|
|
||||
if(!$installPath){ |
|
||||
throw "Unable to find msdeploy.exe, please install it and try again" |
|
||||
} |
|
||||
|
|
||||
[string]$msdInstallLoc = (join-path $installPath 'msdeploy.exe') |
|
||||
|
|
||||
"Found msdeploy.exe at [{0}]" -f $msdInstallLoc | Write-Verbose |
|
||||
|
|
||||
$msdInstallLoc |
|
||||
} |
|
||||
} |
|
||||
|
|
||||
function Get-MSDeployFullUrlFor{ |
|
||||
[cmdletbinding()] |
|
||||
param($msdeployServiceUrl) |
|
||||
process{ |
|
||||
# Convert contoso.scm.azurewebsites.net:443 to https://contoso.scm.azurewebsites.net/msdeploy.axd |
|
||||
# TODO: This needs to be improved, it only works with Azure Websites currently. |
|
||||
'https://{0}/msdeploy.axd' -f $msdeployServiceUrl.TrimEnd(':443') |
|
||||
} |
|
||||
} |
|
||||
|
|
||||
function InternalRegister-AspNetKnownPublishHandlers{ |
|
||||
[cmdletbinding()] |
|
||||
param() |
|
||||
process{ |
|
||||
'Registering MSDeploy handler' | Write-Verbose |
|
||||
Register-AspnetPublishHandler -name 'MSDeploy' -force -handler { |
|
||||
[cmdletbinding()] |
|
||||
param( |
|
||||
[Parameter(Mandatory = $true,Position=0,ValueFromPipeline=$true,ValueFromPipelineByPropertyName=$true)] |
|
||||
$publishProperties, |
|
||||
[Parameter(Mandatory = $true,Position=1,ValueFromPipelineByPropertyName=$true)] |
|
||||
$packOutput |
|
||||
) |
|
||||
|
|
||||
Publish-AspNetMSDeploy -publishProperties $publishProperties -packOutput $packOutput |
|
||||
} |
|
||||
|
|
||||
'Registering MSDeploy package handler' | Write-Verbose |
|
||||
Register-AspnetPublishHandler -name 'Package' -force -handler { |
|
||||
[cmdletbinding()] |
|
||||
param( |
|
||||
[Parameter(Mandatory = $true,Position=0,ValueFromPipeline=$true,ValueFromPipelineByPropertyName=$true)] |
|
||||
$publishProperties, |
|
||||
[Parameter(Mandatory = $true,Position=1,ValueFromPipelineByPropertyName=$true)] |
|
||||
$packOutput |
|
||||
) |
|
||||
|
|
||||
Publish-AspNetMSDeployPackage -publishProperties $publishProperties -packOutput $packOutput |
|
||||
} |
|
||||
|
|
||||
'Registering FileSystem handler' | Write-Verbose |
|
||||
Register-AspnetPublishHandler -name 'FileSystem' -force -handler { |
|
||||
[cmdletbinding()] |
|
||||
param( |
|
||||
[Parameter(Mandatory = $true,Position=0,ValueFromPipeline=$true,ValueFromPipelineByPropertyName=$true)] |
|
||||
$publishProperties, |
|
||||
[Parameter(Mandatory = $true,Position=1,ValueFromPipelineByPropertyName=$true)] |
|
||||
$packOutput |
|
||||
) |
|
||||
|
|
||||
Publish-AspNetFileSystem -publishProperties $publishProperties -packOutput $packOutput |
|
||||
} |
|
||||
} |
|
||||
} |
|
||||
|
|
||||
<# |
|
||||
.SYNOPSIS |
|
||||
Used for testing purposes only. |
|
||||
#> |
|
||||
function InternalReset-AspNetPublishHandlers{ |
|
||||
[cmdletbinding()] |
|
||||
param() |
|
||||
process{ |
|
||||
$script:AspNetPublishHandlers = @{} |
|
||||
InternalRegister-AspNetKnownPublishHandlers |
|
||||
} |
|
||||
} |
|
||||
|
|
||||
Export-ModuleMember -function Get-*,Publish-*,Register-*,Enable-* |
|
||||
if($env:IsDeveloperMachine){ |
|
||||
# you can set the env var to expose all functions to importer. easy for development. |
|
||||
# this is required for executing pester test cases, it's set by build.ps1 |
|
||||
Export-ModuleMember -function * |
|
||||
} |
|
||||
|
|
||||
# register the handlers so that Publish-AspNet can be called |
|
||||
InternalRegister-AspNetKnownPublishHandlers |
|
||||
@ -1,774 +0,0 @@ |
|||||
<!-- |
|
||||
*********************************************************************************************** |
|
||||
Microsoft.Web.Publishing.AspNetCompileMerge.targets |
|
||||
|
|
||||
WARNING: DO NOT MODIFY this file unless you are knowledgeable about MSBuild and have |
|
||||
created a backup copy. Incorrect changes to this file will make it |
|
||||
impossible to load or build your web deploy projects from the command-line or the IDE. |
|
||||
|
|
||||
This file defines the steps in the standard package/publish process for Tranform the list of file |
|
||||
through the aspnet_compile and aspnet_merge. It will dramaticaly change the content in the list. |
|
||||
|
|
||||
Copyright (C) Microsoft Corporation. All rights reserved. |
|
||||
*********************************************************************************************** |
|
||||
--> |
|
||||
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> |
|
||||
<!--Import task from our dll--> |
|
||||
<UsingTask TaskName="GetPublishingLocalizedString" AssemblyFile="..\Microsoft.Web.Publishing.Tasks.dll"/> |
|
||||
<UsingTask TaskName="CopyPipelineFiles" AssemblyFile="..\Microsoft.Web.Publishing.Tasks.dll" /> |
|
||||
<UsingTask TaskName="AspNetMerge" AssemblyFile="..\Microsoft.Web.Publishing.Tasks.dll"/> |
|
||||
<UsingTask TaskName="GetProjectProperties" AssemblyFile="..\Microsoft.Web.Publishing.Tasks.dll"/> |
|
||||
<UsingTask TaskName="FilterByItems" AssemblyFile="..\Microsoft.Web.Publishing.Tasks.dll"/> |
|
||||
<UsingTask TaskName="GenerateAssemblyInfo" AssemblyFile="..\Microsoft.Web.Publishing.Tasks.dll"/> |
|
||||
<UsingTask TaskName="CheckItemsCount" AssemblyFile="..\Microsoft.Web.Publishing.Tasks.dll"/> |
|
||||
|
|
||||
<!--ImportBefore Extension--> |
|
||||
<PropertyGroup> |
|
||||
<ImportByWildcardBeforeMicrosoftWebPublishingTransformTargets Condition="'$(ImportByWildcardBeforeMicrosoftWebPublishingTransformTargets)'==''">true</ImportByWildcardBeforeMicrosoftWebPublishingTransformTargets> |
|
||||
</PropertyGroup> |
|
||||
<Import Project="$(MSBuildThisFileDirectory)\$(MSBuildThisFileName)\ImportBefore\*" Condition="'$(ImportByWildcardBeforeMicrosoftWebPublishingTransformTargets)' == 'true' and exists('$(MSBuildThisFileDirectory)\$(MSBuildThisFileName)\ImportBefore')"/> |
|
||||
|
|
||||
<PropertyGroup> |
|
||||
<Microsoft_Web_Publishing_AspNetCompileMerge_targets_Imported>True</Microsoft_Web_Publishing_AspNetCompileMerge_targets_Imported> |
|
||||
</PropertyGroup> |
|
||||
|
|
||||
<!--********************************************************************--> |
|
||||
<!--Enforce all item have these metadata value for all pipeline metadata--> |
|
||||
<!--Default for Exclude is False--> |
|
||||
<!--********************************************************************--> |
|
||||
<ItemDefinitionGroup> |
|
||||
<_AspnetCompileMergePrecompiledOutput> |
|
||||
<DestinationRelativePath></DestinationRelativePath> |
|
||||
<Exclude>False</Exclude> |
|
||||
<FromTarget>AspNetCompilerMergePhase</FromTarget> |
|
||||
<Category>Run</Category> |
|
||||
<ProjectFileType>Default</ProjectFileType> |
|
||||
</_AspnetCompileMergePrecompiledOutput> |
|
||||
</ItemDefinitionGroup> |
|
||||
|
|
||||
|
|
||||
<PropertyGroup> |
|
||||
<AspnetCompileMergeIntermediateOutputPath Condition="'$(AspnetCompileMergeIntermediateOutputPath)' == ''">$(IntermediateOutputPath)AspnetCompileMerge\</AspnetCompileMergeIntermediateOutputPath> |
|
||||
<AspnetCompileMergeIntermediateAssemblyInfo Condition="'$(AspnetCompileMergeIntermediateAssemblyInfo)' == ''">$(IntermediateOutputPath)AssemblyInfo\</AspnetCompileMergeIntermediateAssemblyInfo> |
|
||||
<CopyBeforeAspnetCompileMergeTargetPath Condition="'$(CopyBeforeAspnetCompileMergeTargetPath)' == ''">$(AspnetCompileMergeIntermediateOutputPath)Source</CopyBeforeAspnetCompileMergeTargetPath> |
|
||||
<AspnetCompileMerge_TempBuildDir Condition="'$(AspnetCompileMerge_TempBuildDir)' == ''" >$(AspnetCompileMergeIntermediateOutputPath)TempBuildDir</AspnetCompileMerge_TempBuildDir> |
|
||||
</PropertyGroup> |
|
||||
|
|
||||
<PropertyGroup Condition="'$(UseMerge)' != 'true'"> |
|
||||
<_AspNetCompilerFixedNames Condition="'$(_AspNetCompilerFixedNames)' == ''">$(UseFixedNames)</_AspNetCompilerFixedNames> |
|
||||
</PropertyGroup> |
|
||||
|
|
||||
<PropertyGroup Condition="'$(UseMetabasePath)' == 'true'"> |
|
||||
<_AspNetCompilerMetabasePath Condition ="'$(_AspNetCompilerMetabasePath)' == ''">$(SourceWebMetabasePath)</_AspNetCompilerMetabasePath> |
|
||||
</PropertyGroup> |
|
||||
<PropertyGroup Condition="'$(UseMetabasePath)' != 'true'"> |
|
||||
<_AspNetCompilerSourceWebPath Condition="'$(_AspNetCompilerSourceWebPath)' != ''">$(WebPublishPipelineProjectDirectory)</_AspNetCompilerSourceWebPath> |
|
||||
<_AspNetCompilerVirtualPath Condition="'$(_AspNetCompilerVirtualPath)' != ''">$(SourceWebVirtualPath)</_AspNetCompilerVirtualPath> |
|
||||
</PropertyGroup> |
|
||||
|
|
||||
<PropertyGroup> |
|
||||
<_WPPCurrentBuildInfo>$(_WPPCurrentBuildInfo);PrecompileBeforePublish=$(PrecompileBeforePublish);WDPMergeOption=$(WDPMergeOption);_AspNetCompilerFixedNames=$(_AspNetCompilerFixedNames);_AspNetCompilerMetabasePath=$(_AspNetCompilerMetabasePath);Microsoft_Web_Publishing_AspNetCompileMerge_targets_Imported=$(Microsoft_Web_Publishing_AspNetCompileMerge_targets_Imported)</_WPPCurrentBuildInfo> |
|
||||
</PropertyGroup> |
|
||||
|
|
||||
<!--***************************************************************--> |
|
||||
<!--Hookinto clean target for Clean target --> |
|
||||
<!--***************************************************************--> |
|
||||
<PropertyGroup> |
|
||||
<_WPPCleanTargets> |
|
||||
$(_WPPCleanTargets); |
|
||||
CleanAspNetCompileMergeTempDirectories; |
|
||||
</_WPPCleanTargets> |
|
||||
</PropertyGroup> |
|
||||
|
|
||||
|
|
||||
<!-- |
|
||||
============================================================ |
|
||||
Clean |
|
||||
|
|
||||
Clean target. |
|
||||
============================================================ |
|
||||
--> |
|
||||
<PropertyGroup> |
|
||||
<CleanAspNetCompileMergeTempDirectoriesDependsOn Condition="'$(CleanAspNetCompileMergeTempDirectoriesDependsOn)'==''"> |
|
||||
</CleanAspNetCompileMergeTempDirectoriesDependsOn> |
|
||||
|
|
||||
</PropertyGroup> |
|
||||
<Target Name="CleanAspNetCompileMergeTempDirectories" DependsOnTargets="$(CleanAspNetCompileMergeTempDirectoriesDependsOn)"> |
|
||||
<!-- |
|
||||
Create a Clean boolean property |
|
||||
--> |
|
||||
<CreateProperty Value="true"> |
|
||||
<Output TaskParameter="Value" PropertyName="Clean" /> |
|
||||
</CreateProperty> |
|
||||
<RemoveDir Condition="Exists('$(CopyBeforeAspnetCompileMergeTargetPath)')" Directories="$(CopyBeforeAspnetCompileMergeTargetPath)"/> |
|
||||
<RemoveDir Condition="Exists('$(AspnetCompileMerge_TempBuildDir)')" Directories="$(AspnetCompileMerge_TempBuildDir)" /> |
|
||||
<RemoveDir Condition="Exists('$(AspnetCompileMergeIntermediateAssemblyInfo)')" Directories="$(AspnetCompileMergeIntermediateAssemblyInfo)" /> |
|
||||
<Delete Condition="'$(AssemblyInfoDll)' != '' And Exists($(AssemblyInfoDll))" |
|
||||
DeletedFiles="$(AssemblyInfoDll)" ContinueOnError="true" /> |
|
||||
</Target> |
|
||||
|
|
||||
|
|
||||
<!-- |
|
||||
============================================================ |
|
||||
GetAspNetMergePath |
|
||||
|
|
||||
Get the paths for AspNet_Merge.exe Path. |
|
||||
Use Framework SDK's Path. If not exist, fall back to WDP installpath. |
|
||||
============================================================ |
|
||||
--> |
|
||||
<PropertyGroup> |
|
||||
<GetAspNetMergePathDependsOn> |
|
||||
GetFrameworkPaths; |
|
||||
</GetAspNetMergePathDependsOn> |
|
||||
</PropertyGroup> |
|
||||
<Target |
|
||||
Name="GetAspNetMergePath" |
|
||||
DependsOnTargets="$(GetAspNetMergePathDependsOn)" |
|
||||
Condition ="'$(GetAspNetMergePath)' != 'false'"> |
|
||||
<PropertyGroup> |
|
||||
<AspnetMergeName>aspnet_merge.exe</AspnetMergeName> |
|
||||
<AspnetMergePath Condition="Exists('$(TargetFrameworkSDKToolsDirectory)$(AspnetMergeName)')">$(TargetFrameworkSDKToolsDirectory)</AspnetMergePath> |
|
||||
</PropertyGroup> |
|
||||
<Error Condition="'$(AspnetMergePath)' == '' Or !Exists($(AspnetMergePath))" |
|
||||
Text="Can't find the valid AspnetMergePath" /> |
|
||||
</Target> |
|
||||
|
|
||||
|
|
||||
|
|
||||
<!--********************************************************************--> |
|
||||
<!-- Target GenerateAssemblyInfo --> |
|
||||
<!--********************************************************************--> |
|
||||
<!-- |
|
||||
============================================================ |
|
||||
GenerateAssemblyInfo |
|
||||
|
|
||||
Generates an Assembly with the AssemblyAttributes contained in @(AssebmlyAttributes) |
|
||||
The output is in property AssemblyInfoDll |
|
||||
|
|
||||
The assembly attributes can be defined as follows: |
|
||||
|
|
||||
<ItemGroup> |
|
||||
<AssebmlyAttributes Include="AssemblyVersion"> |
|
||||
<value>3.0.0.0</value> |
|
||||
</AssebmlyAttributes> |
|
||||
<AssebmlyAttributes Include="AssemblyFileVersion"> |
|
||||
<value>3.0.0.0</value> |
|
||||
</AssebmlyAttributes> |
|
||||
<AssemblyAttributes Include="AssemblyTitle"> |
|
||||
<value>MyCompany MyWeb</value> |
|
||||
</AssemblyAttributes> |
|
||||
<AssemblyAttributes Include="AssemblyDescription"> |
|
||||
<value>Corporate Site</value> |
|
||||
</AssemblyAttributes> |
|
||||
<AssemblyAttributes Include="AssemblyCompany"> |
|
||||
<value>MyCompany</value> |
|
||||
</AssemblyAttributes> |
|
||||
<AssemblyAttributes Include="AssemblyCopyright"> |
|
||||
<value>Copyright © MyCompany 2005</value> |
|
||||
</AssemblyAttributes> |
|
||||
</ItemGroup> |
|
||||
|
|
||||
============================================================ |
|
||||
--> |
|
||||
<PropertyGroup> |
|
||||
<GenerateAssemblyInfoFromAssemblyAttributesDependsOn> |
|
||||
$(OnBeforeGenerateAssemblyInfoFromAssemblyAttributes); |
|
||||
$(GenerateAssemblyInfoFromAssemblyAttributesDependsOn); |
|
||||
GetFrameworkPaths; |
|
||||
GetAspNetMergePath; |
|
||||
</GenerateAssemblyInfoFromAssemblyAttributesDependsOn> |
|
||||
</PropertyGroup> |
|
||||
|
|
||||
<Target Name="GenerateAssemblyInfoFromAssemblyAttributes" |
|
||||
DependsOnTargets="$(GenerateAssemblyInfoFromAssemblyAttributesDependsOn)" |
|
||||
Condition=" '@(AssemblyAttributes)' != '' "> |
|
||||
|
|
||||
<PropertyGroup> |
|
||||
<_AssemblyInfoSource Condition="'$(_AssemblyInfoSource)' == ''" >$(IntermediateOutputPath)AssemblyInfo\AssemblyInfo.cs</_AssemblyInfoSource> |
|
||||
<_AssemblyInfoSourceDirectory>$([System.IO.Path]::GetDirectoryName($(_AssemblyInfoSource)))</_AssemblyInfoSourceDirectory> |
|
||||
<AssemblyInfoDll>$([System.IO.Path]::GetDirectoryName($(_AssemblyInfoSource)))\AssemblyInfo.dll</AssemblyInfoDll> |
|
||||
<_AssemblyInfoDllDirectory>$([System.IO.Path]::GetDirectoryName($(AssemblyInfoDll)))</_AssemblyInfoDllDirectory> |
|
||||
</PropertyGroup> |
|
||||
|
|
||||
<GenerateAssemblyInfo |
|
||||
AssemblyAttributes="@(AssemblyAttributes)" |
|
||||
OutputDir="$([System.IO.Path]::GetDirectoryName($(_AssemblyInfoSource)))"> |
|
||||
<Output TaskParameter="Regenerated" PropertyName="_AssemblyInfoSourceIsUpdated"/> |
|
||||
</GenerateAssemblyInfo> |
|
||||
|
|
||||
<PropertyGroup > |
|
||||
<_GenerateAssemblyInfoDll>false</_GenerateAssemblyInfoDll> |
|
||||
<_GenerateAssemblyInfoDll Condition="'$(_AssemblyInfoSourceIsUpdated)' == 'true' or !Exists($(AssemblyInfoDll))">True</_GenerateAssemblyInfoDll> |
|
||||
</PropertyGroup> |
|
||||
|
|
||||
<MakeDir Condition="!Exists($(_AssemblyInfoDllDirectory))" Directories="$(_AssemblyInfoDllDirectory)" ContinueOnError="true" /> |
|
||||
|
|
||||
<Csc Condition="'$(_GenerateAssemblyInfoDll)'=='true'" |
|
||||
TargetType="library" |
|
||||
Sources="$(_AssemblyInfoSource)" |
|
||||
OutputAssembly="$(AssemblyInfoDll)" |
|
||||
/> |
|
||||
|
|
||||
<ItemGroup Condition="$(_GenerateAssemblyInfoDll) And Exists($(AssemblyInfoDll))"> |
|
||||
<FileWrites Include="$(_AssemblyInfoSource)" /> |
|
||||
<FileWrites Include="$(AssemblyInfoDll)" /> |
|
||||
</ItemGroup> |
|
||||
</Target> |
|
||||
|
|
||||
<PropertyGroup> |
|
||||
<GenerateAssemblyInfoFromExistingAssembleInfoDependsOn> |
|
||||
$(OnBeforeGenerateAssemblyInfoFromExistingAssembleInfo); |
|
||||
$(GenerateAssemblyInfoFromExistingAssembleInfoDependsOn); |
|
||||
GetFrameworkPaths; |
|
||||
GetAspNetMergePath; |
|
||||
GenerateAssemblyInfoFromAssemblyAttributes; |
|
||||
</GenerateAssemblyInfoFromExistingAssembleInfoDependsOn> |
|
||||
</PropertyGroup> |
|
||||
<Target Name="GenerateAssemblyInfoFromExistingAssembleInfo" |
|
||||
DependsOnTargets="$(GenerateAssemblyInfoFromExistingAssembleInfoDependsOn)" |
|
||||
Condition=" '@(AssemblyAttributes)' == '' "> |
|
||||
|
|
||||
<FilterByItems Condition="'$(_AssemblyInfoSource)'==''" |
|
||||
PipelineItems="@(Compile)" |
|
||||
SourceMetadataName="Filename" |
|
||||
FilterMetadataName="Filename" |
|
||||
Filter="AssemblyInfo"> |
|
||||
<Output TaskParameter="InFilter" ItemName="_AspNetCompile_AssemblyInfo"/> |
|
||||
</FilterByItems> |
|
||||
|
|
||||
<ItemGroup Condition="'$(_AssemblyInfoSource)'!=''"> |
|
||||
<_AspNetCompile_AssemblyInfo Include="$(_AssemblyInfoSource)" /> |
|
||||
</ItemGroup> |
|
||||
|
|
||||
<PropertyGroup Condition="'$(AssemblyInfoDll)' == ''"> |
|
||||
<_AssemblyInfoDllDirectory>$(IntermediateOutputPath)AssemblyInfo</_AssemblyInfoDllDirectory> |
|
||||
<AssemblyInfoDll>$(_AssemblyInfoDllDirectory)\AssemblyInfo.dll</AssemblyInfoDll> |
|
||||
</PropertyGroup> |
|
||||
|
|
||||
<MakeDir Condition="!Exists($(_AssemblyInfoDllDirectory))" |
|
||||
Directories="$(_AssemblyInfoDllDirectory)" ContinueOnError="true" /> |
|
||||
|
|
||||
|
|
||||
<PropertyGroup > |
|
||||
<_GenerateAssemblyInfoDll>False</_GenerateAssemblyInfoDll> |
|
||||
<_GenerateAssemblyInfoDll Condition="'$(AssemblyInfoDll)' == '' Or !Exists($(AssemblyInfoDll))">True</_GenerateAssemblyInfoDll> |
|
||||
</PropertyGroup> |
|
||||
|
|
||||
|
|
||||
<CheckItemsCount Items="@(_AspNetCompile_AssemblyInfo)" > |
|
||||
<Output TaskParameter="Count" PropertyName="_AspNetCompile_AssemblyInfo_Count" /> |
|
||||
</CheckItemsCount> |
|
||||
|
|
||||
<!--Found more than one AssemblyInfo.cs or AssemblyInfo.vb |
|
||||
To avoid this error either specify |
|
||||
/p:_AssemblyInfoSource=..\..\AssemblyInfo.cs |
|
||||
or |
|
||||
/p:AssemblyInfoDll=$(TargetPath) |
|
||||
or |
|
||||
supply @(AssemblyAttributes) as following |
|
||||
<ItemGroup> |
|
||||
<AssebmlyAttributes Include="AssemblyVersion"> |
|
||||
<value>3.0.0.0</value> |
|
||||
</AssebmlyAttributes> |
|
||||
<AssebmlyAttributes Include="AssemblyFileVersion"> |
|
||||
<value>3.0.0.0</value> |
|
||||
</AssebmlyAttributes> |
|
||||
<AssemblyAttributes Include="AssemblyTitle"> |
|
||||
<value>MyCompany MyWeb</value> |
|
||||
</AssemblyAttributes> |
|
||||
<AssemblyAttributes Include="AssemblyDescription"> |
|
||||
<value>Corporate Site</value> |
|
||||
</AssemblyAttributes> |
|
||||
<AssemblyAttributes Include="AssemblyCompany"> |
|
||||
<value>MyCompany</value> |
|
||||
</AssemblyAttributes> |
|
||||
<AssemblyAttributes Include="AssemblyCopyright"> |
|
||||
<value>Copyright © MyCompany 2005</value> |
|
||||
</AssemblyAttributes> |
|
||||
</ItemGroup>--> |
|
||||
<GetPublishingLocalizedString |
|
||||
Condition="$(_GenerateAssemblyInfoDll) AND '$(_AspNetCompile_AssemblyInfo_Count)' != '1'" |
|
||||
ID="PublishLocalizedString_ErrorInvalidMSBuildItemCollectionCount" |
|
||||
ArgumentCount="3" |
|
||||
Arguments="_AspNetCompile_AssemblyInfo_Count;$(_AspNetCompile_AssemblyInfo_Count);1" |
|
||||
LogType="Error" /> |
|
||||
|
|
||||
<Error Text ="Target GenerateAssemblyInfoFromExistingAssembleInfo Failed" |
|
||||
Condition="$(_GenerateAssemblyInfoDll) And '$(_AspNetCompile_AssemblyInfo_Count)' != '1'" /> |
|
||||
|
|
||||
|
|
||||
|
|
||||
<FilterByItems |
|
||||
PipelineItems="@(_AspNetCompile_AssemblyInfo)" |
|
||||
SourceMetadataName="Extension" |
|
||||
FilterMetadataName="Extension" |
|
||||
Filter="AssemblyInfo.cs"> |
|
||||
<Output TaskParameter="InFilter" ItemName="_AspNetCompile_AssemblyInfo_CS"/> |
|
||||
</FilterByItems> |
|
||||
|
|
||||
<Csc Condition="$(_GenerateAssemblyInfoDll) And '@(_AspNetCompile_AssemblyInfo_CS)' != ''" |
|
||||
TargetType="library" |
|
||||
Sources="@(_AspNetCompile_AssemblyInfo_CS)" |
|
||||
OutputAssembly="$(AssemblyInfoDll)" |
|
||||
/> |
|
||||
|
|
||||
<FilterByItems |
|
||||
PipelineItems="@(_AspNetCompile_AssemblyInfo)" |
|
||||
SourceMetadataName="Extension" |
|
||||
FilterMetadataName="Extension" |
|
||||
Filter="AssemblyInfo.vb"> |
|
||||
<Output TaskParameter="InFilter" ItemName="_AspNetCompile_AssemblyInfo_VB"/> |
|
||||
</FilterByItems> |
|
||||
|
|
||||
<Vbc Condition="$(_GenerateAssemblyInfoDll) And '@(_AspNetCompile_AssemblyInfo_VB)' != ''" |
|
||||
TargetType="library" |
|
||||
Sources="@(_AspNetCompile_AssemblyInfo_VB)" |
|
||||
OutputAssembly="$(AssemblyInfoDll)" |
|
||||
/> |
|
||||
|
|
||||
<ItemGroup Condition="$(_GenerateAssemblyInfoDll) And Exists($(AssemblyInfoDll))"> |
|
||||
<FileWrites Include="$(AssemblyInfoDll)" /> |
|
||||
</ItemGroup> |
|
||||
|
|
||||
</Target> |
|
||||
|
|
||||
|
|
||||
|
|
||||
<PropertyGroup> |
|
||||
<GenerateAssemblyInfoDependsOn> |
|
||||
$(OnBeforeGenerateAssemblyInfo); |
|
||||
$(GenerateAssemblyInfoDependsOn); |
|
||||
GetFrameworkPaths; |
|
||||
GetAspNetMergePath; |
|
||||
GenerateAssemblyInfoFromAssemblyAttributes; |
|
||||
GenerateAssemblyInfoFromExistingAssembleInfo; |
|
||||
</GenerateAssemblyInfoDependsOn> |
|
||||
</PropertyGroup> |
|
||||
<Target Name="GenerateAssemblyInfo" |
|
||||
DependsOnTargets="$(GenerateAssemblyInfoDependsOn)" |
|
||||
Condition=" '$(GenerateAssemblyInfo)' != 'false' "> |
|
||||
|
|
||||
</Target> |
|
||||
|
|
||||
|
|
||||
<!--********************************************************************--> |
|
||||
<!-- Target GetAspNetPreCompileSourceVirtualPath --> |
|
||||
<!--********************************************************************--> |
|
||||
<PropertyGroup> |
|
||||
<GetAspNetPreCompileSourceVirtualPathDependsOn > |
|
||||
$(OnBeforeGetAspNetPreCompileSourceVirtualPath); |
|
||||
$(GetAspNetPreCompileSourceVirtualPathDependsOn); |
|
||||
</GetAspNetPreCompileSourceVirtualPathDependsOn> |
|
||||
</PropertyGroup> |
|
||||
|
|
||||
<Target Name="GetAspNetPreCompileSourceVirtualPath" |
|
||||
Condition ="'$(GetAspNetPreCompileSourceVirtualPath)' != 'false' And '$(_AspNetCompilerVirtualPath)' == '' And '$(UseMetabasePath)' != 'true'" |
|
||||
DependsOnTargets="$(GetAspNetPreCompileSourceVirtualPathDependsOn)"> |
|
||||
<ItemGroup> |
|
||||
<__AspNetPreCompileSourceVirtualPathName Include ="DevelopmentServerVPath" /> |
|
||||
<__AspNetPreCompileSourceVirtualPathValue /> |
|
||||
</ItemGroup> |
|
||||
<GetProjectProperties ProjectFileFullPath="$(WebPublishPipelineWAPProjectSettings)" |
|
||||
ProjectExtensionsProperties="@(__AspNetPreCompileSourceVirtualPathName)"> |
|
||||
<Output TaskParameter="ResultProperties" ItemName="__AspNetPreCompileSourceVirtualPathValue" /> |
|
||||
<Output TaskParameter="UseIis" PropertyName="__AspNetPreCompileSourceUseIis" /> |
|
||||
<Output TaskParameter="IisUrl" PropertyName="__AspNetPreCompileSourceIisUrl" /> |
|
||||
</GetProjectProperties> |
|
||||
|
|
||||
<PropertyGroup> |
|
||||
<_AspNetCompilerVirtualPath>%(__AspNetPreCompileSourceVirtualPathValue.Value)</_AspNetCompilerVirtualPath> |
|
||||
<_AspNetCompilerVirtualPath Condition="'$(_AspNetCompilerVirtualPath)' == '' ">\</_AspNetCompilerVirtualPath> |
|
||||
</PropertyGroup> |
|
||||
</Target> |
|
||||
|
|
||||
|
|
||||
<!--********************************************************************--> |
|
||||
<!-- Target ConfigureForAspNetPreCompileMerge --> |
|
||||
<!--********************************************************************--> |
|
||||
<PropertyGroup> |
|
||||
<ConfigureForAspNetPreCompileMergeDependsOn> |
|
||||
$(OnBeforeConfigureForAspNetPreCompileMerge); |
|
||||
$(ConfigureForAspNetPreCompileMergeDependsOn); |
|
||||
GetFrameworkPaths; |
|
||||
GetAspNetMergePath; |
|
||||
GetAspNetPreCompileSourceVirtualPath; |
|
||||
ResolveKeySource; |
|
||||
</ConfigureForAspNetPreCompileMergeDependsOn> |
|
||||
</PropertyGroup> |
|
||||
|
|
||||
<Target Name="ConfigureForAspNetPreCompileMerge" DependsOnTargets="$(ConfigureForAspNetPreCompileMergeDependsOn)"> |
|
||||
|
|
||||
<PropertyGroup Condition="'$(_WDPFrameworkLowerThan4)' ==''"> |
|
||||
<_WDPFrameworkLowerThan4>False</_WDPFrameworkLowerThan4> |
|
||||
<_WDPFrameworkLowerThan4 Condition="'$(TargetFrameworkVersion)' == 'v2.0' or '$(TargetFrameworkVersion)' == 'v3.0' or '$(TargetFrameworkVersion)' == 'v3.5'">True</_WDPFrameworkLowerThan4> |
|
||||
</PropertyGroup> |
|
||||
|
|
||||
<PropertyGroup> |
|
||||
<!-- 2.0 CLR --> |
|
||||
<AspnetCompilerPath Condition=" '$(AspnetCompilerPath)'=='' and '$(_WDPFrameworkLowerThan4)' == 'True' and '$(Platform)'=='x64'">$(windir)\Microsoft.NET\Framework64\v2.0.50727</AspnetCompilerPath> |
|
||||
<AspnetCompilerPath Condition=" '$(AspnetCompilerPath)'=='' and '$(_WDPFrameworkLowerThan4)' == 'True' ">$(Framework20Dir)</AspnetCompilerPath> |
|
||||
|
|
||||
<!-- 4.0 CLR --> |
|
||||
<AspnetCompilerPath Condition=" '$(AspnetCompilerPath)'=='' and '$(Platform)'=='x64' ">$(windir)\Microsoft.NET\Framework64\v4.0.30319</AspnetCompilerPath> |
|
||||
|
|
||||
<!-- Default value --> |
|
||||
<AspnetCompilerPath Condition=" '$(AspnetCompilerPath)'=='' " >$(Framework40Dir)</AspnetCompilerPath> |
|
||||
</PropertyGroup> |
|
||||
|
|
||||
<Error Condition="'$(AspnetCompilerPath)' == '' Or !Exists($(AspnetCompilerPath))" |
|
||||
Text="Can't find the valid AspnetCompilerPath" /> |
|
||||
|
|
||||
<PropertyGroup> |
|
||||
<_AspNetCompileMergeKeyFile Condition="'$(_AspNetCompileMergeKeyFile)' == ''">$(KeyOriginatorFile)</_AspNetCompileMergeKeyFile> |
|
||||
</PropertyGroup> |
|
||||
|
|
||||
<PropertyGroup Condition="'$(UseMerge)' != true"> |
|
||||
<_AspNetCompileMergeKeyContainer Condition="'$(_AspNetCompileMergeKeyContainer)' == ''">$(KeyContainerName)</_AspNetCompileMergeKeyContainer> |
|
||||
</PropertyGroup> |
|
||||
|
|
||||
</Target> |
|
||||
|
|
||||
|
|
||||
<!--********************************************************************--> |
|
||||
<!-- Target AspNetPreCompile --> |
|
||||
<!--We can't use the in-place aspnet_compiler because it will output to the aspnet temp folder which is only suiteable to run on the current machine.--> |
|
||||
<!--********************************************************************--> |
|
||||
<PropertyGroup> |
|
||||
<AspNetPreCompileDependsOn > |
|
||||
$(OnBeforeAspNetPreCompile); |
|
||||
$(AspNetPreCompileDependsOn); |
|
||||
CopyAllFilesToSingleFolderForAspNetCompileMerge; |
|
||||
GetReferenceAssemblyPaths; |
|
||||
ResolveReferences; |
|
||||
ResolveKeySource; |
|
||||
ConfigureForAspNetPreCompileMerge; |
|
||||
</AspNetPreCompileDependsOn> |
|
||||
</PropertyGroup> |
|
||||
|
|
||||
<Target Name="AspNetPreCompile" DependsOnTargets="$(AspNetPreCompileDependsOn)" Condition="'$(AspNetPreCompile)' != 'false'"> |
|
||||
|
|
||||
<PropertyGroup Condition="'$(UseMetabasePath)' == 'true'" > |
|
||||
<_PreAspnetCompileMergeSingleTargetFolderFullPath></_PreAspnetCompileMergeSingleTargetFolderFullPath> |
|
||||
<_AspNetCompilerVirtualPath></_AspNetCompilerVirtualPath> |
|
||||
</PropertyGroup> |
|
||||
<PropertyGroup Condition="'$(UseMetabasePath)' != 'true'" > |
|
||||
<_PreAspnetCompileMergeSingleTargetFolderFullPath>$([System.IO.Path]::GetFullPath($(_PreAspnetCompileMergeSingleTargetFolder)))</_PreAspnetCompileMergeSingleTargetFolderFullPath> |
|
||||
</PropertyGroup> |
|
||||
|
|
||||
<PropertyGroup> |
|
||||
<_PostAspnetCompileMergeSingleTargetFolderFullPath>$([System.IO.Path]::GetFullPath($(_PostAspnetCompileMergeSingleTargetFolder)))</_PostAspnetCompileMergeSingleTargetFolderFullPath> |
|
||||
</PropertyGroup> |
|
||||
|
|
||||
<AspNetCompiler |
|
||||
PhysicalPath="$(_PreAspnetCompileMergeSingleTargetFolderFullPath)" |
|
||||
TargetPath="$(_PostAspnetCompileMergeSingleTargetFolderFullPath)" |
|
||||
VirtualPath="$(_AspNetCompilerVirtualPath)" |
|
||||
Force="$(_AspNetCompilerForce)" |
|
||||
Debug="$(DebugSymbols)" |
|
||||
Updateable="$(EnableUpdateable)" |
|
||||
KeyFile="$(_AspNetCompileMergeKeyFile)" |
|
||||
KeyContainer="$(_AspNetCompileMergeKeyContainer)" |
|
||||
DelaySign="$(DelaySign)" |
|
||||
AllowPartiallyTrustedCallers="$(AllowPartiallyTrustedCallers)" |
|
||||
FixedNames="$(_AspNetCompilerFixedNames)" |
|
||||
Clean="$(Clean)" |
|
||||
MetabasePath="$(_AspNetCompilerMetabasePath)" |
|
||||
ToolPath="$(AspnetCompilerPath)" |
|
||||
/> |
|
||||
|
|
||||
<!-- |
|
||||
Removing APP_DATA is done here so that the output groups reflect the fact that App_data is |
|
||||
not present |
|
||||
--> |
|
||||
<RemoveDir Condition="'$(DeleteAppDataFolder)' == 'true' And Exists('$(_PostAspnetCompileMergeSingleTargetFolderFullPath)\App_Data')" |
|
||||
Directories="$(_PostAspnetCompileMergeSingleTargetFolderFullPath)\App_Data" /> |
|
||||
|
|
||||
|
|
||||
<CollectFilesinFolder Condition="'$(UseMerge)' != 'true'" |
|
||||
RootPath="$(_PostAspnetCompileMergeSingleTargetFolderFullPath)" > |
|
||||
<Output TaskParameter="Result" ItemName="_AspnetCompileMergePrecompiledOutputNoMetadata" /> |
|
||||
</CollectFilesinFolder> |
|
||||
|
|
||||
<ItemGroup Condition="'$(UseMerge)' != 'true'"> |
|
||||
<FileWrites Include="$(_PostAspnetCompileMergeSingleTargetFolderFullPath)\**"/> |
|
||||
</ItemGroup> |
|
||||
|
|
||||
</Target> |
|
||||
|
|
||||
|
|
||||
|
|
||||
<!--********************************************************************--> |
|
||||
<!-- Target AspNetMerge --> |
|
||||
<!--********************************************************************--> |
|
||||
<PropertyGroup> |
|
||||
<AspNetMergeDependsOn > |
|
||||
$(OnBeforeAspNetMerge); |
|
||||
CopyAllFilesToSingleFolderForAspNetCompileMerge; |
|
||||
$(AspNetMergeDependsOn); |
|
||||
ConfigureForAspNetPreCompileMerge; |
|
||||
AspNetPreCompile; |
|
||||
GenerateAssemblyInfo; |
|
||||
</AspNetMergeDependsOn> |
|
||||
</PropertyGroup> |
|
||||
|
|
||||
<Target Name="AspNetMerge" DependsOnTargets="$(AspNetMergeDependsOn)" Condition="'$(AspNetMerge)' != 'false' And '$(UseMerge)' == 'true'"> |
|
||||
<AspNetMerge |
|
||||
ExePath="$(AspnetMergePath)" |
|
||||
ApplicationPath="$(_PostAspnetCompileMergeSingleTargetFolderFullPath)" |
|
||||
KeyFile="$(_AspNetCompileMergeKeyFile)" |
|
||||
DelaySign="$(DelaySign)" |
|
||||
Prefix="$(AssemblyPrefixName)" |
|
||||
SingleAssemblyName="$(SingleAssemblyName)" |
|
||||
Debug="$(DebugSymbols)" |
|
||||
Nologo="$(NoLogo)" |
|
||||
ContentAssemblyName="$(ContentAssemblyName)" |
|
||||
ErrorStack="$(ErrorStack)" |
|
||||
RemoveCompiledFiles="$(DeleteAppCodeCompiledFiles)" |
|
||||
CopyAttributes="$(CopyAssemblyAttributes)" |
|
||||
AssemblyInfo="$(AssemblyInfoDll)" |
|
||||
MergeXmlDocs="$(MergeXmlDocs)" |
|
||||
ErrorLogFile="$(MergeErrorLogFile)" |
|
||||
/> |
|
||||
|
|
||||
|
|
||||
<CollectFilesinFolder Condition="'$(UseMerge)' == 'true'" |
|
||||
RootPath="$(_PostAspnetCompileMergeSingleTargetFolderFullPath)" > |
|
||||
<Output TaskParameter="Result" ItemName="_AspnetCompileMergePrecompiledOutputNoMetadata" /> |
|
||||
</CollectFilesinFolder> |
|
||||
|
|
||||
<ItemGroup Condition="'$(UseMerge)' == 'true'"> |
|
||||
<FileWrites Include="$(_PostAspnetCompileMergeSingleTargetFolderFullPath)\**"/> |
|
||||
</ItemGroup> |
|
||||
|
|
||||
|
|
||||
</Target> |
|
||||
|
|
||||
|
|
||||
<!--********************************************************************--> |
|
||||
<!--Target ConfigureFoldersForAspNetCompileMerge --> |
|
||||
<!--********************************************************************--> |
|
||||
<PropertyGroup> |
|
||||
<ConfigureFoldersForAspNetCompileMergeDependsOn> |
|
||||
$(OnBeforeConfigureFoldersForAspNetCompileMerge); |
|
||||
$(ConfigureFoldersForAspNetCompileMergeDependsOn); |
|
||||
</ConfigureFoldersForAspNetCompileMergeDependsOn> |
|
||||
</PropertyGroup> |
|
||||
|
|
||||
<Target Name="ConfigureFoldersForAspNetCompileMerge" |
|
||||
Outputs="@(FilesForPackagingFromProject)" |
|
||||
DependsOnTargets="$(ConfigureFoldersForAspNetCompileMergeDependsOn)"> |
|
||||
<!--This is a phase separation point--> |
|
||||
|
|
||||
|
|
||||
<!-- |
|
||||
<CopyBeforeAspnetCompileMergeTargetPath Condition="'$(CopyBeforeAspnetCompileMergeTargetPath)' == ''">$(AspnetCompileMergeIntermediateOutputPath)\Source</CopyBeforeAspnetCompileMergeTargetPath> |
|
||||
<AspnetCompileMerge_TempBuildDir Condition="'$(AspnetCompileMerge_TempBuildDir)' == ''" >$(AspnetCompileMergeIntermediateOutputPath)\TempBuildDir</AspnetCompileMerge_TempBuildDir> |
|
||||
--> |
|
||||
<PropertyGroup> |
|
||||
<_PreAspnetCompileMergeSingleTargetFolder>$(CopyBeforeAspnetCompileMergeTargetPath)</_PreAspnetCompileMergeSingleTargetFolder> |
|
||||
<_PostAspnetCompileMergeSingleTargetFolder>$(AspnetCompileMerge_TempBuildDir)</_PostAspnetCompileMergeSingleTargetFolder> |
|
||||
</PropertyGroup> |
|
||||
|
|
||||
<CallTarget Targets="$(OnAfterConfigureFoldersForAspNetCompileMerge)" RunEachTargetSeparately="False" /> |
|
||||
</Target> |
|
||||
|
|
||||
|
|
||||
|
|
||||
<!--******************************************************************** --> |
|
||||
<!-- CopyAllFilesToSingleFolderForAspNetCompileMerge Task --> |
|
||||
<!-- This will materialize all the in-memory files list which is not marked --> |
|
||||
<!-- as excluded from packaging into the AspNetCompileMerge temp folder. --> |
|
||||
<!--ToDo: remove the condition on ContentPath AspNetCompileMerge (we are doing it now because IIS team is not support it yet--> |
|
||||
<!-- ******************************************************************** --> |
|
||||
<PropertyGroup> |
|
||||
<CopyAllFilesToSingleFolderForAspNetCompileMergeDependsOn> |
|
||||
$(OnBeforeCopyAllFilesToSingleFolderForAspNetCompileMerge); |
|
||||
ConfigureFoldersForAspNetCompileMerge; |
|
||||
$(CopyAllFilesToSingleFolderForAspNetCompileMergeDependsOn); |
|
||||
</CopyAllFilesToSingleFolderForAspNetCompileMergeDependsOn> |
|
||||
</PropertyGroup> |
|
||||
<Target Name="CopyAllFilesToSingleFolderForAspNetCompileMerge" |
|
||||
DependsOnTargets="$(CopyAllFilesToSingleFolderForAspNetCompileMergeDependsOn)" |
|
||||
Condition="'$(UseMetabasePath)' != 'true'"> |
|
||||
|
|
||||
<!-- In the case of the incremental Packaging/Publish, we need to find out the extra file and delete them--> |
|
||||
<ItemGroup> |
|
||||
<_AllExtraFilesUnder_PreAspnetCompileMergeSingleTargetFolder Include="$(_PreAspnetCompileMergeSingleTargetFolder)\**" /> |
|
||||
<_AllExtraFilesUnder_PreAspnetCompileMergeSingleTargetFolder |
|
||||
Remove="@(FilesForPackagingFromProject->'$(_PreAspnetCompileMergeSingleTargetFolder)\%(DestinationRelativePath)')" /> |
|
||||
</ItemGroup> |
|
||||
<!--Remove all extra files in the temp folder that's not in the @(FilesForPackagingFromProject--> |
|
||||
<Delete Files="@(_AllExtraFilesUnder_PreAspnetCompileMergeSingleTargetFolder)" /> |
|
||||
|
|
||||
<!-- Make sure the folder exist --> |
|
||||
<MakeDir Directories="$(_PreAspnetCompileMergeSingleTargetFolder)" Condition="!Exists('$(_PreAspnetCompileMergeSingleTargetFolder)')"/> |
|
||||
|
|
||||
<!--Get Localized string before displaying message--> |
|
||||
<GetPublishingLocalizedString |
|
||||
Importance="High" |
|
||||
ID="PublishLocalizedString_WebPublishPipelineMaterializeAllFilesToTempDir" |
|
||||
ArgumentCount="1" |
|
||||
Arguments="$(_PreAspnetCompileMergeSingleTargetFolder)" |
|
||||
LogType="Message" /> |
|
||||
|
|
||||
<!--Force Copy Of all file to the $(_PreAspnetCompileMergeSingleTargetFolder) if needed--> |
|
||||
<CopyPipelineFiles PipelineItems="@(FilesForPackagingFromProject)" |
|
||||
SourceDirectory="$(WebPublishPipelineProjectDirectory)" |
|
||||
TargetDirectory="$(_PreAspnetCompileMergeSingleTargetFolder)" |
|
||||
SkipMetadataExcludeTrueItems="True" |
|
||||
UpdateItemSpec="True" |
|
||||
DeleteItemsMarkAsExcludeTrue ="True"> |
|
||||
<Output TaskParameter="ResultPipelineItems" ItemName="_Files_PreAspnetCompileMergeSingleTargetFolder"/> |
|
||||
</CopyPipelineFiles> |
|
||||
|
|
||||
<!--Workaround the MSBuild 2.0 limitation--> |
|
||||
<ItemGroup> |
|
||||
<FilesForPackagingFromProject Remove="@(FilesForPackagingFromProject)" /> |
|
||||
<FilesForPackagingFromProject Include="@(_Files_PreAspnetCompileMergeSingleTargetFolder)" /> |
|
||||
</ItemGroup> |
|
||||
|
|
||||
<WriteLinesToFile Condition="$(EnablePackageProcessLoggingAndAssert)" |
|
||||
Encoding="utf-8" |
|
||||
File="$(IntermediateOutputPath)\FilesForPackagingFromProjectInPreAspNetComopileMergeCopied.txt" |
|
||||
Lines="@(FilesForPackagingFromProject->' |
|
||||
Files:%(Identity) |
|
||||
FromTarget:%(FromTarget) |
|
||||
DestinationRelativePath:%(DestinationRelativePath)')" |
|
||||
Overwrite="True" /> |
|
||||
|
|
||||
|
|
||||
<!--Remove all Empty folder that's left. Since it is not critical, we only log warning if we failed to delete empty folder.--> |
|
||||
<RemoveEmptyDirectories Directories="$(_PreAspnetCompileMergeSingleTargetFolder)" LogErrorAsWarning="True" /> |
|
||||
<MakeDir Directories="$(_PreAspnetCompileMergeSingleTargetFolder)" Condition="!Exists('$(_PreAspnetCompileMergeSingleTargetFolder)')"/> |
|
||||
|
|
||||
<CallTarget Targets="$(OnAfterCopyAllFilesToSingleFolderForAspNetCompileMerge)" RunEachTargetSeparately="False" /> |
|
||||
</Target> |
|
||||
|
|
||||
|
|
||||
|
|
||||
<!--********************************************************************--> |
|
||||
<!--Target PostAspNetCompileMergeCollectFiles --> |
|
||||
<!--********************************************************************--> |
|
||||
<PropertyGroup> |
|
||||
<PostAspNetCompileMergeCollectFilesDependsOn> |
|
||||
$(OnBeforePostAspNetCompileMergeCollectFiles); |
|
||||
$(PostAspNetCompileMergeCollectFilesDependsOn); |
|
||||
AspNetMerge; |
|
||||
</PostAspNetCompileMergeCollectFilesDependsOn> |
|
||||
</PropertyGroup> |
|
||||
|
|
||||
<Target Name="PostAspNetCompileMergeCollectFiles" |
|
||||
Outputs="@(FilesForPackagingFromProject)" |
|
||||
DependsOnTargets="$(PostAspNetCompileMergeCollectFilesDependsOn)"> |
|
||||
|
|
||||
<!--need to consolate the @(FilesForPackagingFromProject) and @(_AspnetCompileMergePrecompiledOutput)--> |
|
||||
|
|
||||
<ItemGroup> |
|
||||
<_AspnetCompileMergePrecompiledOutput Include="@(_AspnetCompileMergePrecompiledOutputNoMetadata->'$(_PostAspnetCompileMergeSingleTargetFolder)\%(Identity)')"> |
|
||||
<DestinationRelativePath>%(_AspnetCompileMergePrecompiledOutputNoMetadata.Identity)</DestinationRelativePath> |
|
||||
</_AspnetCompileMergePrecompiledOutput> |
|
||||
</ItemGroup> |
|
||||
|
|
||||
|
|
||||
<!--This exclude if the filter item's DestinationRelativePath is specified. |
|
||||
This is useful for case like Reference Dll and pdb where the source is not under the current project.--> |
|
||||
<FilterByItems PipelineItems="@(FilesForPackagingFromProject)" |
|
||||
SourceMetadataName="DestinationRelativePath" |
|
||||
FilterRootFolder="$(_PostAspnetCompileMergeSingleTargetFolderFullPath)" |
|
||||
FilterBaseOnRelativePath="True" |
|
||||
FilterMetadataName="DestinationRelativePath" |
|
||||
Filter="@(_AspnetCompileMergePrecompiledOutput)"> |
|
||||
<Output TaskParameter="InFilter" ItemName="_FilesForPackagingFromProject_in_AspnetCompileMergePrecompiledOutput"/> |
|
||||
</FilterByItems> |
|
||||
|
|
||||
<!--Keep the Item meta from the original @(FilesForPackagingFromProject)--> |
|
||||
<ItemGroup> |
|
||||
<_AspnetCompileMergePrecompiledOutput Remove="@(_FilesForPackagingFromProject_in_AspnetCompileMergePrecompiledOutput->'%(FilterItemSpec)')" /> |
|
||||
<_AspnetCompileMergePrecompiledOutput Include="@(_FilesForPackagingFromProject_in_AspnetCompileMergePrecompiledOutput->'%(FilterItemSpec)')" /> |
|
||||
</ItemGroup> |
|
||||
|
|
||||
<!--Workaround the MSBuild 2.0 limitation--> |
|
||||
<ItemGroup> |
|
||||
<FilesForPackagingFromProject Remove="@(FilesForPackagingFromProject)" /> |
|
||||
<FilesForPackagingFromProject Include="@(_AspnetCompileMergePrecompiledOutput)" /> |
|
||||
</ItemGroup> |
|
||||
|
|
||||
|
|
||||
|
|
||||
<WriteLinesToFile Condition="$(EnablePackageProcessLoggingAndAssert)" |
|
||||
Encoding="utf-8" |
|
||||
File="$(IntermediateOutputPath)\FilesForPackagingFromPostAspNetCompileMergeCollectFiles.txt" |
|
||||
Lines="@(FilesForPackagingFromProject->' |
|
||||
Files:%(Identity) |
|
||||
FromTarget:%(FromTarget) |
|
||||
DestinationRelativePath:%(DestinationRelativePath)')" |
|
||||
Overwrite="True" /> |
|
||||
|
|
||||
<CallTarget Targets="$(OnAfterPostAspNetCompileMergeCollectFiles)" RunEachTargetSeparately="False" /> |
|
||||
</Target> |
|
||||
|
|
||||
|
|
||||
|
|
||||
<!--********************************************************************--> |
|
||||
<!--Target CleanPostAspNetCompileMergeFolder --> |
|
||||
<!--********************************************************************--> |
|
||||
<PropertyGroup> |
|
||||
<CleanPostAspNetCompileMergeFolderDependsOn> |
|
||||
$(OnBeforeCleanPostAspNetCompileMergeFolder); |
|
||||
$(CleanPostAspNetCompileMergeFolderDependsOn); |
|
||||
ConfigureFoldersForAspNetCompileMerge; |
|
||||
</CleanPostAspNetCompileMergeFolderDependsOn> |
|
||||
</PropertyGroup> |
|
||||
|
|
||||
<Target Name="CleanPostAspNetCompileMergeFolder" |
|
||||
Outputs="@(FilesForPackagingFromProject)" |
|
||||
DependsOnTargets="$(CleanPostAspNetCompileMergeFolderDependsOn)"> |
|
||||
|
|
||||
<RemoveDir Condition="'$(_PostAspnetCompileMergeSingleTargetFolder)' != '' And Exists($(_PostAspnetCompileMergeSingleTargetFolder))" |
|
||||
Directories="$(_PostAspnetCompileMergeSingleTargetFolder)" /> |
|
||||
|
|
||||
<CallTarget Targets="$(OnAfterCleanPostAspNetCompileMergeFolder)" RunEachTargetSeparately="False" /> |
|
||||
</Target> |
|
||||
|
|
||||
<!--********************************************************************--> |
|
||||
<!--Target PipelineAspNetCompileMergePhase --> |
|
||||
<!--********************************************************************--> |
|
||||
<PropertyGroup> |
|
||||
<PipelineAspNetCompileMergePhaseDependsOn> |
|
||||
$(OnBeforePipelineAspNetCompileMergePhase); |
|
||||
$(PipelineAspNetCompileMergePhaseDependsOn); |
|
||||
CleanPostAspNetCompileMergeFolder; |
|
||||
CopyAllFilesToSingleFolderForAspNetCompileMerge; |
|
||||
AspNetPreCompile; |
|
||||
AspNetMerge; |
|
||||
PostAspNetCompileMergeCollectFiles; |
|
||||
</PipelineAspNetCompileMergePhaseDependsOn> |
|
||||
<PipelineAspNetCompileMergePhaseAfterTargets Condition="'$(PipelineAspNetCompileMergePhaseAfterTargets)' == '' "> |
|
||||
PipelineTransformPhase; |
|
||||
</PipelineAspNetCompileMergePhaseAfterTargets> |
|
||||
</PropertyGroup> |
|
||||
|
|
||||
<Target Name="PipelineAspNetCompileMergePhase" |
|
||||
Outputs="@(FilesForPackagingFromProject)" |
|
||||
DependsOnTargets="$(PipelineAspNetCompileMergePhaseDependsOn)" |
|
||||
AfterTargets="$(PipelineAspNetCompileMergePhaseAfterTargets)"> |
|
||||
<!--This is a phase separation point--> |
|
||||
|
|
||||
<!--Get Localized string before displaying message--> |
|
||||
<GetPublishingLocalizedString |
|
||||
ID="PublishLocalizedString_WebPublishPipelinePhase" |
|
||||
ArgumentCount="1" |
|
||||
Arguments="AspnetCompileMerge" |
|
||||
LogType="Message" /> |
|
||||
<!--<Message Text="Pipeline AspNetCompileMerge Phase" />--> |
|
||||
|
|
||||
<CallTarget Targets="$(OnAfterPipelineAspNetCompileMergePhase)" RunEachTargetSeparately="False" /> |
|
||||
</Target> |
|
||||
|
|
||||
|
|
||||
<!--ImportAfter Extension--> |
|
||||
<PropertyGroup> |
|
||||
<ImportByWildcardAfterMicrosoftWebPublishingTransformTargets Condition="'$(ImportByWildcardAfterMicrosoftWebPublishingTransformTargets)'==''">true</ImportByWildcardAfterMicrosoftWebPublishingTransformTargets> |
|
||||
</PropertyGroup> |
|
||||
<Import Project="$(MSBuildThisFileDirectory)\$(MSBuildThisFileName)\ImportAfter\*" Condition="'$(ImportByWildcardAfterMicrosoftWebPublishingTransformTargets)' == 'true' and exists('$(MSBuildThisFileDirectory)\$(MSBuildThisFileName)\ImportAfter')"/> |
|
||||
</Project> |
|
||||
Binary file not shown.
@ -1,396 +0,0 @@ |
|||||
<!-- |
|
||||
*********************************************************************************************** |
|
||||
Microsoft.WebApplication.targets |
|
||||
|
|
||||
WARNING: DO NOT MODIFY this file unless you are knowledgeable about MSBuild and have |
|
||||
created a backup copy. Incorrect changes to this file will make it |
|
||||
impossible to load or build your web deploy projects from the command-line or the IDE. |
|
||||
|
|
||||
This file defines the steps in the standard build process for web application projects. |
|
||||
|
|
||||
Copyright (C) Microsoft Corporation. All rights reserved. |
|
||||
*********************************************************************************************** |
|
||||
--> |
|
||||
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> |
|
||||
<UsingTask TaskName="Microsoft.WebApplication.Build.Tasks.GetSilverlightItemsFromProperty" AssemblyFile="Microsoft.WebApplication.Build.Tasks.dll" /> |
|
||||
<UsingTask TaskName="Microsoft.WebApplication.Build.Tasks.CopyFilesToFolders" AssemblyFile="Microsoft.WebApplication.Build.Tasks.dll" /> |
|
||||
|
|
||||
<PropertyGroup> |
|
||||
<IsDesktopBuild Condition="'$(IsDesktopBuild)'=='' And '$(TeamFoundationServerUrl)' != ''">False</IsDesktopBuild> |
|
||||
<WebProjectOutputDirInsideProjectDefault>True</WebProjectOutputDirInsideProjectDefault> |
|
||||
<WebProjectOutputDirInsideProjectDefault Condition="('$(OutDir)' != '$(OutputPath)') Or ('$(IsDesktopBuild)' == 'False')" >False</WebProjectOutputDirInsideProjectDefault> |
|
||||
<WebProjectOutputDirInsideProject Condition="'$(WebProjectOutputDirInsideProject)' == ''">$(WebProjectOutputDirInsideProjectDefault)</WebProjectOutputDirInsideProject> |
|
||||
<DisableLinkInCopyWebApplicaton Condition="'$(DisableLinkInCopyWebApplicaton)'==''">False</DisableLinkInCopyWebApplicaton> |
|
||||
<Disable_CopyWebApplication Condition="'$(Disable_CopyWebApplication)' == ''">False</Disable_CopyWebApplication> |
|
||||
<UseWPP_CopyWebApplication Condition="'$(UseWPP_CopyWebApplication)' == ''">False</UseWPP_CopyWebApplication> |
|
||||
<CleanWebProjectOutputDir>True</CleanWebProjectOutputDir> |
|
||||
<CleanWebProjectOutputDir Condition="$(WebProjectOutputDirInsideProject)" >False</CleanWebProjectOutputDir> |
|
||||
</PropertyGroup> |
|
||||
|
|
||||
<!--Only setup $(WebProjectOutputDir) iff user haven't set it up--> |
|
||||
<PropertyGroup Condition="'$(WebProjectOutputDir)'==''"> |
|
||||
<WebProjectOutputDir>$(MSBuildProjectDirectory)</WebProjectOutputDir> |
|
||||
<WebProjectOutputDir Condition="!$(WebProjectOutputDirInsideProject)">$(OutDir)_PublishedWebsites\$(MSBuildProjectName)</WebProjectOutputDir> |
|
||||
</PropertyGroup> |
|
||||
|
|
||||
<PropertyGroup> |
|
||||
<PrepareForRunDependsOn> |
|
||||
$(PrepareForRunDependsOn); |
|
||||
CopySilverlightApplications; |
|
||||
_CopyBinDeployableAssemblies; |
|
||||
</PrepareForRunDependsOn> |
|
||||
<PrepareForRunDependsOn Condition="!$(Disable_CopyWebApplication)"> |
|
||||
$(PrepareForRunDependsOn); |
|
||||
_CopyWebApplication; |
|
||||
_BuiltWebOutputGroupOutput |
|
||||
</PrepareForRunDependsOn> |
|
||||
</PropertyGroup> |
|
||||
|
|
||||
<!--***************************************************************--> |
|
||||
<!--Global setting for Clean target --> |
|
||||
<!--***************************************************************--> |
|
||||
<PropertyGroup> |
|
||||
<CleanDependsOn> |
|
||||
$(CleanDependsOn); |
|
||||
CleanWebProjectOutputDir; |
|
||||
</CleanDependsOn> |
|
||||
</PropertyGroup> |
|
||||
|
|
||||
<!--********************************************************************--> |
|
||||
<!-- CleanWebProjectOutputDir --> |
|
||||
<!-- ********************************************************************--> |
|
||||
<PropertyGroup> |
|
||||
<CleanWebProjectOutputDirDependsOn Condition="'$(CleanWebProjectOutputDirDependsOn)' == ''"> |
|
||||
</CleanWebProjectOutputDirDependsOn> |
|
||||
</PropertyGroup> |
|
||||
<Target Name="CleanWebProjectOutputDir" |
|
||||
Condition="$(CleanWebProjectOutputDir)" |
|
||||
DependsOnTargets="$(CleanWebProjectOutputDirDependsOn)"> |
|
||||
<!--Assertion check--> |
|
||||
<!--In the case of Clean Packaging/Publish, we simply delete the WebProjectOutputDir--> |
|
||||
<RemoveDir Condition="Exists($(WebProjectOutputDir))" Directories="$(WebProjectOutputDir)" ContinueOnError="true" /> |
|
||||
</Target> |
|
||||
|
|
||||
<!-- |
|
||||
============================================================ |
|
||||
_CopyWebApplication |
|
||||
|
|
||||
This target will copy the build outputs along with the |
|
||||
content files into a _PublishedWebsites folder. |
|
||||
|
|
||||
This Task is only necessary when $(OutDir) has been redirected |
|
||||
to a folder other than ~\bin such as is the case with Team Build. |
|
||||
|
|
||||
The original _CopyWebApplication is now a Legacy, you can still use it by setting $(UseWPP_CopyWebApplication) to true. |
|
||||
By default, it now change to use _WPPCopyWebApplication target in Microsoft.Web.Publish.targets. It allow to leverage the web.config trsnaformation. |
|
||||
============================================================ |
|
||||
--> |
|
||||
|
|
||||
<PropertyGroup> |
|
||||
<!--This will be overwrite by ..\web\Microsoft.Web.Publishing.targets when $(UseWPP_CopyWebApplication) set to true--> |
|
||||
<OnBefore_CopyWebApplicationDefault> |
|
||||
_CopyWebApplicationLegacy; |
|
||||
</OnBefore_CopyWebApplicationDefault> |
|
||||
<OnBefore_CopyWebApplicationDefault Condition="$(UseWPP_CopyWebApplication) AND Exists('$(MSBuildThisFileDirectory)\..\Web\Microsoft.Web.Publishing.targets')"> |
|
||||
_WPPCopyWebApplication; |
|
||||
</OnBefore_CopyWebApplicationDefault> |
|
||||
<OnBefore_CopyWebApplication Condition="'$(OnBefore_CopyWebApplication)'==''"> |
|
||||
$(OnBefore_CopyWebApplicationDefault); |
|
||||
</OnBefore_CopyWebApplication> |
|
||||
|
|
||||
<OnAfter_CopyWebApplication Condition="'$(OnAfter_CopyWebApplication)'==''"> |
|
||||
</OnAfter_CopyWebApplication> |
|
||||
|
|
||||
<_CopyWebApplicationDependsOn Condition="'$(_CopyWebApplicationDependsOn)'==''"> |
|
||||
$(OnBefore_CopyWebApplication); |
|
||||
</_CopyWebApplicationDependsOn> |
|
||||
|
|
||||
</PropertyGroup> |
|
||||
<Target Name="_CopyWebApplication" |
|
||||
Condition="!$(Disable_CopyWebApplication) And '$(OutDir)' != '$(OutputPath)'" |
|
||||
DependsOnTargets="$(_CopyWebApplicationDependsOn)"> |
|
||||
|
|
||||
<CallTarget Condition="'$(OnAfter_CopyWebApplication)' != ''" Targets="$(OnAfter_CopyWebApplication)" RunEachTargetSeparately="true" /> |
|
||||
|
|
||||
</Target> |
|
||||
|
|
||||
<!-- |
|
||||
============================================================ |
|
||||
_CopyWebApplicationLegacy |
|
||||
|
|
||||
This target will copy the build outputs along with the |
|
||||
content files into a _PublishedWebsites folder. |
|
||||
|
|
||||
This Task is only necessary when $(OutDir) has been redirected |
|
||||
to a folder other than ~\bin such as is the case with Team Build. |
|
||||
============================================================ |
|
||||
--> |
|
||||
<Target Name="_CopyWebApplicationLegacy" Condition="!$(Disable_CopyWebApplication) And '$(OutDir)' != '$(OutputPath)'" > |
|
||||
<!-- Log tasks --> |
|
||||
<Message Text="Copying Web Application Project Files for $(MSBuildProjectName)" /> |
|
||||
|
|
||||
<!-- Create the _PublishedWebsites\app\bin folder --> |
|
||||
<MakeDir Directories="$(WebProjectOutputDir)\bin" /> |
|
||||
|
|
||||
<!-- Copy build outputs to _PublishedWebsites\app\bin folder --> |
|
||||
<Copy SourceFiles="@(IntermediateAssembly)" DestinationFolder="$(WebProjectOutputDir)\bin" |
|
||||
SkipUnchangedFiles="true" |
|
||||
Retries="$(CopyRetryCount)" |
|
||||
RetryDelayMilliseconds="$(CopyRetryDelayMilliseconds)"/> |
|
||||
<Copy SourceFiles="@(AddModules)" |
|
||||
DestinationFolder="$(WebProjectOutputDir)\bin" |
|
||||
SkipUnchangedFiles="true" |
|
||||
Retries="$(CopyRetryCount)" |
|
||||
RetryDelayMilliseconds="$(CopyRetryDelayMilliseconds)"/> |
|
||||
<Copy SourceFiles="$(IntermediateOutputPath)$(_SGenDllName)" |
|
||||
DestinationFolder="$(WebProjectOutputDir)\%(Content.SubFolder)%(Content.RecursiveDir)" |
|
||||
SkipUnchangedFiles="true" |
|
||||
Condition="'$(_SGenDllCreated)'=='true'" |
|
||||
Retries="$(CopyRetryCount)" |
|
||||
RetryDelayMilliseconds="$(CopyRetryDelayMilliseconds)"/> |
|
||||
<Copy SourceFiles="$(IntermediateOutputPath)$(TargetName).pdb" |
|
||||
DestinationFolder="$(WebProjectOutputDir)\bin" |
|
||||
SkipUnchangedFiles="true" |
|
||||
Condition="'$(_DebugSymbolsProduced)'=='true'" |
|
||||
Retries="$(CopyRetryCount)" |
|
||||
RetryDelayMilliseconds="$(CopyRetryDelayMilliseconds)"/> |
|
||||
<Copy SourceFiles="@(DocFileItem)" |
|
||||
DestinationFolder="$(WebProjectOutputDir)\bin" |
|
||||
SkipUnchangedFiles="true" |
|
||||
Condition="'$(_DocumentationFileProduced)'=='true'" |
|
||||
Retries="$(CopyRetryCount)" |
|
||||
RetryDelayMilliseconds="$(CopyRetryDelayMilliseconds)"/> |
|
||||
<Copy SourceFiles="@(IntermediateSatelliteAssembliesWithTargetPath)" |
|
||||
DestinationFiles="@(IntermediateSatelliteAssembliesWithTargetPath->'$(WebProjectOutputDir)\bin\%(Culture)\$(TargetName).resources.dll')" |
|
||||
SkipUnchangedFiles="true" |
|
||||
Retries="$(CopyRetryCount)" |
|
||||
RetryDelayMilliseconds="$(CopyRetryDelayMilliseconds)"/> |
|
||||
<Copy SourceFiles="@(ReferenceComWrappersToCopyLocal); @(ResolvedIsolatedComModules); @(_DeploymentLooseManifestFile); @(NativeReferenceFile)" |
|
||||
DestinationFolder="$(WebProjectOutputDir)\bin" |
|
||||
SkipUnchangedFiles="true" |
|
||||
Retries="$(CopyRetryCount)" |
|
||||
RetryDelayMilliseconds="$(CopyRetryDelayMilliseconds)"/> |
|
||||
|
|
||||
<!-- copy any referenced assemblies to _PublishedWebsites\app\bin folder --> |
|
||||
<Copy SourceFiles="@(ReferenceCopyLocalPaths)" |
|
||||
DestinationFiles="@(ReferenceCopyLocalPaths->'$(WebProjectOutputDir)\bin\%(DestinationSubDirectory)%(Filename)%(Extension)')" |
|
||||
SkipUnchangedFiles="true" |
|
||||
Retries="$(CopyRetryCount)" |
|
||||
RetryDelayMilliseconds="$(CopyRetryDelayMilliseconds)"/> |
|
||||
|
|
||||
<!-- Copy content files recursively to _PublishedWebsites\app\ folder --> |
|
||||
<Copy SourceFiles="@(Content)" Condition="'%(Content.Link)' == ''" |
|
||||
DestinationFolder="$(WebProjectOutputDir)\%(Content.RelativeDir)" |
|
||||
SkipUnchangedFiles="true" |
|
||||
Retries="$(CopyRetryCount)" |
|
||||
RetryDelayMilliseconds="$(CopyRetryDelayMilliseconds)" /> |
|
||||
<Copy SourceFiles="@(Content)" Condition="!$(DisableLinkInCopyWebApplicaton) And '%(Content.Link)' != ''" |
|
||||
DestinationFiles="$(WebProjectOutputDir)\%(Content.Link)" |
|
||||
SkipUnchangedFiles="true" |
|
||||
Retries="$(CopyRetryCount)" |
|
||||
RetryDelayMilliseconds="$(CopyRetryDelayMilliseconds)"/> |
|
||||
|
|
||||
<!-- Copy items that have been marked to be copied to the bin folder --> |
|
||||
<Copy SourceFiles="@(_SourceItemsToCopyToOutputDirectory)" |
|
||||
DestinationFolder="$(WebProjectOutputDir)\bin" |
|
||||
SkipUnchangedFiles="true" |
|
||||
Retries="$(CopyRetryCount)" |
|
||||
RetryDelayMilliseconds="$(CopyRetryDelayMilliseconds)"/> |
|
||||
<Copy SourceFiles="@(_SourceItemsToCopyToOutputDirectoryAlways)" |
|
||||
DestinationFolder="$(WebProjectOutputDir)\bin" |
|
||||
SkipUnchangedFiles="false" |
|
||||
Retries="$(CopyRetryCount)" |
|
||||
RetryDelayMilliseconds="$(CopyRetryDelayMilliseconds)"/> |
|
||||
|
|
||||
<!-- Copy Silverlight Zip and Xzp file to _PublishedWebsites\app\ folder--> |
|
||||
<Copy SourceFiles="@(_WebApplicationSilverlightXapFiles)" |
|
||||
DestinationFolder="$(WebProjectOutputDir)\%(_WebApplicationSilverlightXapFiles.RelativeDir)" |
|
||||
SkipUnchangedFiles="true" |
|
||||
Retries="$(CopyRetryCount)" |
|
||||
RetryDelayMilliseconds="$(CopyRetryDelayMilliseconds)"/> |
|
||||
|
|
||||
<!-- Copy items that need to be bin deployed to the bin folder --> |
|
||||
<Copy SourceFiles="@(_binDeployableAssemblies)" |
|
||||
DestinationFolder="$(WebProjectOutputDir)\bin\%(_binDeployableAssemblies.DestinationRelPath)" |
|
||||
SkipUnchangedFiles="true" |
|
||||
Retries="$(CopyRetryCount)" |
|
||||
RetryDelayMilliseconds="$(CopyRetryDelayMilliseconds)"/> |
|
||||
|
|
||||
</Target> |
|
||||
|
|
||||
<!-- |
|
||||
============================================================ |
|
||||
_BuiltWebOutputGroupOutput |
|
||||
|
|
||||
This target creates and populates BuiltWebOutputGroupOutput |
|
||||
with contents of bin along with the @(Content) files |
|
||||
============================================================ |
|
||||
--> |
|
||||
<Target Name ="_BuiltWebOutputGroupOutput" |
|
||||
Condition="!$(Disable_CopyWebApplication)" |
|
||||
Outputs="@(BuiltWebOutputGroupOutput)"> |
|
||||
<CreateItem Include="$(WebProjectOutputDir)\bin\**\*.*;@(Content->'%(FullPath)')" Condition="'$(OutDir)' == '$(OutputPath)'"> |
|
||||
<Output ItemName="BuiltWebOutputGroupOutput" TaskParameter="Include"/> |
|
||||
</CreateItem> |
|
||||
|
|
||||
<CreateItem Include="$(WebProjectOutputDir)\**\*.*" Condition="'$(OutDir)' != '$(OutputPath)'"> |
|
||||
<Output ItemName="BuiltWebOutputGroupOutput" TaskParameter="Include"/> |
|
||||
</CreateItem> |
|
||||
</Target> |
|
||||
|
|
||||
<!-- |
|
||||
============================================================ |
|
||||
_GetSilverlightApplications |
|
||||
|
|
||||
Converts the list of Silverlight Applications that are defined |
|
||||
in the property $(SilverlightApplicationList) to ITaskItems that |
|
||||
can be used by teh CopySilverlightApplication task |
|
||||
The format of $(SilverlightApplicationList) is: |
|
||||
{projGuid}|relPath|tgtFolder;{projGuid2}|relPathToProject2|tgtFolder2;... |
|
||||
============================================================ |
|
||||
--> |
|
||||
<Target |
|
||||
Name="_GetSilverlightApplications" |
|
||||
Condition="'$(SilverlightApplicationList)' != ''"> |
|
||||
|
|
||||
<GetSilverlightItemsFromProperty |
|
||||
SilverlightReferences="$(SilverlightApplicationList)" |
|
||||
ProjectPath="$(MSBuildProjectFullPath)"> |
|
||||
|
|
||||
<Output TaskParameter="SilverlightApplications" ItemName="_AllSilverlightApplications"/> |
|
||||
</GetSilverlightItemsFromProperty> |
|
||||
|
|
||||
<!-- Break the silverlight application list into two lists: those that exist on disk and those that don't. --> |
|
||||
<ItemGroup> |
|
||||
<_SilverlightApplications Include="@(_AllSilverlightApplications)" Condition="Exists('%(Identity)')"/> |
|
||||
<_SilverlightApplicationsNotExist Include="@(_AllSilverlightApplications)" Condition="!Exists('%(Identity)')"/> |
|
||||
</ItemGroup> |
|
||||
|
|
||||
</Target> |
|
||||
|
|
||||
<!-- |
|
||||
============================================================ |
|
||||
CopySilverlightApplications |
|
||||
|
|
||||
This target copies the output xap files from referenced |
|
||||
Silverlight application projects to the target folder. |
|
||||
============================================================ |
|
||||
--> |
|
||||
<Target |
|
||||
Name="CopySilverlightApplications" |
|
||||
DependsOnTargets="_GetSilverlightApplications" |
|
||||
Outputs="@(_WebApplicationSilverlightXapFiles)" |
|
||||
Condition="'$(BuildingInsideVisualStudio)' != 'true'"> |
|
||||
|
|
||||
<!-- |
|
||||
When building this project from the IDE or when building a .SLN from the command-line, |
|
||||
just gather the referenced build outputs (Xap files). The code that builds the .SLN will already have |
|
||||
built the project, so there's no need to do it again here. Since Silverlight only supports AnyCPU that is |
|
||||
what we use for the platform |
|
||||
|
|
||||
The ContinueOnError setting is here so that, during project load, as |
|
||||
much information as possible will be passed to the compilers. |
|
||||
--> |
|
||||
<MSBuild |
|
||||
Projects="@(_SilverlightApplications)" |
|
||||
Targets="GetXapOutputFile" |
|
||||
BuildInParallel= "false" |
|
||||
Properties="%(_MSBuildProjectReferenceExistent.SetConfiguration);Platform=AnyCPU;BuildingSolutionFile=false" |
|
||||
Condition="'@(_SilverlightApplications)' != ''" |
|
||||
ContinueOnError="!$(BuildingProject)"> |
|
||||
|
|
||||
<Output TaskParameter="TargetOutputs" ItemName="_SilverlightXapFiles"/> |
|
||||
|
|
||||
</MSBuild> |
|
||||
|
|
||||
<!-- |
|
||||
Build referenced projects when building from the command line. |
|
||||
|
|
||||
The $(ProjectReferenceBuildTargets) will normally be blank so that the project's default |
|
||||
target is used during a P2P reference. However if a custom build process requires that |
|
||||
the referenced project has a different target to build it can be specified. |
|
||||
--> |
|
||||
<MSBuild |
|
||||
Projects="@(_SilverlightApplications)" |
|
||||
Targets="$(ProjectReferenceBuildTargets)" |
|
||||
Properties="%(_MSBuildProjectReferenceExistent.SetConfiguration);Platform=AnyCPU;BuildingSolutionFile=false" |
|
||||
BuildInParallel="false" |
|
||||
Condition="'$(BuildingInsideVisualStudio)' != 'true' and '@(_SilverlightApplications)' != ''"> |
|
||||
</MSBuild> |
|
||||
|
|
||||
<!--Copy the outputs to the target folder--> |
|
||||
<CopyFilesToFolders SourceFiles="@(_SilverlightXapFiles)" |
|
||||
SilverlightApplications="@(_SilverlightApplications)" |
|
||||
ConfigName="$(Configuration)" |
|
||||
Condition="'@(_SilverlightXapFiles)' != ''"> |
|
||||
<Output TaskParameter="DestinationFiles" ItemName="_WebApplicationSilverlightXapFiles" /> |
|
||||
</CopyFilesToFolders> |
|
||||
|
|
||||
<!-- Issue a warning for each non-existent project. --> |
|
||||
<Warning |
|
||||
Text="The referenced Silverlight project '%(_SilverlightApplicationsNotExist.Identity)' does not exist." |
|
||||
Condition="'@(_SilverlightApplicationsNotExist)'!=''"/> |
|
||||
</Target> |
|
||||
|
|
||||
<!-- |
|
||||
============================================================ |
|
||||
_CopyBinDeployableAssemblies |
|
||||
|
|
||||
This target copies the contents of ProjectDir\_bin_deployableAssemblies to the bin |
|
||||
folder, preserving the relative paths |
|
||||
============================================================ |
|
||||
--> |
|
||||
<Target |
|
||||
Name="_CopyBinDeployableAssemblies" |
|
||||
Condition="Exists('$(MSBuildProjectDirectory)\_bin_deployableAssemblies')"> |
|
||||
|
|
||||
<PropertyGroup> |
|
||||
<BinDeployableFolder Condition="'$(BinDeployableFolder)' == ''">_bin_deployableAssemblies\</BinDeployableFolder> |
|
||||
<BinDeployableFolderFullPath>$([System.IO.Path]::GetFullPath($(BinDeployableFolder)))</BinDeployableFolderFullPath> |
|
||||
</PropertyGroup> |
|
||||
|
|
||||
<!--Pick up the deployable items from the $(None) collection that are under the _bin_deployableAssemblies folder --> |
|
||||
<CreateItem Include="@(None->'%(Identity)')" Condition="'%(None.FullPath)' != '' And $([System.String]::new('%(None.FullPath)').StartsWith($(BinDeployableFolderFullPath), StringComparison.OrdinalIgnoreCase ))" > |
|
||||
<Output ItemName="__binDeployableAssemblies" TaskParameter="Include"/> |
|
||||
</CreateItem> |
|
||||
|
|
||||
<!--Add metadata which holds the destination relative folder to copy them to--> |
|
||||
<ItemGroup> |
|
||||
<_binDeployableAssemblies Include ="@(__binDeployableAssemblies)" Condition="'@(__binDeployableAssemblies)' != ''"> |
|
||||
<DestinationRelPath>$([System.String]::Concat($([System.IO.Path]::GetDirectoryName($([System.String]::new('%(__binDeployableAssemblies.FullPath)')))),'\').SubString($(BinDeployableFolderFullPath.Length)))</DestinationRelPath> |
|
||||
</_binDeployableAssemblies> |
|
||||
</ItemGroup> |
|
||||
|
|
||||
<!-- Do the copy--> |
|
||||
<Copy SourceFiles="@(_binDeployableAssemblies)" DestinationFolder="$(OutDir)%(_binDeployableAssemblies.DestinationRelPath)" |
|
||||
SkipUnchangedFiles="true" |
|
||||
Retries="$(CopyRetryCount)" |
|
||||
RetryDelayMilliseconds="$(CopyRetryDelayMilliseconds)"/> |
|
||||
|
|
||||
<!--Add the items just copied to the collection of items to delete when doing a clean--> |
|
||||
<ItemGroup> |
|
||||
<FileWrites Include ="@(_binDeployableAssemblies->'$(OutDir)%(DestinationRelPath)%(Filename)%(Extension)')" /> |
|
||||
</ItemGroup> |
|
||||
</Target> |
|
||||
|
|
||||
<!--Import publishing target--> |
|
||||
<PropertyGroup> |
|
||||
<AspNetTargetsPath Condition=" '$(AspNetTargetsPath)'=='' ">$(MSBuildThisFileDirectory)..\Web\</AspNetTargetsPath> |
|
||||
</PropertyGroup> |
|
||||
|
|
||||
<Import Project="$(AspNetTargetsPath)Microsoft.Web.Publishing.targets" Condition="Exists('$(AspNetTargetsPath)Microsoft.Web.Publishing.targets')" /> |
|
||||
|
|
||||
<!--Ensure the Siliverlight zap file is created and copied to the bin folder for the Microsoft.Web.Publishing.targets--> |
|
||||
<PropertyGroup> |
|
||||
<OnBeforePipelineCollectFilesPhase> |
|
||||
$(OnBeforePipelineCollectFilesPhase); |
|
||||
CopySilverlightApplications; |
|
||||
</OnBeforePipelineCollectFilesPhase> |
|
||||
</PropertyGroup> |
|
||||
|
|
||||
<!-- Instruct ResolveAssemblyReferences in MS.Common.targets to generate suggested binding redirects. --> |
|
||||
<PropertyGroup> |
|
||||
<AutoUnifyAssemblyReferences>false</AutoUnifyAssemblyReferences> |
|
||||
<AppConfig Condition="'$(AppConfig)' == '' And Exists('$(ProjectConfigFileName)')">$(ProjectConfigFileName)</AppConfig> |
|
||||
</PropertyGroup> |
|
||||
</Project> |
|
||||
@ -1,432 +0,0 @@ |
|||||
using System.Net.Http; |
|
||||
using System.Security.Cryptography; |
|
||||
using System.Security.Cryptography.X509Certificates; |
|
||||
using Microsoft.AspNetCore.Authentication.Cookies; |
|
||||
using Microsoft.EntityFrameworkCore; |
|
||||
using Microsoft.IdentityModel.Tokens; |
|
||||
using OpenIddict.Client; |
|
||||
using OpenIddict.Client.WebIntegration; |
|
||||
using OpenIddict.Sandbox.AspNetCore.Client.Models; |
|
||||
using Quartz; |
|
||||
using static OpenIddict.Abstractions.OpenIddictConstants; |
|
||||
|
|
||||
namespace OpenIddict.Sandbox.AspNetCore.Client; |
|
||||
|
|
||||
public class Startup |
|
||||
{ |
|
||||
public Startup(IConfiguration configuration) |
|
||||
=> Configuration = configuration; |
|
||||
|
|
||||
public IConfiguration Configuration { get; } |
|
||||
|
|
||||
public void ConfigureServices(IServiceCollection services) |
|
||||
{ |
|
||||
services.AddDbContext<ApplicationDbContext>(options => |
|
||||
{ |
|
||||
// Configure the context to use Microsoft SQL Server.
|
|
||||
options.UseSqlite($"Filename={Path.Combine(Path.GetTempPath(), "openiddict-sandbox-aspnetcore-client.sqlite3")}"); |
|
||||
|
|
||||
// Register the entity sets needed by OpenIddict.
|
|
||||
// Note: use the generic overload if you need
|
|
||||
// to replace the default OpenIddict entities.
|
|
||||
options.UseOpenIddict(); |
|
||||
}); |
|
||||
|
|
||||
services.AddAuthentication(options => |
|
||||
{ |
|
||||
options.DefaultScheme = CookieAuthenticationDefaults.AuthenticationScheme; |
|
||||
}) |
|
||||
|
|
||||
.AddCookie(options => |
|
||||
{ |
|
||||
options.LoginPath = "/login"; |
|
||||
options.LogoutPath = "/logout"; |
|
||||
options.ExpireTimeSpan = TimeSpan.FromMinutes(50); |
|
||||
options.SlidingExpiration = false; |
|
||||
}); |
|
||||
|
|
||||
// OpenIddict offers native integration with Quartz.NET to perform scheduled tasks
|
|
||||
// (like pruning orphaned authorizations from the database) at regular intervals.
|
|
||||
services.AddQuartz(options => |
|
||||
{ |
|
||||
options.UseSimpleTypeLoader(); |
|
||||
options.UseInMemoryStore(); |
|
||||
}); |
|
||||
|
|
||||
// Register the Quartz.NET service and configure it to block shutdown until jobs are complete.
|
|
||||
services.AddQuartzHostedService(options => options.WaitForJobsToComplete = true); |
|
||||
|
|
||||
services.AddOpenIddict() |
|
||||
|
|
||||
// Register the OpenIddict core components.
|
|
||||
.AddCore(options => |
|
||||
{ |
|
||||
// Configure OpenIddict to use the Entity Framework Core stores and models.
|
|
||||
// Note: call ReplaceDefaultEntities() to replace the default OpenIddict entities.
|
|
||||
options.UseEntityFrameworkCore() |
|
||||
.UseDbContext<ApplicationDbContext>(); |
|
||||
|
|
||||
// Developers who prefer using MongoDB can remove the previous lines
|
|
||||
// and configure OpenIddict to use the specified MongoDB database:
|
|
||||
// options.UseMongoDb()
|
|
||||
// .UseDatabase(new MongoClient().GetDatabase("openiddict"));
|
|
||||
|
|
||||
// Enable Quartz.NET integration.
|
|
||||
options.UseQuartz(); |
|
||||
}) |
|
||||
|
|
||||
// Register the OpenIddict client components.
|
|
||||
.AddClient(options => |
|
||||
{ |
|
||||
// Note: this sample uses the authorization code and refresh token
|
|
||||
// flows, but you can enable the other flows if necessary.
|
|
||||
options.AllowAuthorizationCodeFlow() |
|
||||
.AllowRefreshTokenFlow(); |
|
||||
|
|
||||
// Register the signing and encryption credentials used to protect
|
|
||||
// sensitive data like the state tokens produced by OpenIddict.
|
|
||||
options.AddDevelopmentEncryptionCertificate() |
|
||||
.AddDevelopmentSigningCertificate(); |
|
||||
|
|
||||
// Register the ASP.NET Core host and configure the ASP.NET Core-specific options.
|
|
||||
options.UseAspNetCore() |
|
||||
.EnableStatusCodePagesIntegration() |
|
||||
.EnableRedirectionEndpointPassthrough() |
|
||||
.EnablePostLogoutRedirectionEndpointPassthrough(); |
|
||||
|
|
||||
// Register the System.Net.Http integration and use the identity of the current
|
|
||||
// assembly as a more specific user agent, which can be useful when dealing with
|
|
||||
// providers that use the user agent as a way to throttle requests (e.g Reddit).
|
|
||||
options.UseSystemNetHttp() |
|
||||
.SetProductInformation(typeof(Startup).Assembly); |
|
||||
|
|
||||
// Add a client registration matching the client application definition in the server project.
|
|
||||
options.AddRegistration(new OpenIddictClientRegistration |
|
||||
{ |
|
||||
Issuer = new Uri("https://localhost:44395/", UriKind.Absolute), |
|
||||
ProviderName = "Local", |
|
||||
ProviderDisplayName = "Local OIDC server", |
|
||||
|
|
||||
ClientId = "mvc", |
|
||||
Scopes = { Scopes.Email, Scopes.Profile, Scopes.OfflineAccess, "demo_api" }, |
|
||||
|
|
||||
RedirectUri = new Uri("callback/login/local", UriKind.Relative), |
|
||||
PostLogoutRedirectUri = new Uri("callback/logout/local", UriKind.Relative), |
|
||||
|
|
||||
#if SUPPORTS_PEM_ENCODED_KEY_IMPORT
|
|
||||
// On supported platforms, this application can authenticate using 3 different client
|
|
||||
// authentication methods that all offer a higher security level than shared client secrets:
|
|
||||
//
|
|
||||
// 1) tls_client_auth (PKI-based mutual TLS authentication): while it requires
|
|
||||
// setting up a proper Public Key Infrastructure, this method offers a very
|
|
||||
// high level of security, as the authorization server never has access to the
|
|
||||
// private key used by the client to authenticate itself and can dynamically check
|
|
||||
// the revocation status of the client certificate using standard PKI mechanisms.
|
|
||||
//
|
|
||||
// 2) self_signed_tls_client_auth (self-signed certificate-based mutual TLS authentication):
|
|
||||
// this method is easier to deploy than PKI-based mutual TLS authentication, while
|
|
||||
// still offering a high level of security. Unlike PKI-based mutual TLS authentication,
|
|
||||
// the revocation status of the client certificate is never checked but certificates can
|
|
||||
// be "revoked" by being removed from the JSON Web Key Set associated with the client.
|
|
||||
//
|
|
||||
// 3) private_key_jwt (JWT client assertions signed with a private key): while this
|
|
||||
// method doesn't offer the same security guarantees as mutual TLS authentication,
|
|
||||
// it is more secure than shared secrets and doesn't have the operational constraints
|
|
||||
// required by the two mutual TLS methods described above (such as TLS configuration).
|
|
||||
//
|
|
||||
// The actual client authentication method used by the OpenIddict client is automatically
|
|
||||
// selected based on the registered credentials and the methods supported by the server:
|
|
||||
// when supported by the server, mutual TLS authentication methods are always preferred.
|
|
||||
//
|
|
||||
// In all cases, no client secret is necessary but the client needs to be able to access the
|
|
||||
// private key of the certificate/key to be able to generate and sign the client assertions.
|
|
||||
|
|
||||
SigningCredentials = |
|
||||
{ |
|
||||
// Note: this certificate can be used with either tls_client_auth or private_key_jwt,
|
|
||||
// depending on the server configuration (and the client authentication methods explicitly
|
|
||||
// configured via OpenIddictClientRegistration.ClientAuthenticationMethods, if applicable).
|
|
||||
//
|
|
||||
GetPublicKeyInfrastructureCertificate(), |
|
||||
|
|
||||
// Note: this certificate can be used with either self_signed_tls_client_auth or private_key_jwt,
|
|
||||
// depending on the server configuration (and the client authentication methods explicitly
|
|
||||
// configured via OpenIddictClientRegistration.ClientAuthenticationMethods, if applicable):
|
|
||||
//
|
|
||||
// GetSelfSignedCertificate(),
|
|
||||
|
|
||||
// Note: this key can only be used with private_key_jwt as raw keys cannot be used with TLS.
|
|
||||
// GetSigningKey()
|
|
||||
}, |
|
||||
#else
|
|
||||
ClientSecret = "emCimpdc9SeOaZzN5jzm4_eek-STF6VenfVlKO1_qt0" |
|
||||
#endif
|
|
||||
}); |
|
||||
|
|
||||
// Register the Web providers integrations.
|
|
||||
//
|
|
||||
// Note: to mitigate mix-up attacks, it's recommended to use a unique redirection endpoint
|
|
||||
// URI per provider, unless all the registered providers support returning a special "iss"
|
|
||||
// parameter containing their URL as part of authorization responses. For more information,
|
|
||||
// see https://datatracker.ietf.org/doc/html/draft-ietf-oauth-security-topics#section-4.4.
|
|
||||
options.UseWebProviders() |
|
||||
.AddGitHub(options => |
|
||||
{ |
|
||||
options.SetClientId("c4ade52327b01ddacff3") |
|
||||
.SetClientSecret("da6bed851b75e317bf6b2cb67013679d9467c122") |
|
||||
.SetRedirectUri("callback/login/github"); |
|
||||
}) |
|
||||
.AddGoogle(options => |
|
||||
{ |
|
||||
options.SetClientId("1016114395689-kgtgq2p6dj27d7v6e2kjkoj54dgrrckh.apps.googleusercontent.com") |
|
||||
.SetClientSecret("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") |
|
||||
.SetRedirectUri("callback/login/google") |
|
||||
.SetAccessType(OpenIddictClientWebIntegrationConstants.Google.AccessTypes.Offline) |
|
||||
.AddScopes(Scopes.Profile); |
|
||||
}) |
|
||||
.AddReddit(options => |
|
||||
{ |
|
||||
options.SetClientId("vDLNqhrkwrvqHgnoBWF3og") |
|
||||
.SetClientSecret("Tpab28Dz0upyZLqn7AN3GFD1O-zaAw") |
|
||||
.SetRedirectUri("callback/login/reddit") |
|
||||
.SetDuration(OpenIddictClientWebIntegrationConstants.Reddit.Durations.Permanent); |
|
||||
}); |
|
||||
}); |
|
||||
|
|
||||
// Register a named HTTP client that will be used to call the demo resource API.
|
|
||||
//
|
|
||||
// Note: since the authorization server is configured to issue certificate-bound
|
|
||||
// access tokens, the client certificate MUST be attached to outgoing HTTP requests
|
|
||||
// and the mTLS subdomain (for which TLS client authentication is enabled) MUST be used.
|
|
||||
services.AddHttpClient("ApiClient") |
|
||||
#if SUPPORTS_KEYED_HTTP_CLIENT_RESOLUTION
|
|
||||
.AddAsKeyed() |
|
||||
#endif
|
|
||||
#if SUPPORTS_PEM_ENCODED_KEY_IMPORT
|
|
||||
.ConfigureHttpClient(static client => client.BaseAddress = new Uri("https://mtls.dev.localhost:44395/")) |
|
||||
.ConfigurePrimaryHttpMessageHandler(static () => new HttpClientHandler |
|
||||
{ |
|
||||
ClientCertificateOptions = ClientCertificateOption.Manual, |
|
||||
ClientCertificates = { GetPublicKeyInfrastructureCertificate().Certificate } |
|
||||
}); |
|
||||
#else
|
|
||||
.ConfigureHttpClient(static client => client.BaseAddress = new Uri("https://localhost:44395/")); |
|
||||
#endif
|
|
||||
|
|
||||
#if !SUPPORTS_KEYED_HTTP_CLIENT_RESOLUTION
|
|
||||
services.AddKeyedScoped("ApiClient", static (provider, name) => |
|
||||
{ |
|
||||
var factory = provider.GetRequiredService<IHttpClientFactory>(); |
|
||||
return factory.CreateClient((string) name!); |
|
||||
}); |
|
||||
#endif
|
|
||||
|
|
||||
services.AddMvc(); |
|
||||
} |
|
||||
|
|
||||
public void Configure(IApplicationBuilder app) |
|
||||
{ |
|
||||
app.UseDeveloperExceptionPage(); |
|
||||
|
|
||||
app.UseStaticFiles(); |
|
||||
|
|
||||
app.UseStatusCodePagesWithReExecute("/error"); |
|
||||
|
|
||||
#if SUPPORTS_ENDPOINT_ROUTING
|
|
||||
app.UseRouting(); |
|
||||
#endif
|
|
||||
app.UseAuthentication(); |
|
||||
|
|
||||
#if SUPPORTS_AUTHORIZATION_MIDDLEWARE
|
|
||||
app.UseAuthorization(); |
|
||||
#endif
|
|
||||
|
|
||||
#if SUPPORTS_ENDPOINT_ROUTING
|
|
||||
app.UseEndpoints(options => |
|
||||
{ |
|
||||
options.MapControllers(); |
|
||||
options.MapDefaultControllerRoute(); |
|
||||
}); |
|
||||
#else
|
|
||||
app.UseMvcWithDefaultRoute(); |
|
||||
#endif
|
|
||||
} |
|
||||
|
|
||||
#if SUPPORTS_PEM_ENCODED_KEY_IMPORT
|
|
||||
#pragma warning disable CS8321
|
|
||||
static X509SigningCredentials GetPublicKeyInfrastructureCertificate() |
|
||||
{ |
|
||||
// Note: OpenIddict only negotiates PKI-based or self-signed mutual
|
|
||||
// TLS authentication if the certificate explicitly contains the
|
|
||||
// "digitalSignature" key usage and the "clientAuth" extended key usage.
|
|
||||
var certificate = X509Certificate2.CreateFromPem( |
|
||||
certPem: $"""
|
|
||||
-----BEGIN CERTIFICATE----- |
|
||||
MIIEezCCAmOgAwIBAgIRALTZE9ezjPCWDFr38cp6AMAwDQYJKoZIhvcNAQELBQAw |
|
||||
GjEYMBYGA1UEAxMPSW50ZXJtZWRpYXRlIENBMCAXDTI2MDIwMTE0MTQ0M1oYDzIx |
|
||||
MjYwMjAyMTQxNDQzWjAaMRgwFgYDVQQDEw9FbmQgY2VydGlmaWNhdGUwggEiMA0G |
|
||||
CSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDMs9spnvKeKw6VwPbpB47ikC6bL0Cn |
|
||||
S+K19Fp8dJg8b4dA1J1Y8dA2gi2nU/+ntOMYp1A6EvMZ8UpbgnSmhUN/2JQFU5Hc |
|
||||
PP0/IMjZAl2Iseh2yiK3Ril4Agbng6YW7e9P5YtMV+6i/stYujwNTXsUMr/+QSUI |
|
||||
Nze7856XSIl9gRjWEKJ17Jk/tJpun/zdpl4hXcptrsxxLU/E03bC3LcjiXzg8/Zl |
|
||||
3/oEHqcHfv9C8RTdIBBw66zJAYzGfxwV31cJ9QQ2udlipi2l+ZR6jFWzzJI4XmiC |
|
||||
FzdwZRvhMLJsyK5miVIl0qPp3zJ2IyEb/2pLA0bc/ylZwVq6Z49k2xhZAgMBAAGj |
|
||||
gbkwgbYwDAYDVR0TAQH/BAIwADAOBgNVHQ8BAf8EBAMCB4AwFgYDVR0lAQH/BAww |
|
||||
CgYIKwYBBQUHAwIwHQYDVR0OBBYEFHPamNF/deBBv5JpDwiiRctPw4ziMEkGA1Ud |
|
||||
IwRCMECAFOEWwW18w3rZ6/5iIwAB12592OlHoRakFDASMRAwDgYDVQQDEwdSb290 |
|
||||
IENBghBvqw/xqI/LNgVfSURP9ck7MBQGA1UdEQQNMAuCCWxvY2FsaG9zdDANBgkq |
|
||||
hkiG9w0BAQsFAAOCAgEAbBq73JzDpK11hoRUxHq7LvplQEe/FNuD/slvn9Crfm2d |
|
||||
jJj0HsQQZpMgxP7SZ9FNvFqCo+/dm9PchIlwqwSjWtTxgYmcMOXw0Rzst85Ug4U1 |
|
||||
I2PG6iPxJ4WLSW2gzo//jFPa7MD1AnqDYwcCQTVsQW6aJavY3mFD31SJKsvSKqsV
|
|
||||
6xTXsajLRetCSXGe5qFgfyLC9tOhtTWXsCed/ISoQ9bljhOSqT6pxkpOVu0AHHMB |
|
||||
1CMZay/B5ecjb66mwSoRcAPweMlAYJkjU5HXHSi7kB3gRQTsb1ZymEn67Q4C5cpI |
|
||||
Lq6UFK5bWZf1A0kFbYJBmn3oHsWxMQqv0F6QE7r4Mg6pfk9swzYZ8WqcgjiGHQET |
|
||||
pVU7ZKkUsg2JREXxRnhh5+Q+vGsF/DjhzQ6NrfPm8sqs+X+LzUN2cne8ZPclfyW2 |
|
||||
VKCHTPZ6o8mELiAlIPdBYUYsgUEOsfmUWbx4wfx5IB7vnenrenInLLyGOOCxR33d |
|
||||
o/gDMLFdeKHXK2ISsbDCk+zwEF8kztn1cXWK+K6H9cr8oJjDi1OJwTkqz9msar+9 |
|
||||
mjZ1CPAF0X+mLgrhVnNYqd5oqeeLerXKkAvpC2TgvlWJRGyDILhjva3J+2fQAYXZ |
|
||||
+OKFHNPf3n8Co4s5TMr1eiGVtS1etH6hPxnn5Jwnes9JZWFRLcjeTmPLSRWFucg= |
|
||||
-----END CERTIFICATE----- |
|
||||
""",
|
|
||||
keyPem: $"""
|
|
||||
-----BEGIN RSA PRIVATE KEY----- |
|
||||
MIIEpAIBAAKCAQEAzLPbKZ7ynisOlcD26QeO4pAumy9Ap0vitfRafHSYPG+HQNSd |
|
||||
WPHQNoItp1P/p7TjGKdQOhLzGfFKW4J0poVDf9iUBVOR3Dz9PyDI2QJdiLHodsoi |
|
||||
t0YpeAIG54OmFu3vT+WLTFfuov7LWLo8DU17FDK//kElCDc3u/Oel0iJfYEY1hCi
|
|
||||
deyZP7Sabp/83aZeIV3Kba7McS1PxNN2wty3I4l84PP2Zd/6BB6nB37/QvEU3SAQ |
|
||||
cOusyQGMxn8cFd9XCfUENrnZYqYtpfmUeoxVs8ySOF5oghc3cGUb4TCybMiuZolS |
|
||||
JdKj6d8ydiMhG/9qSwNG3P8pWcFaumePZNsYWQIDAQABAoIBACorfyHC4d5dpmKJ |
|
||||
XxRAf1oDM+a6REpyoqCzVxS+fEIvA6ECa+vP3QHtrXQEJO2qoQIKLcfY8YXNpHDX |
|
||||
nipT18T1nADA55KEafNgUKAMEbLAW9Bk8ePpq09Ss5NsFoIwwBUoh5rRnpKrhL6h |
|
||||
lw9yf8F4dv7s8rEPlwa8OFaYFeLpoBLsPaX3nMu45CKb25dFZzSv9ORVs28LALrS |
|
||||
oK9MbtNFkmf/4EmpYA+nblkZd2bu4BomOF7C2F4bwtikN29vl4NPMhlbZGTy1hm9 |
|
||||
jzMOOvO1DwvIjHRVcfHKMDZ7cw1Pj5TmeApToSs6ygu1lce0GQcNVm+KV2qZMjNQ |
|
||||
Al6cdFUCgYEA7HZ6wvZU/WA7ei+jIwrJdyQQ3jU/LAu7GGhXiMU3z2RSR/vieY5R |
|
||||
4IjQOgUkLBuQcy9uoQcSLpH/SNLIi6qhlMBvZuHq9QKF60t68tuW0PFSoa+SKaEn |
|
||||
DCZ70bnxo4OSRUtrzxikYHnwOvRGEli4EAOENETaQBKJUUygov/pOWMCgYEA3Z2a |
|
||||
TJlptRq75G6LHZvbBBzZdG9Mr04O6zvh5TGsJW86b6ov9BTAGz6Z37KWR1yUDfyH |
|
||||
dqNf90kJ8hs1eO6gGDQyGaH9yerrlULukANQfvpC0rEeJ7DfXSc1iLa3Q6+AOt5v |
|
||||
9TkQY7s/47iOPoCmblZ4FeVcIMx88ms2mBRXshMCgYAN9pkdNiqio7Ifbvy1Lwfi |
|
||||
jzCnzoEierbbpB23J9450vTA53DiOLNBDRMuuer+58nJ430m6SH7ugdXJ4tMJBFS |
|
||||
lWJ+ssyLF1ENKfHisXDgeb+laJa6+pcxsnwRUGeifjx+9wswuYXLZKf48z/ICZEk |
|
||||
8PA3nfE9Y1rUgC/kMDR3fQKBgQCyQRRdTICUJV7ATJIlTLmLw1C9sNBzqUuitlXq |
|
||||
rluS+LZ+HtvXbeFfiKjoH5N07ug/n8GuEZcdJmiTjoMiNH4dOc6ag4vJH+ZB9sZA |
|
||||
nAnhOJcLNV/V+RSQrvsGbkFWdhGkSEqxaibesTyghFAVwhEcavzIT+Yck55ktwwA |
|
||||
o0wudQKBgQDR0hyl/cf6MBgZ3gce6dOcznLKoa2icypmmfNkA6sqwXwW20/WfDGb |
|
||||
ZNdaL4U3xReSN1mzrs0yStq0UrAChwrwqJc6T7uhGR/lDjvJCeZP9zO2yCSBvtul |
|
||||
LWFkJnofc7NUYkhVSGaAMeT14xUY/XlFbkXp0jZOqKMRo7PeeeXZaQ== |
|
||||
-----END RSA PRIVATE KEY----- |
|
||||
""");
|
|
||||
|
|
||||
// On Windows, a certificate loaded from PEM-encoded material is ephemeral and
|
|
||||
// cannot be directly used with TLS, as Schannel cannot access it in this case.
|
|
||||
//
|
|
||||
// To work this limitation, the certificate is exported and re-imported from a
|
|
||||
// PFX blob to ensure the private key is persisted in a way that Schannel can use.
|
|
||||
//
|
|
||||
// In a real world application, the certificate wouldn't be embedded in the source code
|
|
||||
// and would be installed in the certificate store, making this workaround unnecessary.
|
|
||||
if (OperatingSystem.IsWindows()) |
|
||||
{ |
|
||||
certificate = X509CertificateLoader.LoadPkcs12( |
|
||||
data: certificate.Export(X509ContentType.Pfx, string.Empty), |
|
||||
password: string.Empty, |
|
||||
keyStorageFlags: X509KeyStorageFlags.DefaultKeySet); |
|
||||
} |
|
||||
|
|
||||
return new X509SigningCredentials(certificate); |
|
||||
} |
|
||||
|
|
||||
static X509SigningCredentials GetSelfSignedCertificate() |
|
||||
{ |
|
||||
// Note: OpenIddict only negotiates PKI-based or self-signed mutual
|
|
||||
// TLS authentication if the certificate explicitly contains the
|
|
||||
// "digitalSignature" key usage and the "clientAuth" extended key usage.
|
|
||||
var certificate = X509Certificate2.CreateFromPem( |
|
||||
certPem: $"""
|
|
||||
-----BEGIN CERTIFICATE----- |
|
||||
MIIC8zCCAdugAwIBAgIJAIZ9BN3TUnZQMA0GCSqGSIb3DQEBCwUAMCIxIDAeBgNV |
|
||||
BAMTF1NlbGYtc2lnbmVkIGNlcnRpZmljYXRlMCAXDTI2MDIwMjE0MzM0OVoYDzIx |
|
||||
MjYwMjAyMTQzMzQ5WjAiMSAwHgYDVQQDExdTZWxmLXNpZ25lZCBjZXJ0aWZpY2F0 |
|
||||
ZTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAOtfKVPM7ghVFh4U/sz4 |
|
||||
sTrpaNJGQ2NORqawYxAHwluhr101yIOW7rWvFlFncA64Lkq9SAbFFCVSAbo28c6B |
|
||||
2Mi41jyC4LHQU11jhv08K/3FUuckCuzEpzTnXUhxJHWxrRDVEuvKINGPs1VgVtTT |
|
||||
ra8rjP8s1YRAzCYnByxSx+8GXNGHprylLh0agpWKb2+2FYwDqY5ME2g3xTL9FTUu |
|
||||
FYWTcyspsvN0U1Eo1vlCeOxSYGPRct0MK0AS6eXEGBv+3kCYI7a5+UhQok0WvErF |
|
||||
pjIVo7USISDgKhW9GhTsWN+WywwdG4Kx4V6SB8ZLAHFSBSR3gjWS3TGOyqAWoBXc |
|
||||
znkCAwEAAaMqMCgwDgYDVR0PAQH/BAQDAgeAMBYGA1UdJQEB/wQMMAoGCCsGAQUF |
|
||||
BwMCMA0GCSqGSIb3DQEBCwUAA4IBAQBf5i/S7shmNalVxMuP8/Mk8cOhRRZjnAXd |
|
||||
zz3eOuXu0CH8iY/DwCgss04O2NTxuz87rKiuNKOrtY0oN/G4aFjWPvbgoQ+N1XP1 |
|
||||
zvbhqbyo3fQr07FyjWkrIUoHYFQ3JRfL+GPGjWizJsgdpdCRJSK6G9VX8eU3Akjv |
|
||||
YhMRLmbkrH5etOURqFtLpZlxNmLzCpqWIvzRiYyyj74iOipA2I0acgcvkakWn6rE |
|
||||
Wio7luBAZ3dXlukEfHTOg+ft4k0nOlRXPTtASOmyFQBOs6iYJeztHDz6MQnknAPe |
|
||||
+W53US8kLWktspcOQmxhVVH1g1/T4ynl9iX7tzqvUbdYwZNi92+x |
|
||||
-----END CERTIFICATE----- |
|
||||
""",
|
|
||||
keyPem: $"""
|
|
||||
-----BEGIN RSA PRIVATE KEY----- |
|
||||
MIIEpAIBAAKCAQEA618pU8zuCFUWHhT+zPixOulo0kZDY05GprBjEAfCW6GvXTXI |
|
||||
g5buta8WUWdwDrguSr1IBsUUJVIBujbxzoHYyLjWPILgsdBTXWOG/Twr/cVS5yQK |
|
||||
7MSnNOddSHEkdbGtENUS68og0Y+zVWBW1NOtryuM/yzVhEDMJicHLFLH7wZc0Yem |
|
||||
vKUuHRqClYpvb7YVjAOpjkwTaDfFMv0VNS4VhZNzKymy83RTUSjW+UJ47FJgY9Fy |
|
||||
3QwrQBLp5cQYG/7eQJgjtrn5SFCiTRa8SsWmMhWjtRIhIOAqFb0aFOxY35bLDB0b |
|
||||
grHhXpIHxksAcVIFJHeCNZLdMY7KoBagFdzOeQIDAQABAoIBAQDgBOqov9uuQo2S |
|
||||
hBkfrXPBxnXl7MomslG8RRWEJF5wKCtoY9A8rmL0uXhccj7NQ6+LoyvyhZDvFGZg |
|
||||
ffsXua5DHOmLHmYN12IA+MF6NNMJ7c1CAaQERgd+6tZ2JHm3Kyy1YJdppDAoRMVC |
|
||||
9Tavyej9WE4ScPGntqSXi33gScnRTEGuuC0HydomT/rmguSWx8oPumeWelSTCh9c |
|
||||
vZ9Q1NOnRlW/VrNbYyyByiaWEgdrM2E/z3p+MFgrIsYxnIGQ/Ql1FbT0LxbeIYzc |
|
||||
9MT4cbOlMrD0SZVk9lyxnCs/c1pN7pXDHutmDg6JzSj0xW5AYKzKSvXKjy7+uQay |
|
||||
YVyYh/QhAoGBAPKL1cZJMqwdQBzHMaHChth5cMh8/IkU6m3U7Ll75dztmaLFce+Y |
|
||||
Ova6te/D5Cm/l9pxx+vL5fuAafc2/FTesmKkE2DEERvy4EOQqB1Uho6XEoBBfnJT |
|
||||
0xmNY5Jvh0TfyquS23KvzezT7+epFYNhZDQwgWPnx2z+jwa/zn8Ows/nAoGBAPht |
|
||||
crkmXBMncO7CXzFzFbDghIitW9cZnqBTzKwr2k9lVsbioTIYDbGruvABwI5sN2b4 |
|
||||
gJqcvnkun7dmooRPAGX/nMl5UxeGhdSlYGVzHchZz/310MdEg/JThIV219sHR5fd |
|
||||
pBlrydWDyfDTkiGZHDiYUzuZ6hCyOjf+MUgGlyKfAoGBAKYblF1G9hgftC/BT8Fb |
|
||||
quQIT3BPANiU5XQwtarWKndilax/EmenVwJwnndFLjZVS5dEA0n+i1Px/yBanPc2 |
|
||||
yO57NfY4cQs2C9bZ8/iaUcjHt9j0gbekptdCGKZKEVbe+TsFyZrCwgHmp8984gnn |
|
||||
IiwH6CVWsCJ6N9PEepRTtKGTAoGAV/wTdKW0WIhQhA9NPas/1GxAJFQZwd3uA2SK |
|
||||
ibPiVtpSWJAtfRttxi5HP/eu5gJHwO1kRt4ay7qKkJ8GEgwU3Qsh0W1p01wui/ii |
|
||||
YmvZ8Xp1osFr1xdaD/oqZkaH/qfeYFf8ZZB6ZGePnv6fs8yRZS311JcXgiBNZEVf |
|
||||
2N2Uq4sCgYAoVe3zkP37MjIH6nykFiR396den5ZyMflR42QtO0Z2QJuQKs6yZ7ii |
|
||||
cqQy4r1Z2i6bdtUlesyGF5U7BPvcers/Mczax0u81Y2S9PdIsv8cw8sr8M6HHiS3 |
|
||||
IWBJpVJNyoHKLusRTYVqti+b5EHXQ55FZ9EJggvceGbcBamZ+ynYrg== |
|
||||
-----END RSA PRIVATE KEY----- |
|
||||
""");
|
|
||||
|
|
||||
// On Windows, a certificate loaded from PEM-encoded material is ephemeral and
|
|
||||
// cannot be directly used with TLS, as Schannel cannot access it in this case.
|
|
||||
//
|
|
||||
// To work this limitation, the certificate is exported and re-imported from a
|
|
||||
// PFX blob to ensure the private key is persisted in a way that Schannel can use.
|
|
||||
//
|
|
||||
// In a real world application, the certificate wouldn't be embedded in the source code
|
|
||||
// and would be installed in the certificate store, making this workaround unnecessary.
|
|
||||
if (OperatingSystem.IsWindows()) |
|
||||
{ |
|
||||
certificate = X509CertificateLoader.LoadPkcs12( |
|
||||
data: certificate.Export(X509ContentType.Pfx, string.Empty), |
|
||||
password: string.Empty, |
|
||||
keyStorageFlags: X509KeyStorageFlags.DefaultKeySet); |
|
||||
} |
|
||||
|
|
||||
return new X509SigningCredentials(certificate); |
|
||||
} |
|
||||
|
|
||||
static SigningCredentials GetSigningKey() |
|
||||
{ |
|
||||
var algorithm = ECDsa.Create(); |
|
||||
algorithm.ImportFromPem($"""
|
|
||||
-----BEGIN EC PRIVATE KEY----- |
|
||||
MHcCAQEEIMGxf/eMzKuW2F8KKWPJo3bwlrO68rK5+xCeO1atwja2oAoGCCqGSM49 |
|
||||
AwEHoUQDQgAEI23kaVsRRAWIez/pqEZOByJFmlXda6iSQ4QqcH23Ir8aYPPX5lsV |
|
||||
nBsExNsl7SOYOiIhgTaX6+PTS7yxTnmvSw== |
|
||||
-----END EC PRIVATE KEY----- |
|
||||
""");
|
|
||||
|
|
||||
var key = new ECDsaSecurityKey(algorithm); |
|
||||
|
|
||||
return new SigningCredentials(key, SecurityAlgorithms.EcdsaSha256, SecurityAlgorithms.Sha256); |
|
||||
} |
|
||||
#pragma warning restore CS8321
|
|
||||
#endif
|
|
||||
} |
|
||||
@ -1,28 +0,0 @@ |
|||||
#if !SUPPORTS_ASYNC_LINQ
|
|
||||
namespace OpenIddict.Sandbox.AspNetCore.Server.Helpers; |
|
||||
|
|
||||
public static class AsyncEnumerableExtensions |
|
||||
{ |
|
||||
public static Task<List<T>> ToListAsync<T>(this IAsyncEnumerable<T> source) |
|
||||
{ |
|
||||
if (source is null) |
|
||||
{ |
|
||||
throw new ArgumentNullException(nameof(source)); |
|
||||
} |
|
||||
|
|
||||
return ExecuteAsync(); |
|
||||
|
|
||||
async Task<List<T>> ExecuteAsync() |
|
||||
{ |
|
||||
var list = new List<T>(); |
|
||||
|
|
||||
await foreach (var element in source) |
|
||||
{ |
|
||||
list.Add(element); |
|
||||
} |
|
||||
|
|
||||
return list; |
|
||||
} |
|
||||
} |
|
||||
} |
|
||||
#endif
|
|
||||
@ -1,405 +0,0 @@ |
|||||
using System.Net.Security; |
|
||||
using System.Security.Cryptography.X509Certificates; |
|
||||
using Microsoft.AspNetCore.Identity; |
|
||||
using Microsoft.AspNetCore.Server.Kestrel.Core; |
|
||||
using Microsoft.AspNetCore.Server.Kestrel.Https; |
|
||||
using Microsoft.EntityFrameworkCore; |
|
||||
using OpenIddict.Sandbox.AspNetCore.Server.Models; |
|
||||
using OpenIddict.Sandbox.AspNetCore.Server.Services; |
|
||||
using Quartz; |
|
||||
using static OpenIddict.Abstractions.OpenIddictConstants; |
|
||||
|
|
||||
namespace OpenIddict.Sandbox.AspNetCore.Server; |
|
||||
|
|
||||
public class Startup |
|
||||
{ |
|
||||
public void ConfigureServices(IServiceCollection services) |
|
||||
{ |
|
||||
services.AddMvc(); |
|
||||
|
|
||||
services.AddDbContext<ApplicationDbContext>(options => |
|
||||
{ |
|
||||
// Configure the context to use Microsoft SQL Server.
|
|
||||
options.UseSqlite($"Filename={Path.Combine(Path.GetTempPath(), "openiddict-sandbox-aspnetcore-server.sqlite3")}"); |
|
||||
|
|
||||
// Register the entity sets needed by OpenIddict.
|
|
||||
// Note: use the generic overload if you need
|
|
||||
// to replace the default OpenIddict entities.
|
|
||||
options.UseOpenIddict(); |
|
||||
}); |
|
||||
|
|
||||
// Register the Identity services.
|
|
||||
services.AddIdentity<ApplicationUser, IdentityRole>() |
|
||||
.AddEntityFrameworkStores<ApplicationDbContext>() |
|
||||
.AddDefaultTokenProviders(); |
|
||||
|
|
||||
// OpenIddict offers native integration with Quartz.NET to perform scheduled tasks
|
|
||||
// (like pruning orphaned authorizations/tokens from the database) at regular intervals.
|
|
||||
services.AddQuartz(options => |
|
||||
{ |
|
||||
options.UseSimpleTypeLoader(); |
|
||||
options.UseInMemoryStore(); |
|
||||
}); |
|
||||
|
|
||||
// Register the Quartz.NET service and configure it to block shutdown until jobs are complete.
|
|
||||
services.AddQuartzHostedService(options => options.WaitForJobsToComplete = true); |
|
||||
|
|
||||
services.AddOpenIddict() |
|
||||
|
|
||||
// Register the OpenIddict core components.
|
|
||||
.AddCore(options => |
|
||||
{ |
|
||||
// Configure OpenIddict to use the Entity Framework Core stores and models.
|
|
||||
// Note: call ReplaceDefaultEntities() to replace the default OpenIddict entities.
|
|
||||
options.UseEntityFrameworkCore() |
|
||||
.UseDbContext<ApplicationDbContext>(); |
|
||||
|
|
||||
// Developers who prefer using MongoDB can remove the previous lines
|
|
||||
// and configure OpenIddict to use the specified MongoDB database:
|
|
||||
// options.UseMongoDb()
|
|
||||
// .UseDatabase(new MongoClient().GetDatabase("openiddict"));
|
|
||||
|
|
||||
// Enable Quartz.NET integration.
|
|
||||
options.UseQuartz(); |
|
||||
}) |
|
||||
|
|
||||
// Register the OpenIddict client components.
|
|
||||
.AddClient(options => |
|
||||
{ |
|
||||
// Note: this sample uses the code flow, but you can enable the other flows if necessary.
|
|
||||
options.AllowAuthorizationCodeFlow(); |
|
||||
|
|
||||
// Register the signing and encryption credentials used to protect
|
|
||||
// sensitive data like the state tokens produced by OpenIddict.
|
|
||||
options.AddDevelopmentEncryptionCertificate() |
|
||||
.AddDevelopmentSigningCertificate(); |
|
||||
|
|
||||
// Register the ASP.NET Core host and configure the ASP.NET Core-specific options.
|
|
||||
options.UseAspNetCore() |
|
||||
.EnableStatusCodePagesIntegration() |
|
||||
.EnableRedirectionEndpointPassthrough(); |
|
||||
|
|
||||
// Register the System.Net.Http integration and use the identity of the current
|
|
||||
// assembly as a more specific user agent, which can be useful when dealing with
|
|
||||
// providers that use the user agent as a way to throttle requests (e.g Reddit).
|
|
||||
options.UseSystemNetHttp() |
|
||||
.SetProductInformation(typeof(Startup).Assembly); |
|
||||
|
|
||||
// Register the Web providers integrations.
|
|
||||
//
|
|
||||
// Note: to mitigate mix-up attacks, it's recommended to use a unique redirection endpoint
|
|
||||
// URI per provider, unless all the registered providers support returning a special "iss"
|
|
||||
// parameter containing their URL as part of authorization responses. For more information,
|
|
||||
// see https://datatracker.ietf.org/doc/html/draft-ietf-oauth-security-topics#section-4.4.
|
|
||||
options.UseWebProviders() |
|
||||
.AddGitHub(options => |
|
||||
{ |
|
||||
options.SetClientId("c4ade52327b01ddacff3") |
|
||||
.SetClientSecret("da6bed851b75e317bf6b2cb67013679d9467c122") |
|
||||
.SetRedirectUri("callback/login/github"); |
|
||||
}); |
|
||||
}) |
|
||||
|
|
||||
// Register the OpenIddict server components.
|
|
||||
.AddServer(options => |
|
||||
{ |
|
||||
// Enable the endpoints that will be used by the client applications.
|
|
||||
options.SetAuthorizationEndpointUris("connect/authorize") |
|
||||
.SetDeviceAuthorizationEndpointUris("connect/device") |
|
||||
.SetEndSessionEndpointUris("connect/endsession") |
|
||||
.SetEndUserVerificationEndpointUris("connect/verify") |
|
||||
.SetIntrospectionEndpointUris("connect/introspect") |
|
||||
.SetPushedAuthorizationEndpointUris("connect/par") |
|
||||
.SetRevocationEndpointUris("connect/revoke") |
|
||||
.SetTokenEndpointUris("connect/token") |
|
||||
.SetUserInfoEndpointUris("connect/userinfo"); |
|
||||
|
|
||||
// Enable the flows that will be used by the client applications.
|
|
||||
options.AllowAuthorizationCodeFlow() |
|
||||
.AllowDeviceAuthorizationFlow() |
|
||||
.AllowHybridFlow() |
|
||||
.AllowImplicitFlow() |
|
||||
.AllowNoneFlow() |
|
||||
.AllowPasswordFlow() |
|
||||
.AllowRefreshTokenFlow() |
|
||||
.AllowTokenExchangeFlow(); |
|
||||
|
|
||||
// Register the public scopes that will be exposed by the configuration endpoint.
|
|
||||
options.RegisterScopes(Scopes.Email, Scopes.Profile, Scopes.Roles, "demo_api"); |
|
||||
|
|
||||
// Register the signing and encryption credentials.
|
|
||||
options.AddDevelopmentEncryptionCertificate() |
|
||||
.AddDevelopmentSigningCertificate(); |
|
||||
|
|
||||
// Register the ASP.NET Core host and configure the ASP.NET Core-specific options.
|
|
||||
options.UseAspNetCore() |
|
||||
.EnableStatusCodePagesIntegration() |
|
||||
.EnableAuthorizationEndpointPassthrough() |
|
||||
.EnableEndSessionEndpointPassthrough() |
|
||||
.EnableEndUserVerificationEndpointPassthrough() |
|
||||
.EnableTokenEndpointPassthrough() |
|
||||
.EnableUserInfoEndpointPassthrough(); |
|
||||
|
|
||||
// Note: if you don't want to specify a client_id when sending
|
|
||||
// a token or revocation request, uncomment the following line:
|
|
||||
//
|
|
||||
// options.AcceptAnonymousClients();
|
|
||||
|
|
||||
// Note: if you want to process authorization and token requests
|
|
||||
// that specify non-registered scopes, uncomment the following line:
|
|
||||
//
|
|
||||
// options.DisableScopeValidation();
|
|
||||
|
|
||||
// Note: if you don't want to use permissions, you can disable
|
|
||||
// permission enforcement by uncommenting the following lines:
|
|
||||
//
|
|
||||
// options.IgnoreEndpointPermissions()
|
|
||||
// .IgnoreGrantTypePermissions()
|
|
||||
// .IgnoreResponseTypePermissions()
|
|
||||
// .IgnoreScopePermissions();
|
|
||||
|
|
||||
// Note: when issuing access tokens used by third-party APIs
|
|
||||
// you don't own, you can disable access token encryption:
|
|
||||
//
|
|
||||
// options.DisableAccessTokenEncryption();
|
|
||||
|
|
||||
#if SUPPORTS_KESTREL_TLS_HANDSHAKE_CALLBACK_OPTIONS
|
|
||||
// Enable both tls_client_auth and self_signed_tls_client_auth to allow clients
|
|
||||
// to authenticate using either PKI certificates or self-signed certificates.
|
|
||||
//
|
|
||||
// Note: PKI and self-signed certificate authentication can be enabled independently.
|
|
||||
options.EnablePublicKeyInfrastructureTlsClientAuthentication( |
|
||||
[ |
|
||||
// Root certificate:
|
|
||||
X509Certificate2.CreateFromPem($"""
|
|
||||
-----BEGIN CERTIFICATE----- |
|
||||
MIIE7jCCAtagAwIBAgIJAN+SZB+xc7usMA0GCSqGSIb3DQEBCwUAMBIxEDAOBgNV |
|
||||
BAMTB1Jvb3QgQ0EwIBcNMjYwMjAxMTQxNDQzWhgPMjEyNjAyMDIxNDE0NDNaMBIx |
|
||||
EDAOBgNVBAMTB1Jvb3QgQ0EwggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoIC |
|
||||
AQC68DOD6IvsJM0mc7n8bYeNaVe8e0ytJCJozdMPNXAe80vMPP4cVUPFvJ/tbSjX |
|
||||
yhREJ9xz2dYgQAhWCaTnEHY4AaE1Tj2rYqotenDQxs18qqaqoZlcaFfkRUPHRH3Q |
|
||||
iS8D8gbxzlYkjxNsfDJRi0cXFxr4wb4FmSP4ES2DFWWAWbN9wt7Tb2uDiHkjSefZ |
|
||||
Pni5F6fN6nE7wgGMYrdrCiiwJf7jEZiIZ60bsiUnJ5VUX6g4ob469CLocH/q/9Yr |
|
||||
Dad9/+YYp6SuHZilsPmW4X0fziuF/RvtsRLw4bw5jwj69KH3Y0jqUMQoyzz2CIJz |
|
||||
cDMB/MLREgcT9jTVB/M5Pl61DCzR/0d4t6RENpkNqpAIVM0Unp0nDuHPwjoeEZn3 |
|
||||
vSvUiGpiYY355GaSl05OE3SOKoRHt4lBXvY43y8fRBMOwlNHYn4eO3ZDuzZYzhfs |
|
||||
68ywK4zUy47Qyn1BgNNqc/KC7kzxeLFxqTg2VJgBeXuJfucwzhOFqkOSfpeIGDK9 |
|
||||
8MODFlA3usf5LXxQ7DJhkeBgPkW56BUlYVkenm9ORWe77GnoXL95p2HQUEXATHir |
|
||||
unXFPVcHET6hyegvc9AzSTZFQL4RMO3ZV5ESs+JF/YY4ycBc1+WYy2kAuP5sfsGn |
|
||||
mpeKf2Dv9MGFcDxU7iimeM92n7t5lbCRlX8NUaYeQ8jKgQIDAQABo0UwQzASBgNV |
|
||||
HRMBAf8ECDAGAQH/AgEBMA4GA1UdDwEB/wQEAwIBBjAdBgNVHQ4EFgQUyHIqQnw/ |
|
||||
x6e92OuJ+y+e0LSKSqQwDQYJKoZIhvcNAQELBQADggIBACCOjX4+RyoZt9tVoKdT |
|
||||
uGFoEJUGBUfcYaMdqiDstuSoNrqZXHnilzj33ZbNqj6X6rS1w5qVnkj7ZY4Wu8MP |
|
||||
Sj85Wp9cq0jMv3NfPZfKmJd2K7favGQKvgSPptSl9VgcIrpRam9BG2db1IP053tf |
|
||||
ydBB3w/yI7MTb4fkPqLWtKcuPPM8t9SsxAlKhEm+gbNEsqDX9ZIfxolHEpL2zLOi |
|
||||
a4v7+SlJdVBfo4mj+iLUeZXFRPglAnPQ3CZngfbPsjEklpOCU1v8TnhHwV8jyCgl |
|
||||
oLAceLjdlXHWVfhKU+N0jdAt8V2NPxq+yJ/gPX+J3YOrYRCHMdQZ/OFEUhmkxHNp |
|
||||
UUPkL1VJ9c8ZW2/gszFPyvsh7GHwl43y7bN8doiQVOSj6jZ7uCkQl1oz731fl97b |
|
||||
FqKVyGGx6UUEi57YS7mWsY02qNvYSObOxhSNusX/Ct06XbXS1Pn+co/3FMGMcEVf |
|
||||
IwzboV61sMqRu4l3YD0Z1AxdhXFERMlHBYyyj8CQYIXtnCUoeT40IIR3aFmEG5u8 |
|
||||
/lwehTnV4slDDMJMFSW54aENpT1XP4b8m46kioNhxN+7ukdcWnYoapePuiDRboA3 |
|
||||
GwRExwFUDiGO8zpnyvV4JTIGu9MZi51O3RbSlIDDhyzFsdQW3PeztwGjZWZAXD+7 |
|
||||
qIoAaBbG/12cvNeZH7L9Mcpo |
|
||||
-----END CERTIFICATE----- |
|
||||
"""),
|
|
||||
|
|
||||
// Intermediate certificate (optional):
|
|
||||
X509Certificate2.CreateFromPem($"""
|
|
||||
-----BEGIN CERTIFICATE----- |
|
||||
MIIFQzCCAyugAwIBAgIQb6sP8aiPyzYFX0lET/XJOzANBgkqhkiG9w0BAQsFADAS |
|
||||
MRAwDgYDVQQDEwdSb290IENBMCAXDTI2MDIwMTE0MTQ0M1oYDzIxMjYwMjAyMTQx |
|
||||
NDQzWjAaMRgwFgYDVQQDEw9JbnRlcm1lZGlhdGUgQ0EwggIiMA0GCSqGSIb3DQEB |
|
||||
AQUAA4ICDwAwggIKAoICAQCfObzu9v5dfio8kCCKpb0vLXUrilcOM6FGVx50rPtc |
|
||||
MjlHNG4GpghoLXjJxrUIsoeGdsCI6W+K3R+5PRlEsbCT3l/0n2/ixW3rN9rO3FOt |
|
||||
VGOHYrE2wI+i1aWP1/w/0bcCbH1J6PLKPv5syzhWWdkoTy2K72gye5Kx3zXkFQoC |
|
||||
uBFMvj3HBgmTngaDRTT1QGsRSlhuvoEiHHAvgoTfYt7bgbRhM5I5upEbXB0cucj7 |
|
||||
Ghzws5R2/4qsr/QorwA8l6aNeb1dm0uB+FlMVlGelYMZ76+SjBs1rOxD0qt82h13 |
|
||||
BYPBR4gLvNFafOEskFndeP3OkNaQ6kPm+uClj5OxwONnBcy7neJPqZGMtxpApLK3 |
|
||||
reK3IZ/ieg1nY9zZ7OkqIzQDt1CeCBQWU3RkpEtVojkRDLCmg+pKSjHtLxUUGiQ3 |
|
||||
UHrXO2Yrej8Qpx4JHdKGUfku25r4SSaj2YF61ZIvsDxlOMROfJUFbpQdyAtQPCCq |
|
||||
zpfkVKaCeCiTlifI6AZODngc9c8U+s7vLxjucz/Q4gNHwcgg/mASbjh8A2hYsbW6 |
|
||||
qeg7lE9k5t6Lv820FudjfgFiq7k+zIbNsDNy3Y7CSsgBHQQSyNFngg25PPQOon9c |
|
||||
yd3PiFK36OzktnRkcTs98i3fwO2+3pp6qgOSk1Sdx877egszMjBPFzxrBX9CXIpM |
|
||||
yQIDAQABo4GKMIGHMBIGA1UdEwEB/wQIMAYBAf8CAQAwDgYDVR0PAQH/BAQDAgEG |
|
||||
MB0GA1UdDgQWBBThFsFtfMN62ev+YiMAAddufdjpRzBCBgNVHSMEOzA5gBTIcipC |
|
||||
fD/Hp73Y64n7L57QtIpKpKEWpBQwEjEQMA4GA1UEAxMHUm9vdCBDQYIJAN+SZB+x |
|
||||
c7usMA0GCSqGSIb3DQEBCwUAA4ICAQA6sBGs28FWhKgh6TxZ6U8Lc+iCdc4c9PeM |
|
||||
L5pQQosHekT0oBJK8WdvyXZS95Fz2ddJaKiiQyUKSP4XHpxE+6tBt8OOV0LJJxnx |
|
||||
yKTBZtcSiOFssu2j6aqx3oMotRZJrhuI/5ChExaPwFT1W7aQDIY6lN2KcQ/xndbX |
|
||||
Nts/2nwCvlplfiOGM7XrRMU8b4X+AVWXSksvLXiByrDh9W6WGDsBHyu+FKQVnwmW |
|
||||
QVnshKpwxIsW25JDOhFE8+VHn6yciUKUTqnCFt5HjZpZh00q8hhmlhrNBEdkxA8N |
|
||||
OF7S1uWWftJywqq23qG6pGIDQ1r1dwNzgaeNhmW6QKm2zBXUmuOW//Xt+1wtHrly
|
|
||||
bDjXKKSa/zhR9plYPdvGe9PopXwTw/fQWRYcxML6aH+WbWY9AgCHFgY56YCJYZd9 |
|
||||
eUIfrvPVJLn8fqwLmsWQtIY+XkAS/YQ4wTQs0zZS3+bdxeGQ6oHIMgxCDiBK8Qcc |
|
||||
RHf+RvYHiBllOJmaRaJHdsauMk9IlYYYpxPPwuWGti9B5HI4JO6bIqmR5Q8x3L/g |
|
||||
tFGMPzvWDTA2+dQcrh7WKULDH9Ngnnoodc6Hb9Iv1yCGYahcS6ARt9BzRyG1+6d9 |
|
||||
bq/zCH8KQCjryiTn3ZEpsln/iXtp5nHiLegUc1OoXldrUKAz9V93l61GHUw1kdhD |
|
||||
V+KJceDj3Q== |
|
||||
-----END CERTIFICATE----- |
|
||||
""")
|
|
||||
]); |
|
||||
|
|
||||
options.EnableSelfSignedTlsClientAuthentication(); |
|
||||
|
|
||||
// Note: setting a static issuer is mandatory when using mTLS aliases to ensure it not
|
|
||||
// dynamically computed based on the request URI, as this would result in two different
|
|
||||
// issuers being used (one pointing to the mTLS domain and one pointing to the regular one).
|
|
||||
options.SetIssuer("https://localhost:44395/"); |
|
||||
|
|
||||
// Configure the mTLS endpoint aliases that will be used by client applications opting
|
|
||||
// for TLS-based client authentication to communicate with the authorization server:
|
|
||||
// the configured URIs MUST point to a domain for which the HTTPS server is configured
|
|
||||
// to require the use of client certificates when receiving TLS handshakes from clients.
|
|
||||
//
|
|
||||
// Using mTLS endpoint aliases is not mandatory but is strongly recommended to avoid
|
|
||||
// severely degrading the experience of users of browser-based clients, as TLS client
|
|
||||
// authentication can only be enforced globally and not per-client, which would result
|
|
||||
// in certificate selection prompts being systematically displayed by browsers.
|
|
||||
options.SetMtlsDeviceAuthorizationEndpointAliasUri("https://mtls.dev.localhost:44395/connect/device") |
|
||||
.SetMtlsIntrospectionEndpointAliasUri("https://mtls.dev.localhost:44395/connect/introspect") |
|
||||
.SetMtlsPushedAuthorizationEndpointAliasUri("https://mtls.dev.localhost:44395/connect/par") |
|
||||
.SetMtlsRevocationEndpointAliasUri("https://mtls.dev.localhost:44395/connect/revoke") |
|
||||
.SetMtlsTokenEndpointAliasUri("https://mtls.dev.localhost:44395/connect/token") |
|
||||
.SetMtlsUserInfoEndpointAliasUri("https://mtls.dev.localhost:44395/connect/userinfo"); |
|
||||
|
|
||||
// While public client applications cannot use mTLS for client authentication, they can use
|
|
||||
// mTLS purely as a token binding mechanism: in this case, the refresh tokens issued to
|
|
||||
// public clients sending a client certificate are automatically bound to the certificate,
|
|
||||
// which requires sending the same certificate when using them to get new access tokens.
|
|
||||
options.UseClientCertificateBoundRefreshTokens(); |
|
||||
|
|
||||
// Optionally, the server stack can be configured to issue client certificate-bound access tokens.
|
|
||||
//
|
|
||||
// When doing so, the standard "cnf" claim is automatically added to access tokens to inform
|
|
||||
// resource servers that a proof of possession derived from the certificate must be provided.
|
|
||||
options.UseClientCertificateBoundAccessTokens(); |
|
||||
#endif
|
|
||||
}) |
|
||||
|
|
||||
// Register the OpenIddict validation components.
|
|
||||
.AddValidation(options => |
|
||||
{ |
|
||||
// Configure the audience accepted by this resource server.
|
|
||||
// The value MUST match the audience associated with the
|
|
||||
// "demo_api" scope, which is used by ResourceController.
|
|
||||
options.AddAudiences("resource_server"); |
|
||||
|
|
||||
// Import the configuration from the local OpenIddict server instance.
|
|
||||
options.UseLocalServer(); |
|
||||
|
|
||||
// Instead of validating the token locally by reading it directly,
|
|
||||
// introspection can be used to ask a remote authorization server
|
|
||||
// to validate the token (and its attached database entry).
|
|
||||
//
|
|
||||
// options.UseIntrospection()
|
|
||||
// .SetIssuer("https://localhost:44395/")
|
|
||||
// .SetClientId("resource_server")
|
|
||||
// .SetClientSecret("vVQ-yjr42sXP5VHj6AswkXuS7MU1i2gFjvJjY0TdGMk");
|
|
||||
//
|
|
||||
// When introspection is used, the System.Net.Http integration must be enabled.
|
|
||||
//
|
|
||||
// options.UseSystemNetHttp();
|
|
||||
|
|
||||
// Register the ASP.NET Core host.
|
|
||||
options.UseAspNetCore(); |
|
||||
|
|
||||
// For applications that need immediate access token or authorization
|
|
||||
// revocation, the database entry of the received tokens and their
|
|
||||
// associated authorizations can be validated for each API call.
|
|
||||
// Enabling these options may have a negative impact on performance.
|
|
||||
//
|
|
||||
// options.EnableAuthorizationEntryValidation();
|
|
||||
// options.EnableTokenEntryValidation();
|
|
||||
}); |
|
||||
|
|
||||
services.AddTransient<IEmailSender, AuthMessageSender>(); |
|
||||
services.AddTransient<ISmsSender, AuthMessageSender>(); |
|
||||
|
|
||||
#if SUPPORTS_KESTREL_TLS_HANDSHAKE_CALLBACK_OPTIONS
|
|
||||
// Configure Kestrel to listen on the 44395 port and configure it to enforce mTLS.
|
|
||||
//
|
|
||||
// Note: depending on the operating system, the mtls.dev.localhost
|
|
||||
// subdomain MAY have to be manually mapped to 127.0.0.1 or ::1.
|
|
||||
services.Configure<KestrelServerOptions>(options => options.ListenAnyIP(44395, options => |
|
||||
{ |
|
||||
options.UseHttps(new TlsHandshakeCallbackOptions |
|
||||
{ |
|
||||
OnConnection = GetServerAuthenticationOptionsAsync |
|
||||
}); |
|
||||
})); |
|
||||
|
|
||||
static ValueTask<SslServerAuthenticationOptions> GetServerAuthenticationOptionsAsync(TlsHandshakeCallbackContext context) |
|
||||
{ |
|
||||
using var store = new X509Store(StoreName.My, StoreLocation.CurrentUser); |
|
||||
store.Open(OpenFlags.ReadOnly); |
|
||||
|
|
||||
return ValueTask.FromResult(new SslServerAuthenticationOptions |
|
||||
{ |
|
||||
// Require a client certificate for all the requests pointing to the mTLS subdomain.
|
|
||||
ClientCertificateRequired = string.Equals(context.ClientHelloInfo.ServerName, |
|
||||
"mtls.dev.localhost", StringComparison.OrdinalIgnoreCase), |
|
||||
|
|
||||
// Ignore all the client certificate errors for requests pointing to
|
|
||||
// the mTLS-specific domain, even if they indicate that the chain is
|
|
||||
// invalid: this is necessary to allow OpenIddict to validate the PKI
|
|
||||
// and self-signed certificates using its own per-client chain policies.
|
|
||||
RemoteCertificateValidationCallback = (sender, certificate, chain, errors) => |
|
||||
{ |
|
||||
if (string.Equals(context.ClientHelloInfo.ServerName, |
|
||||
"mtls.dev.localhost", StringComparison.OrdinalIgnoreCase)) |
|
||||
{ |
|
||||
return true; |
|
||||
} |
|
||||
|
|
||||
return errors is SslPolicyErrors.None or SslPolicyErrors.RemoteCertificateNotAvailable; |
|
||||
}, |
|
||||
|
|
||||
// Use the development certificate generated and stored by ASP.NET Core in the user store.
|
|
||||
ServerCertificate = store.Certificates |
|
||||
.Find(X509FindType.FindByExtension, "1.3.6.1.4.1.311.84.1.1", validOnly: false) |
|
||||
.Cast<X509Certificate2>() |
|
||||
.Where(static certificate => certificate.NotBefore < TimeProvider.System.GetLocalNow()) |
|
||||
.Where(static certificate => certificate.NotAfter > TimeProvider.System.GetLocalNow()) |
|
||||
.OrderByDescending(static certificate => certificate.NotAfter) |
|
||||
.FirstOrDefault() ?? |
|
||||
throw new InvalidOperationException("The ASP.NET Core HTTPS development certificate was not found.") |
|
||||
}); |
|
||||
} |
|
||||
#endif
|
|
||||
} |
|
||||
|
|
||||
public void Configure(IApplicationBuilder app) |
|
||||
{ |
|
||||
app.UseDeveloperExceptionPage(); |
|
||||
|
|
||||
app.UseStaticFiles(); |
|
||||
|
|
||||
app.UseStatusCodePagesWithReExecute("/error"); |
|
||||
|
|
||||
#if SUPPORTS_ENDPOINT_ROUTING
|
|
||||
app.UseRouting(); |
|
||||
#endif
|
|
||||
app.UseRequestLocalization(options => |
|
||||
{ |
|
||||
options.AddSupportedCultures("en-US", "fr-FR"); |
|
||||
options.AddSupportedUICultures("en-US", "fr-FR"); |
|
||||
options.SetDefaultCulture("en-US"); |
|
||||
}); |
|
||||
|
|
||||
app.UseAuthentication(); |
|
||||
|
|
||||
#if SUPPORTS_AUTHORIZATION_MIDDLEWARE
|
|
||||
app.UseAuthorization(); |
|
||||
#endif
|
|
||||
|
|
||||
#if SUPPORTS_ENDPOINT_ROUTING
|
|
||||
app.UseEndpoints(options => |
|
||||
{ |
|
||||
options.MapControllers(); |
|
||||
options.MapDefaultControllerRoute(); |
|
||||
}); |
|
||||
#else
|
|
||||
app.UseMvcWithDefaultRoute(); |
|
||||
#endif
|
|
||||
} |
|
||||
} |
|
||||
@ -0,0 +1,26 @@ |
|||||
|
<?xml version="1.0" encoding="utf-8" ?> |
||||
|
<configuration> |
||||
|
<configSections> |
||||
|
<section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" /> |
||||
|
</configSections> |
||||
|
|
||||
|
<entityFramework> |
||||
|
<providers> |
||||
|
<provider invariantName="System.Data.SQLite" |
||||
|
type="System.Data.SQLite.EF6.SQLiteProviderServices, System.Data.SQLite.EF6" /> |
||||
|
</providers> |
||||
|
</entityFramework> |
||||
|
|
||||
|
<connectionStrings> |
||||
|
<add name="DefaultConnection" providerName="System.Data.SQLite" |
||||
|
connectionString="Data Source=|DataDirectory|openiddict-sandbox-console-client.sqlite3;Version=3" /> |
||||
|
</connectionStrings> |
||||
|
|
||||
|
<system.data> |
||||
|
<DbProviderFactories> |
||||
|
<add name="SQLite Data Provider" invariant="System.Data.SQLite" |
||||
|
type="System.Data.SQLite.SQLiteFactory, System.Data.SQLite" |
||||
|
description=".NET Framework Data Provider for SQLite" /> |
||||
|
</DbProviderFactories> |
||||
|
</system.data> |
||||
|
</configuration> |
||||
@ -0,0 +1,46 @@ |
|||||
|
#if NET
|
||||
|
using Microsoft.EntityFrameworkCore; |
||||
|
#else
|
||||
|
using System.Data.Entity; |
||||
|
using SQLite.CodeFirst; |
||||
|
#endif
|
||||
|
|
||||
|
namespace OpenIddict.Sandbox.Console.Client.Models; |
||||
|
|
||||
|
public class ApplicationDbContext : DbContext |
||||
|
{ |
||||
|
#if NET
|
||||
|
public ApplicationDbContext(DbContextOptions options) |
||||
|
: base(options) |
||||
|
{ |
||||
|
} |
||||
|
|
||||
|
protected override void OnModelCreating(ModelBuilder builder) |
||||
|
{ |
||||
|
base.OnModelCreating(builder); |
||||
|
|
||||
|
builder.UseOpenIddict(); |
||||
|
} |
||||
|
|
||||
|
protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder) |
||||
|
{ |
||||
|
optionsBuilder.UseSqlite($"Filename={Path.Combine(Path.GetTempPath(), "openiddict-sandbox-console-client.sqlite3")}"); |
||||
|
} |
||||
|
#else
|
||||
|
public ApplicationDbContext() |
||||
|
: base("name=DefaultConnection") |
||||
|
{ |
||||
|
} |
||||
|
|
||||
|
protected override void OnModelCreating(DbModelBuilder modelBuilder) |
||||
|
{ |
||||
|
base.OnModelCreating(modelBuilder); |
||||
|
|
||||
|
modelBuilder.UseOpenIddict(); |
||||
|
|
||||
|
// Override the default database initializer to use the one provided
|
||||
|
// by SQLite.CodeFirst, which automatically creates the database.
|
||||
|
Database.SetInitializer(new SqliteCreateDatabaseIfNotExists<ApplicationDbContext>(modelBuilder)); |
||||
|
} |
||||
|
#endif
|
||||
|
} |
||||
@ -1,21 +1,49 @@ |
|||||
<Project Sdk="Microsoft.NET.Sdk"> |
<Project Sdk="Microsoft.NET.Sdk"> |
||||
|
|
||||
<PropertyGroup> |
<PropertyGroup> |
||||
<OutputType>Exe</OutputType> |
<OutputType>Exe</OutputType> |
||||
<TargetFrameworks>net48;net10.0</TargetFrameworks> |
<TargetFrameworks>net10.0</TargetFrameworks> |
||||
|
<TargetFrameworks Condition=" $([MSBuild]::IsOSPlatform('Windows')) ">$(TargetFrameworks);net48</TargetFrameworks> |
||||
|
</PropertyGroup> |
||||
|
|
||||
|
<!-- |
||||
|
Note: the SourceGear.sqlite3 package doesn't support AnyCPU builds and requires the application |
||||
|
to be built as x64, x86 or arm64. To avoid any potential "BadImageFormatException" at runtime, |
||||
|
the PlatformTarget and Prefer32Bit properties are always set to "x64" and "false" by default. |
||||
|
--> |
||||
|
|
||||
|
<PropertyGroup Condition=" '$(TargetFramework)' == 'net48' "> |
||||
|
<PlatformTarget Condition=" '$(PlatformTarget)' == '' ">x64</PlatformTarget> |
||||
|
<Prefer32Bit Condition=" '$(Prefer32Bit)' == '' ">false</Prefer32Bit> |
||||
</PropertyGroup> |
</PropertyGroup> |
||||
|
|
||||
<ItemGroup> |
<ItemGroup> |
||||
<ProjectReference Include="..\..\src\OpenIddict.Client.SystemIntegration\OpenIddict.Client.SystemIntegration.csproj" /> |
<ProjectReference Include="..\..\src\OpenIddict.Client.SystemIntegration\OpenIddict.Client.SystemIntegration.csproj" /> |
||||
<ProjectReference Include="..\..\src\OpenIddict.Client.SystemNetHttp\OpenIddict.Client.SystemNetHttp.csproj" /> |
<ProjectReference Include="..\..\src\OpenIddict.Client.SystemNetHttp\OpenIddict.Client.SystemNetHttp.csproj" /> |
||||
<ProjectReference Include="..\..\src\OpenIddict.Client.WebIntegration\OpenIddict.Client.WebIntegration.csproj" /> |
<ProjectReference Include="..\..\src\OpenIddict.Client.WebIntegration\OpenIddict.Client.WebIntegration.csproj" /> |
||||
|
</ItemGroup> |
||||
|
|
||||
|
<ItemGroup Condition=" '$(TargetFrameworkIdentifier)' == '.NETCoreApp' "> |
||||
<ProjectReference Include="..\..\src\OpenIddict.EntityFrameworkCore\OpenIddict.EntityFrameworkCore.csproj" /> |
<ProjectReference Include="..\..\src\OpenIddict.EntityFrameworkCore\OpenIddict.EntityFrameworkCore.csproj" /> |
||||
</ItemGroup> |
</ItemGroup> |
||||
|
|
||||
|
<ItemGroup Condition=" '$(TargetFrameworkIdentifier)' == '.NETFramework' "> |
||||
|
<ProjectReference Include="..\..\src\OpenIddict.EntityFramework\OpenIddict.EntityFramework.csproj" /> |
||||
|
</ItemGroup> |
||||
|
|
||||
<ItemGroup> |
<ItemGroup> |
||||
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" /> |
|
||||
<PackageReference Include="Microsoft.Extensions.Hosting" /> |
<PackageReference Include="Microsoft.Extensions.Hosting" /> |
||||
<PackageReference Include="Spectre.Console" /> |
<PackageReference Include="Spectre.Console" /> |
||||
</ItemGroup> |
</ItemGroup> |
||||
|
|
||||
|
<ItemGroup Condition=" '$(TargetFrameworkIdentifier)' == '.NETCoreApp' "> |
||||
|
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" /> |
||||
|
</ItemGroup> |
||||
|
|
||||
|
<ItemGroup Condition=" '$(TargetFrameworkIdentifier)' == '.NETFramework' "> |
||||
|
<PackageReference Include="SourceGear.sqlite3" /> |
||||
|
<PackageReference Include="SQLite.CodeFirst" /> |
||||
|
<PackageReference Include="System.Data.SQLite.EF6" /> |
||||
|
</ItemGroup> |
||||
|
|
||||
</Project> |
</Project> |
||||
|
|||||
@ -1,5 +1,29 @@ |
|||||
<?xml version="1.0" encoding="utf-8" ?> |
<?xml version="1.0" encoding="utf-8" ?> |
||||
<configuration> |
<configuration> |
||||
|
<configSections> |
||||
|
<section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" /> |
||||
|
</configSections> |
||||
|
|
||||
|
<entityFramework> |
||||
|
<providers> |
||||
|
<provider invariantName="System.Data.SQLite" |
||||
|
type="System.Data.SQLite.EF6.SQLiteProviderServices, System.Data.SQLite.EF6" /> |
||||
|
</providers> |
||||
|
</entityFramework> |
||||
|
|
||||
|
<connectionStrings> |
||||
|
<add name="DefaultConnection" providerName="System.Data.SQLite" |
||||
|
connectionString="Data Source=|DataDirectory|openiddict-sandbox-winforms-client.sqlite3;Version=3" /> |
||||
|
</connectionStrings> |
||||
|
|
||||
|
<system.data> |
||||
|
<DbProviderFactories> |
||||
|
<add name="SQLite Data Provider" invariant="System.Data.SQLite" |
||||
|
type="System.Data.SQLite.SQLiteFactory, System.Data.SQLite" |
||||
|
description=".NET Framework Data Provider for SQLite" /> |
||||
|
</DbProviderFactories> |
||||
|
</system.data> |
||||
|
|
||||
<System.Windows.Forms.ApplicationConfigurationSection> |
<System.Windows.Forms.ApplicationConfigurationSection> |
||||
<add key="DpiAwareness" value="PerMonitorV2" /> |
<add key="DpiAwareness" value="PerMonitorV2" /> |
||||
</System.Windows.Forms.ApplicationConfigurationSection> |
</System.Windows.Forms.ApplicationConfigurationSection> |
||||
|
|||||
@ -0,0 +1,46 @@ |
|||||
|
#if NET
|
||||
|
using Microsoft.EntityFrameworkCore; |
||||
|
#else
|
||||
|
using System.Data.Entity; |
||||
|
using SQLite.CodeFirst; |
||||
|
#endif
|
||||
|
|
||||
|
namespace OpenIddict.Sandbox.WinForms.Client.Models; |
||||
|
|
||||
|
public class ApplicationDbContext : DbContext |
||||
|
{ |
||||
|
#if NET
|
||||
|
public ApplicationDbContext(DbContextOptions options) |
||||
|
: base(options) |
||||
|
{ |
||||
|
} |
||||
|
|
||||
|
protected override void OnModelCreating(ModelBuilder builder) |
||||
|
{ |
||||
|
base.OnModelCreating(builder); |
||||
|
|
||||
|
builder.UseOpenIddict(); |
||||
|
} |
||||
|
|
||||
|
protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder) |
||||
|
{ |
||||
|
optionsBuilder.UseSqlite($"Filename={Path.Combine(Path.GetTempPath(), "openiddict-sandbox-winforms-client.sqlite3")}"); |
||||
|
} |
||||
|
#else
|
||||
|
public ApplicationDbContext() |
||||
|
: base("name=DefaultConnection") |
||||
|
{ |
||||
|
} |
||||
|
|
||||
|
protected override void OnModelCreating(DbModelBuilder modelBuilder) |
||||
|
{ |
||||
|
base.OnModelCreating(modelBuilder); |
||||
|
|
||||
|
modelBuilder.UseOpenIddict(); |
||||
|
|
||||
|
// Override the default database initializer to use the one provided
|
||||
|
// by SQLite.CodeFirst, which automatically creates the database.
|
||||
|
Database.SetInitializer(new SqliteCreateDatabaseIfNotExists<ApplicationDbContext>(modelBuilder)); |
||||
|
} |
||||
|
#endif
|
||||
|
} |
||||
@ -0,0 +1,26 @@ |
|||||
|
<?xml version="1.0" encoding="utf-8" ?> |
||||
|
<configuration> |
||||
|
<configSections> |
||||
|
<section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" /> |
||||
|
</configSections> |
||||
|
|
||||
|
<entityFramework> |
||||
|
<providers> |
||||
|
<provider invariantName="System.Data.SQLite" |
||||
|
type="System.Data.SQLite.EF6.SQLiteProviderServices, System.Data.SQLite.EF6" /> |
||||
|
</providers> |
||||
|
</entityFramework> |
||||
|
|
||||
|
<connectionStrings> |
||||
|
<add name="DefaultConnection" providerName="System.Data.SQLite" |
||||
|
connectionString="Data Source=|DataDirectory|openiddict-sandbox-wpf-client.sqlite3;Version=3" /> |
||||
|
</connectionStrings> |
||||
|
|
||||
|
<system.data> |
||||
|
<DbProviderFactories> |
||||
|
<add name="SQLite Data Provider" invariant="System.Data.SQLite" |
||||
|
type="System.Data.SQLite.SQLiteFactory, System.Data.SQLite" |
||||
|
description=".NET Framework Data Provider for SQLite" /> |
||||
|
</DbProviderFactories> |
||||
|
</system.data> |
||||
|
</configuration> |
||||
@ -0,0 +1,47 @@ |
|||||
|
#if NET
|
||||
|
using System.IO; |
||||
|
using Microsoft.EntityFrameworkCore; |
||||
|
#else
|
||||
|
using System.Data.Entity; |
||||
|
using SQLite.CodeFirst; |
||||
|
#endif
|
||||
|
|
||||
|
namespace OpenIddict.Sandbox.Wpf.Client.Models; |
||||
|
|
||||
|
public class ApplicationDbContext : DbContext |
||||
|
{ |
||||
|
#if NET
|
||||
|
public ApplicationDbContext(DbContextOptions options) |
||||
|
: base(options) |
||||
|
{ |
||||
|
} |
||||
|
|
||||
|
protected override void OnModelCreating(ModelBuilder builder) |
||||
|
{ |
||||
|
base.OnModelCreating(builder); |
||||
|
|
||||
|
builder.UseOpenIddict(); |
||||
|
} |
||||
|
|
||||
|
protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder) |
||||
|
{ |
||||
|
optionsBuilder.UseSqlite($"Filename={Path.Combine(Path.GetTempPath(), "openiddict-sandbox-wpf-client.sqlite3")}"); |
||||
|
} |
||||
|
#else
|
||||
|
public ApplicationDbContext() |
||||
|
: base("name=DefaultConnection") |
||||
|
{ |
||||
|
} |
||||
|
|
||||
|
protected override void OnModelCreating(DbModelBuilder modelBuilder) |
||||
|
{ |
||||
|
base.OnModelCreating(modelBuilder); |
||||
|
|
||||
|
modelBuilder.UseOpenIddict(); |
||||
|
|
||||
|
// Override the default database initializer to use the one provided
|
||||
|
// by SQLite.CodeFirst, which automatically creates the database.
|
||||
|
Database.SetInitializer(new SqliteCreateDatabaseIfNotExists<ApplicationDbContext>(modelBuilder)); |
||||
|
} |
||||
|
#endif
|
||||
|
} |
||||
Some files were not shown because too many files changed in this diff
Loading…
Reference in new issue