|
7 | 7 | <GenerateDocumentationFile>true</GenerateDocumentationFile> |
8 | 8 | <PackageTags>aspnetcore;identity;membership;razorpages</PackageTags> |
9 | 9 | <ProvideApplicationPartFactoryAttributeTypeName>Microsoft.AspNetCore.Mvc.ApplicationParts.NullApplicationPartFactory, Microsoft.AspNetCore.Mvc.Core</ProvideApplicationPartFactoryAttributeTypeName> |
10 | | - <RazorCompileOnBuild>false</RazorCompileOnBuild> |
11 | | - <RazorCompileOnPublish>false</RazorCompileOnPublish> |
12 | 10 | <EnableDefaultRazorGenerateItems>false</EnableDefaultRazorGenerateItems> |
13 | | - <DisableFastUpToDateCheck>true</DisableFastUpToDateCheck> |
14 | 11 | <AddRazorSupportForMvc>true</AddRazorSupportForMvc> |
| 12 | + <RazorTargetName>Microsoft.AspNetCore.Identity.UI.Views.V4</RazorTargetName> |
15 | 13 |
|
16 | 14 | <DisableStaticWebAssetsBuildPropsFileGeneration>true</DisableStaticWebAssetsBuildPropsFileGeneration> |
17 | 15 | <StaticWebAssetsDisableProjectBuildPropsFileGeneration>true</StaticWebAssetsDisableProjectBuildPropsFileGeneration> |
|
21 | 19 | _UpdatedIdentityUIStaticWebAssets |
22 | 20 | </GetCurrentProjectStaticWebAssetsDependsOn> |
23 | 21 |
|
24 | | - <IdentityUIFrameworkVersion Condition="'$(IdentityUIFrameworkVersion)' == ''">Bootstrap4</IdentityUIFrameworkVersion> |
25 | 22 | <PackageThirdPartyNoticesFile>$(MSBuildThisFileDirectory)THIRD-PARTY-NOTICES.TXT</PackageThirdPartyNoticesFile> |
26 | | - |
27 | 23 | </PropertyGroup> |
28 | 24 |
|
29 | 25 | <ItemGroup> |
|
47 | 43 | <SuppressBaselineReference Include="Newtonsoft.Json" /> |
48 | 44 | </ItemGroup> |
49 | 45 |
|
50 | | - <ItemGroup> |
51 | | - <UIFrameworkVersionMoniker Include="V4" /> |
52 | | - </ItemGroup> |
53 | | - |
54 | | - <ItemGroup> |
55 | | - <Folder Include="build\" /> |
56 | | - </ItemGroup> |
57 | | - |
58 | | - <!-- Source build doesn't build this package --> |
59 | | - <Target Name="BuildRazorViews" DependsOnTargets="Compile" BeforeTargets="Build" Condition="'$(DotNetBuildFromSource)' != 'true'"> |
60 | | - <Message Text="Building razor views assemblies" Importance="High" /> |
61 | | - <MSbuild Projects="$(MSBuildThisFile)" |
62 | | - Targets="BuildForUI" |
63 | | - Properties=" |
64 | | - BuildProjectReferences=false; |
65 | | - RazorCompileOnBuild=true; |
66 | | - UIFrameworkVersion=%(UIFrameworkVersionMoniker.Identity); |
67 | | - IntermediateOutputPath=$(IntermediateOutputPath)%(UIFrameworkVersionMoniker.Identity)\;" /> |
68 | | - |
69 | | - <Copy |
70 | | - SourceFiles="$(IntermediateOutputPath)%(UIFrameworkVersionMoniker.Identity)\$(TargetName).Views.%(UIFrameworkVersionMoniker.Identity).dll" |
71 | | - DestinationFolder="$(OutDir)" |
72 | | - SkipUnchangedFiles="$(SkipCopyUnchangedFiles)" |
73 | | - OverwriteReadOnlyFiles="$(OverwriteReadOnlyFiles)" |
74 | | - Retries="$(CopyRetryCount)" |
75 | | - RetryDelayMilliseconds="$(CopyRetryDelayMilliseconds)" |
76 | | - UseHardlinksIfPossible="$(CreateHardLinksForCopyFilesToOutputDirectoryIfPossible)" |
77 | | - UseSymboliclinksIfPossible="$(CreateSymbolicLinksForCopyFilesToOutputDirectoryIfPossible)"> |
78 | | - |
79 | | - <Output TaskParameter="DestinationFiles" ItemName="FileWrites"/> |
80 | | - <Output TaskParameter="DestinationFiles" ItemName="_RazorAssembly"/> |
81 | | - |
82 | | - </Copy> |
83 | | - |
84 | | - <Copy |
85 | | - SourceFiles="$(IntermediateOutputPath)%(UIFrameworkVersionMoniker.Identity)\$(TargetName).Views.%(UIFrameworkVersionMoniker.Identity).pdb" |
86 | | - DestinationFolder="$(OutDir)" |
87 | | - SkipUnchangedFiles="$(SkipCopyUnchangedFiles)" |
88 | | - OverwriteReadOnlyFiles="$(OverwriteReadOnlyFiles)" |
89 | | - Retries="$(CopyRetryCount)" |
90 | | - RetryDelayMilliseconds="$(CopyRetryDelayMilliseconds)" |
91 | | - UseHardlinksIfPossible="$(CreateHardLinksForCopyFilesToOutputDirectoryIfPossible)" |
92 | | - UseSymboliclinksIfPossible="$(CreateSymbolicLinksForCopyFilesToOutputDirectoryIfPossible)"> |
93 | | - |
94 | | - <Output TaskParameter="DestinationFiles" ItemName="FileWrites" /> |
95 | | - </Copy> |
96 | | - |
97 | | - <Message Importance="High" Text="$(MSBuildProjectName) -> %(_RazorAssembly.FullPath)" /> |
98 | | - |
99 | | - </Target> |
100 | | - |
101 | | - <PropertyGroup> |
102 | | - <RazorTargetName>Microsoft.AspNetCore.Identity.UI.Views.$(UIFrameworkVersion)</RazorTargetName> |
103 | | - </PropertyGroup> |
104 | | - |
105 | | - <Target Name="SetupRazorInputs"> |
| 46 | + <Target Name="SetupRazorInputs" BeforeTargets="ResolveRazorGenerateInputs"> |
106 | 47 | <ItemGroup> |
107 | | - <_RazorGenerate Include="Areas\Identity\Pages\$(UIFrameworkVersion)\**\*.cshtml" /> |
| 48 | + <_RazorGenerate Include="Areas\Identity\Pages\V4\**\*.cshtml" /> |
108 | 49 |
|
109 | 50 | <RazorGenerate Include="@(_RazorGenerate)" Link="Areas\Identity\Pages\%(RecursiveDir)%(Filename)%(Extension)" /> |
110 | 51 | </ItemGroup> |
111 | 52 | </Target> |
112 | 53 |
|
113 | | - <Target Name="BuildForUI" DependsOnTargets="SetupRazorInputs;RazorCompile" /> |
114 | | - |
115 | | -<Target Name="_GetRazorDlls" BeforeTargets="GetCopyToOutputDirectoryItems"> |
116 | | - |
117 | | - <ItemGroup> |
118 | | - <_GeneratedRazorViews Include="$(TargetDir)$(TargetName).Views.%(UIFrameworkVersionMoniker.Identity).dll" /> |
119 | | - <_GeneratedRazorViews Include="$(TargetDir)$(TargetName).Views.%(UIFrameworkVersionMoniker.Identity).pdb" /> |
120 | | - |
121 | | - <AllItemsFullPathWithTargetPath Include="%(_GeneratedRazorViews.FullPath)"> |
122 | | - <TargetPath>%(FileName)%(Extension)</TargetPath> |
123 | | - <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> |
124 | | - </AllItemsFullPathWithTargetPath> |
125 | | - </ItemGroup> |
126 | | - </Target> |
127 | | - |
128 | | - <Target Name="_AddRazorDlls" BeforeTargets="BuiltProjectOutputGroup"> |
129 | | - <ItemGroup> |
130 | | - <BuiltProjectOutputGroupOutput Include="$(IntermediateOutputPath)%(UIFrameworkVersionMoniker.Identity)\$(TargetName).Views.%(UIFrameworkVersionMoniker.Identity).dll" /> |
131 | | - </ItemGroup> |
132 | | - </Target> |
133 | | - |
134 | | - <Target Name="_AddRazorPdbs" BeforeTargets="DebugSymbolsProjectOutputGroup"> |
135 | | - <ItemGroup> |
136 | | - <DebugSymbolsProjectOutputGroupOutput Include="$(IntermediateOutputPath)%(UIFrameworkVersionMoniker.Identity)\$(TargetName).Views.%(UIFrameworkVersionMoniker.Identity).pdb" /> |
137 | | - </ItemGroup> |
138 | | - </Target> |
139 | | - |
140 | | - <!-- Source build doesn't build this package --> |
141 | | - <Target Name="VerifyBuildOutputs" AfterTargets="BuildRazorViews" Condition="'$(DotNetBuildFromSource)' != 'true'"> |
142 | | - <ItemGroup> |
143 | | - <ExpectedOutputFile Include="$(TargetDir)Microsoft.AspNetCore.Identity.UI.Views.V4.dll" /> |
144 | | - </ItemGroup> |
145 | | - |
146 | | - <Error Text="Unable to find precompiled view file %(ExpectedOutputFile.Identity)" Condition="!Exists('%(ExpectedOutputFile.Identity)')" /> |
147 | | - </Target> |
148 | | - |
149 | 54 | <Target Name="_UpdatedIdentityUIStaticWebAssets"> |
150 | 55 |
|
151 | 56 | <ItemGroup> |
152 | 57 | <StaticWebAsset Remove="@(StaticWebAsset)" /> |
153 | 58 |
|
154 | 59 | <_V4Content Include="wwwroot\V4\**" /> |
155 | 60 |
|
156 | | - <StaticWebAsset Include="@(_V4Content->'%(FullPath)')" Condition="'$(IdentityUIFrameworkVersion)' == 'Bootstrap4'"> |
| 61 | + <StaticWebAsset Include="@(_V4Content->'%(FullPath)')"> |
157 | 62 | <SourceType></SourceType> |
158 | 63 | <SourceId>Microsoft.AspNetCore.Identity.UI</SourceId> |
159 | 64 | <ContentRoot>$([MSBuild]::NormalizePath('$(MSBuildThisFileDirectory)wwwroot/V4'))</ContentRoot> |
|
0 commit comments