|
1 |
| -<Project Sdk="Microsoft.NET.Sdk.Razor"> |
| 1 | +<Project Sdk="Microsoft.NET.Sdk.Razor"> |
2 | 2 |
|
3 | 3 | <PropertyGroup>
|
4 | 4 | <Description>ASP.NET Core Identity UI is the default Razor Pages built-in UI for the ASP.NET Core Identity framework.</Description>
|
|
7 | 7 | <GenerateDocumentationFile>true</GenerateDocumentationFile>
|
8 | 8 | <PackageTags>aspnetcore;identity;membership;razorpages</PackageTags>
|
9 | 9 | <IsShippingPackage>true</IsShippingPackage>
|
10 |
| - <GenerateEmbeddedFilesManifest>true</GenerateEmbeddedFilesManifest> |
11 | 10 | <ProvideApplicationPartFactoryAttributeTypeName>Microsoft.AspNetCore.Mvc.ApplicationParts.NullApplicationPartFactory, Microsoft.AspNetCore.Mvc.Core</ProvideApplicationPartFactoryAttributeTypeName>
|
12 | 11 | <RazorCompileOnBuild>false</RazorCompileOnBuild>
|
13 | 12 | <RazorCompileOnPublish>false</RazorCompileOnPublish>
|
14 | 13 | <EnableDefaultRazorGenerateItems>false</EnableDefaultRazorGenerateItems>
|
15 | 14 | <DisableFastUpToDateCheck>true</DisableFastUpToDateCheck>
|
16 | 15 | <AddRazorSupportForMvc>true</AddRazorSupportForMvc>
|
| 16 | + |
| 17 | + <DisableStaticWebAssetsBuildPropsFileGeneration>true</DisableStaticWebAssetsBuildPropsFileGeneration> |
| 18 | + <StaticWebAssetsDisableProjectBuildPropsFileGeneration>true</StaticWebAssetsDisableProjectBuildPropsFileGeneration> |
| 19 | + |
| 20 | + <GetCurrentProjectStaticWebAssetsDependsOn> |
| 21 | + $(GetCurrentProjectStaticWebAssetsDependsOn); |
| 22 | + _UpdatedIdentityUIStaticWebAssets |
| 23 | + </GetCurrentProjectStaticWebAssetsDependsOn> |
| 24 | + |
| 25 | + <IdentityUIFrameworkVersion Condition="'$(IdentityUIFrameworkVersion)' == ''">Bootstrap4</IdentityUIFrameworkVersion> |
| 26 | + |
17 | 27 | </PropertyGroup>
|
18 | 28 |
|
19 | 29 | <ItemGroup>
|
20 |
| - <EmbeddedResource Include="wwwroot/**/*" /> |
21 |
| - <EmbeddedResource Remove="wwwroot/**/LICENSE*" /> |
22 |
| - <None Remove="wwwroot/**/LICENSE*" /> |
| 30 | + <Content Remove="@(Content)" /> |
| 31 | + <Content Include="wwwroot\**\*" Pack="true" /> |
| 32 | + <None Include="build\*" Pack="true" PackagePath="build\" /> |
23 | 33 | <None Include="THIRD-PARTY-NOTICES.txt" Pack="true" PackagePath="/THIRD-PARTY-NOTICES.txt" />
|
24 |
| - |
25 |
| - <Content Update="wwwroot/**/*" Pack="false" /> |
26 |
| - <Content Update="**\*.cshtml" Pack="false" /> |
27 | 34 | </ItemGroup>
|
28 | 35 |
|
29 | 36 | <ItemGroup>
|
|
40 | 47 | <UIFrameworkVersionMoniker Include="V4" />
|
41 | 48 | </ItemGroup>
|
42 | 49 |
|
| 50 | + <ItemGroup> |
| 51 | + <Folder Include="build\" /> |
| 52 | + </ItemGroup> |
| 53 | + |
43 | 54 | <!-- Source build doesn't build this package -->
|
44 | 55 | <Target Name="BuildRazorViews" DependsOnTargets="Compile" BeforeTargets="Build" Condition="'$(DotNetBuildFromSource)' != 'true'">
|
45 | 56 | <Message Text="Building razor views assemblies" Importance="High" />
|
|
63 | 74 |
|
64 | 75 | <Output TaskParameter="DestinationFiles" ItemName="FileWrites"/>
|
65 | 76 | <Output TaskParameter="DestinationFiles" ItemName="_RazorAssembly"/>
|
| 77 | + |
66 | 78 | </Copy>
|
67 | 79 |
|
68 | 80 | <Copy
|
|
75 | 87 | UseHardlinksIfPossible="$(CreateHardLinksForCopyFilesToOutputDirectoryIfPossible)"
|
76 | 88 | UseSymboliclinksIfPossible="$(CreateSymbolicLinksForCopyFilesToOutputDirectoryIfPossible)">
|
77 | 89 |
|
78 |
| - <Output TaskParameter="DestinationFiles" ItemName="FileWrites"/> |
| 90 | + <Output TaskParameter="DestinationFiles" ItemName="FileWrites" /> |
79 | 91 | </Copy>
|
80 | 92 |
|
81 |
| - <Message |
82 |
| - Importance="High" |
83 |
| - Text="$(MSBuildProjectName) -> %(_RazorAssembly.FullPath)" /> |
| 93 | + <Message Importance="High" Text="$(MSBuildProjectName) -> %(_RazorAssembly.FullPath)" /> |
84 | 94 |
|
85 | 95 | </Target>
|
86 | 96 |
|
|
90 | 100 |
|
91 | 101 | <Target Name="SetupRazorInputs">
|
92 | 102 | <ItemGroup>
|
93 |
| - <_RazorGenerate |
94 |
| - Include="Areas\Identity\Pages\$(UIFrameworkVersion)\**\*.cshtml" /> |
| 103 | + <_RazorGenerate Include="Areas\Identity\Pages\$(UIFrameworkVersion)\**\*.cshtml" /> |
95 | 104 |
|
96 |
| - <RazorGenerate |
97 |
| - Include="@(_RazorGenerate)" |
98 |
| - Link="Areas\Identity\Pages\%(RecursiveDir)%(Filename)%(Extension)" /> |
| 105 | + <RazorGenerate Include="@(_RazorGenerate)" Link="Areas\Identity\Pages\%(RecursiveDir)%(Filename)%(Extension)" /> |
99 | 106 | </ItemGroup>
|
100 | 107 | </Target>
|
101 | 108 |
|
102 | 109 | <Target Name="BuildForUI" DependsOnTargets="SetupRazorInputs;RazorCompile" />
|
103 | 110 |
|
104 |
| -<Target |
105 |
| - Name="_GetRazorDlls" BeforeTargets="GetCopyToOutputDirectoryItems"> |
| 111 | +<Target Name="_GetRazorDlls" BeforeTargets="GetCopyToOutputDirectoryItems"> |
106 | 112 |
|
107 | 113 | <ItemGroup>
|
108 | 114 | <_GeneratedRazorViews Include="$(TargetDir)$(TargetName).Views.%(UIFrameworkVersionMoniker.Identity).dll" />
|
|
117 | 123 |
|
118 | 124 | <Target Name="_AddRazorDlls" BeforeTargets="BuiltProjectOutputGroup">
|
119 | 125 | <ItemGroup>
|
120 |
| - <BuiltProjectOutputGroupOutput |
121 |
| - Include="$(IntermediateOutputPath)%(UIFrameworkVersionMoniker.Identity)\$(TargetName).Views.%(UIFrameworkVersionMoniker.Identity).dll" /> |
| 126 | + <BuiltProjectOutputGroupOutput Include="$(IntermediateOutputPath)%(UIFrameworkVersionMoniker.Identity)\$(TargetName).Views.%(UIFrameworkVersionMoniker.Identity).dll" /> |
122 | 127 | </ItemGroup>
|
123 | 128 | </Target>
|
124 | 129 |
|
125 | 130 | <Target Name="_AddRazorPdbs" BeforeTargets="DebugSymbolsProjectOutputGroup">
|
126 | 131 | <ItemGroup>
|
127 |
| - <DebugSymbolsProjectOutputGroupOutput |
128 |
| - Include="$(IntermediateOutputPath)%(UIFrameworkVersionMoniker.Identity)\$(TargetName).Views.%(UIFrameworkVersionMoniker.Identity).pdb" /> |
| 132 | + <DebugSymbolsProjectOutputGroupOutput Include="$(IntermediateOutputPath)%(UIFrameworkVersionMoniker.Identity)\$(TargetName).Views.%(UIFrameworkVersionMoniker.Identity).pdb" /> |
129 | 133 | </ItemGroup>
|
130 | 134 | </Target>
|
131 | 135 |
|
|
136 | 140 | <ExpectedOutputFile Include="$(TargetDir)Microsoft.AspNetCore.Identity.UI.Views.V4.dll" />
|
137 | 141 | </ItemGroup>
|
138 | 142 |
|
139 |
| - <Error Text="Unable to find precompiled view file %(ExpectedOutputFile.Identity)" |
140 |
| - Condition="!Exists('%(ExpectedOutputFile.Identity)')" /> |
| 143 | + <Error Text="Unable to find precompiled view file %(ExpectedOutputFile.Identity)" Condition="!Exists('%(ExpectedOutputFile.Identity)')" /> |
| 144 | + </Target> |
| 145 | + |
| 146 | + <Target Name="_UpdatedIdentityUIStaticWebAssets"> |
| 147 | + |
| 148 | + <ItemGroup> |
| 149 | + <StaticWebAsset Remove="@(StaticWebAsset)" /> |
| 150 | + |
| 151 | + <_V3Content Include="wwwroot\V3\**" /> |
| 152 | + <_V4Content Include="wwwroot\V4\**" /> |
| 153 | + |
| 154 | + <StaticWebAsset Include="@(_V3Content->'%(FullPath)')" Condition="'$(IdentityUIFrameworkVersion)' == 'Bootstrap3'"> |
| 155 | + <SourceType></SourceType> |
| 156 | + <SourceId>Microsoft.AspNetCore.Identity.UI</SourceId> |
| 157 | + <ContentRoot>$([MSBuild]::NormalizePath('$(MSBuildThisFileDirectory)wwwroot/V3'))</ContentRoot> |
| 158 | + <BasePath>/Identity</BasePath> |
| 159 | + <RelativePath>%(RecursiveDir)%(FileName)%(Extension)</RelativePath> |
| 160 | + </StaticWebAsset> |
| 161 | + |
| 162 | + <StaticWebAsset Include="@(_V4Content->'%(FullPath)')" Condition="'$(IdentityUIFrameworkVersion)' == 'Bootstrap4'"> |
| 163 | + <SourceType></SourceType> |
| 164 | + <SourceId>Microsoft.AspNetCore.Identity.UI</SourceId> |
| 165 | + <ContentRoot>$([MSBuild]::NormalizePath('$(MSBuildThisFileDirectory)wwwroot/V4'))</ContentRoot> |
| 166 | + <BasePath>/Identity</BasePath> |
| 167 | + <RelativePath>%(RecursiveDir)%(FileName)%(Extension)</RelativePath> |
| 168 | + </StaticWebAsset> |
| 169 | + </ItemGroup> |
| 170 | + |
141 | 171 | </Target>
|
142 | 172 |
|
143 | 173 | </Project>
|
0 commit comments