Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Split static web assets SDK from the Razor SDK #31079

Merged
merged 4 commits into from
Mar 14, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 36 additions & 3 deletions sdk.sln
Original file line number Diff line number Diff line change
Expand Up @@ -308,7 +308,6 @@ EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Sdk (2)", "Sdk (2)", "{4ACCAC39-8ECD-45F8-B5AF-EB7E37CD36CC}"
ProjectSection(SolutionItems) = preProject
src\RazorSdk\Sdk\Sdk.props = src\RazorSdk\Sdk\Sdk.props
src\RazorSdk\Sdk\Sdk.Razor.StaticAssets.ProjectSystem.props = src\RazorSdk\Sdk\Sdk.Razor.StaticAssets.ProjectSystem.props
src\RazorSdk\Sdk\Sdk.targets = src\RazorSdk\Sdk\Sdk.targets
EndProjectSection
EndProject
Expand All @@ -322,8 +321,6 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Targets (2)", "Targets (2)"
src\RazorSdk\Targets\Microsoft.NET.Sdk.Razor.GenerateAssemblyInfo.targets = src\RazorSdk\Targets\Microsoft.NET.Sdk.Razor.GenerateAssemblyInfo.targets
src\RazorSdk\Targets\Microsoft.NET.Sdk.Razor.MvcApplicationPartsDiscovery.targets = src\RazorSdk\Targets\Microsoft.NET.Sdk.Razor.MvcApplicationPartsDiscovery.targets
src\RazorSdk\Targets\Microsoft.NET.Sdk.Razor.props = src\RazorSdk\Targets\Microsoft.NET.Sdk.Razor.props
src\RazorSdk\Targets\Microsoft.NET.Sdk.Razor.ScopedCss.targets = src\RazorSdk\Targets\Microsoft.NET.Sdk.Razor.ScopedCss.targets
src\RazorSdk\Targets\Microsoft.NET.Sdk.Razor.StaticWebAssets.targets = src\RazorSdk\Targets\Microsoft.NET.Sdk.Razor.StaticWebAssets.targets
src\RazorSdk\Targets\Sdk.Razor.CurrentVersion.props = src\RazorSdk\Targets\Sdk.Razor.CurrentVersion.props
src\RazorSdk\Targets\Sdk.Razor.CurrentVersion.targets = src\RazorSdk\Targets\Sdk.Razor.CurrentVersion.targets
EndProjectSection
Expand Down Expand Up @@ -413,6 +410,33 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.DotNet.GenAPI.Tas
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.NET.Sdk.Web.Tests", "src\Tests\Microsoft.NET.Sdk.Web.Tests\Microsoft.NET.Sdk.Web.Tests.csproj", "{B8A61A5C-A9A4-45C5-97E3-CB368358682F}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "StaticWebAssetsSdk", "StaticWebAssetsSdk", "{9E9F3BB2-6FED-47BC-869C-BFAF6E7C85FC}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Sdk", "Sdk", "{CA976F33-7BFA-4F56-8F86-AE132B3B4CBE}"
ProjectSection(SolutionItems) = preProject
src\StaticWebAssetsSdk\Sdk\Sdk.props = src\StaticWebAssetsSdk\Sdk\Sdk.props
src\StaticWebAssetsSdk\Sdk\Sdk.StaticWebAssets.StaticAssets.ProjectSystem.props = src\StaticWebAssetsSdk\Sdk\Sdk.StaticWebAssets.StaticAssets.ProjectSystem.props
src\StaticWebAssetsSdk\Sdk\Sdk.targets = src\StaticWebAssetsSdk\Sdk\Sdk.targets
EndProjectSection
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Targets", "Targets", "{C5C73211-A713-40BF-8FC8-A690CCBE66F5}"
ProjectSection(SolutionItems) = preProject
src\StaticWebAssetsSdk\Targets\Microsoft.NET.Sdk.StaticWebAssets.JSModules.targets = src\StaticWebAssetsSdk\Targets\Microsoft.NET.Sdk.StaticWebAssets.JSModules.targets
src\StaticWebAssetsSdk\Targets\Microsoft.NET.Sdk.StaticWebAssets.props = src\StaticWebAssetsSdk\Targets\Microsoft.NET.Sdk.StaticWebAssets.props
src\StaticWebAssetsSdk\Targets\Microsoft.NET.Sdk.StaticWebAssets.ScopedCss.5_0.targets = src\StaticWebAssetsSdk\Targets\Microsoft.NET.Sdk.StaticWebAssets.ScopedCss.5_0.targets
src\StaticWebAssetsSdk\Targets\Microsoft.NET.Sdk.StaticWebAssets.ScopedCss.targets = src\StaticWebAssetsSdk\Targets\Microsoft.NET.Sdk.StaticWebAssets.ScopedCss.targets
src\StaticWebAssetsSdk\Targets\Microsoft.NET.Sdk.StaticWebAssets.5_0.targets = src\StaticWebAssetsSdk\Targets\Microsoft.NET.Sdk.StaticWebAssets.5_0.targets
src\StaticWebAssetsSdk\Targets\Microsoft.NET.Sdk.StaticWebAssets.Pack.CrossTargeting.targets = src\StaticWebAssetsSdk\Targets\Microsoft.NET.Sdk.StaticWebAssets.Pack.CrossTargeting.targets
src\StaticWebAssetsSdk\Targets\Microsoft.NET.Sdk.StaticWebAssets.Pack.targets = src\StaticWebAssetsSdk\Targets\Microsoft.NET.Sdk.StaticWebAssets.Pack.targets
src\StaticWebAssetsSdk\Targets\Microsoft.NET.Sdk.StaticWebAssets.targets = src\StaticWebAssetsSdk\Targets\Microsoft.NET.Sdk.StaticWebAssets.targets
src\StaticWebAssetsSdk\Targets\Sdk.StaticWebAssets.CurrentVersion.props = src\StaticWebAssetsSdk\Targets\Sdk.StaticWebAssets.CurrentVersion.props
src\StaticWebAssetsSdk\Targets\Sdk.StaticWebAssets.CurrentVersion.targets = src\StaticWebAssetsSdk\Targets\Sdk.StaticWebAssets.CurrentVersion.targets
EndProjectSection
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Tasks", "Tasks", "{6C8E1E65-EA73-434D-818F-E564BFFE9F86}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.NET.Sdk.StaticWebAssets.Tasks", "src\StaticWebAssetsSdk\Tasks\Microsoft.NET.Sdk.StaticWebAssets.Tasks.csproj", "{3D42A6BA-38DB-4AA5-9F86-8A78D00D9A07}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand Down Expand Up @@ -799,6 +823,10 @@ Global
{B8A61A5C-A9A4-45C5-97E3-CB368358682F}.Debug|Any CPU.Build.0 = Debug|Any CPU
{B8A61A5C-A9A4-45C5-97E3-CB368358682F}.Release|Any CPU.ActiveCfg = Release|Any CPU
{B8A61A5C-A9A4-45C5-97E3-CB368358682F}.Release|Any CPU.Build.0 = Release|Any CPU
{3D42A6BA-38DB-4AA5-9F86-8A78D00D9A07}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{3D42A6BA-38DB-4AA5-9F86-8A78D00D9A07}.Debug|Any CPU.Build.0 = Debug|Any CPU
{3D42A6BA-38DB-4AA5-9F86-8A78D00D9A07}.Release|Any CPU.ActiveCfg = Release|Any CPU
{3D42A6BA-38DB-4AA5-9F86-8A78D00D9A07}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand Down Expand Up @@ -944,6 +972,11 @@ Global
{5F74AD67-A4AD-4660-A63C-844DAAF354C4} = {95D8B040-FD7F-4C86-8E47-341AF630EDA9}
{C419AE2D-D318-49EB-8ECA-6A5DC13FE4EA} = {95D8B040-FD7F-4C86-8E47-341AF630EDA9}
{B8A61A5C-A9A4-45C5-97E3-CB368358682F} = {580D1AE7-AA8F-4912-8B76-105594E00B3B}
{9E9F3BB2-6FED-47BC-869C-BFAF6E7C85FC} = {22AB674F-ED91-4FBC-BFEE-8A1E82F9F05E}
{CA976F33-7BFA-4F56-8F86-AE132B3B4CBE} = {9E9F3BB2-6FED-47BC-869C-BFAF6E7C85FC}
{C5C73211-A713-40BF-8FC8-A690CCBE66F5} = {9E9F3BB2-6FED-47BC-869C-BFAF6E7C85FC}
{6C8E1E65-EA73-434D-818F-E564BFFE9F86} = {9E9F3BB2-6FED-47BC-869C-BFAF6E7C85FC}
{3D42A6BA-38DB-4AA5-9F86-8A78D00D9A07} = {6C8E1E65-EA73-434D-818F-E564BFFE9F86}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {FB8F26CE-4DE6-433F-B32A-79183020BBD6}
Expand Down
3 changes: 2 additions & 1 deletion source-build.slnf
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
"src\\Resolvers\\Microsoft.NET.Sdk.WorkloadMSBuildSdkResolver\\Microsoft.NET.Sdk.WorkloadMSBuildSdkResolver.csproj",
"src\\Resolvers\\Microsoft.NET.Sdk.WorkloadManifestReader\\Microsoft.NET.Sdk.WorkloadManifestReader.csproj",
"src\\Resolvers\\WorkloadManifestValidator\\WorkloadManifestValidator.csproj",
"src\\StaticWebAssetsSdk\\Tasks\\Microsoft.NET.Sdk.StaticWebAssets.Tasks.csproj",
"src\\Tasks\\Microsoft.NET.Build.Extensions.Tasks\\Microsoft.NET.Build.Extensions.Tasks.csproj",
"src\\Tasks\\Microsoft.NET.Build.Tasks\\Microsoft.NET.Build.Tasks.csproj",
"src\\WebSdk\\ProjectSystem\\Tasks\\Microsoft.NET.Sdk.Web.ProjectSystem.Tasks.csproj",
Expand All @@ -44,4 +45,4 @@
"template_feed\\Microsoft.DotNet.Common.ProjectTemplates.8.0\\Microsoft.DotNet.Common.ProjectTemplates.8.0.csproj"
]
}
}
}
7 changes: 5 additions & 2 deletions src/Layout/redist/targets/GenerateLayout.targets
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
then need the version file there as well. -->
<Copy SourceFiles="$(OutputPath)/.version" DestinationFiles="$(BaseOutputPath)$(Configuration)/.version" SkipUnchangedFiles="true" />


</Target>

<Target Name="PublishRoslyn"
Expand Down Expand Up @@ -56,7 +56,7 @@
<AnalyzerTargets Include="$(PkgMicrosoft_CodeAnalysis_NetAnalyzers)/buildTransitive/Microsoft.CodeAnalysis.NetAnalyzers.props" />
<AnalyzerTargets Include="$(PkgMicrosoft_CodeAnalysis_NetAnalyzers)/buildTransitive/Microsoft.CodeAnalysis.NetAnalyzers.targets" />
<AnalyzerConfig Include="$(PkgMicrosoft_CodeAnalysis_NetAnalyzers)/buildTransitive/config/**/*" />

<ILLinkAnalyzersTargets Include="$(PkgMicrosoft_NET_ILLink_Tasks)/build/Microsoft.NET.ILLink.Analyzers.props" />
<ILLinkAnalyzersAssemblies Include="$(PkgMicrosoft_NET_ILLink_Tasks)/analyzers/dotnet/cs/**/*.dll" />

Expand Down Expand Up @@ -136,6 +136,7 @@
<NETSdkWorkerSourceRoot>$(ArtifactsBinDir)$(Configuration)\Sdks\Microsoft.NET.Sdk.Worker</NETSdkWorkerSourceRoot>
<NETSdkBlazorWasmSourceRoot>$(ArtifactsBinDir)$(Configuration)\Sdks\Microsoft.NET.Sdk.BlazorWebAssembly</NETSdkBlazorWasmSourceRoot>
<NETSdkRazorSourceRoot>$(ArtifactsBinDir)$(Configuration)\Sdks\Microsoft.NET.Sdk.Razor</NETSdkRazorSourceRoot>
<NETSdkStaticWebAssetsSourceRoot>$(ArtifactsBinDir)$(Configuration)\Sdks\Microsoft.NET.Sdk.StaticWebAssets</NETSdkStaticWebAssetsSourceRoot>
</PropertyGroup>
<ItemGroup>
<NETSdksContent Include="$(NETSdkSourceRoot)\**\*.*"
Expand All @@ -152,6 +153,8 @@
DeploymentSubPath="Sdks\Microsoft.NET.Sdk.BlazorWebAssembly"/>
<NETSdksContent Include="$(NETSdkRazorSourceRoot)\**\*.*"
DeploymentSubPath="Sdks\Microsoft.NET.Sdk.Razor"/>
<NETSdksContent Include="$(NETSdkStaticWebAssetsSourceRoot)\**\*.*"
DeploymentSubPath="Sdks\Microsoft.NET.Sdk.StaticWebAssets"/>
</ItemGroup>
<Copy SourceFiles="@(NETSdksContent)"
DestinationFiles="@(NETSdksContent->'$(OutputPath)\%(DeploymentSubpath)\%(RecursiveDir)%(Filename)%(Extension)')" />
Expand Down
2 changes: 2 additions & 0 deletions src/RazorSdk/Sdk/Sdk.props
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,11 @@ Copyright (c) .NET Foundation. All rights reserved.
<PropertyGroup>
<!-- Determines if the Razor Sdk is responsible for importing Microsoft.NET.Sdk. Microsoft.NET.Sdk.Web may have previously imported this. -->
<_RazorSdkImportsMicrosoftNetSdk Condition="'$(UsingMicrosoftNETSdk)' != 'true'">true</_RazorSdkImportsMicrosoftNetSdk>
<_RazorSdkImportsMicrosoftNetSdkStaticWebAssets Condition="'$(UsingMicrosoftNETSdkStaticWebAssets)' != 'true'">true</_RazorSdkImportsMicrosoftNetSdkStaticWebAssets>
</PropertyGroup>

<Import Sdk="Microsoft.NET.Sdk" Project="Sdk.props" Condition="'$(_RazorSdkImportsMicrosoftNetSdk)' == 'true'" />
<Import Sdk="Microsoft.NET.Sdk.StaticWebAssets" Project="Sdk.props" Condition="'$(_RazorSdkImportsMicrosoftNetSdkStaticWebAssets)' == 'true'" />
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@MackinnonBuck this is what needs to go into the Razor repo, fyi


<PropertyGroup>
<RazorSdkCurrentVersionProps Condition="'$(RazorSdkCurrentVersionProps)' == ''">$(MSBuildThisFileDirectory)..\targets\Sdk.Razor.CurrentVersion.props</RazorSdkCurrentVersionProps>
Expand Down
1 change: 1 addition & 0 deletions src/RazorSdk/Sdk/Sdk.targets
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ Copyright (c) .NET Foundation. All rights reserved.
<Project ToolsVersion="14.0">

<Import Sdk="Microsoft.NET.Sdk" Project="Sdk.targets" Condition="'$(_RazorSdkImportsMicrosoftNetSdk)' == 'true'" />
<Import Sdk="Microsoft.NET.Sdk.StaticWebAssets" Project="Sdk.targets" Condition="'$(_RazorSdkImportsMicrosoftNetSdkStaticWebAssets)' == 'true'" />

<PropertyGroup Condition="'$(RazorSdkCurrentVersionTargets)' == ''">
<RazorSdkCurrentVersionTargets>$(MSBuildThisFileDirectory)..\targets\Sdk.Razor.CurrentVersion.targets</RazorSdkCurrentVersionTargets>
Expand Down
7 changes: 0 additions & 7 deletions src/RazorSdk/Targets/Sdk.Razor.CurrentVersion.props
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,6 @@ Copyright (c) .NET Foundation. All rights reserved.
-->
<EnableDefaultRazorComponentItems Condition="'$(EnableDefaultRazorComponentItems)'==''">true</EnableDefaultRazorComponentItems>

<!--
Set to true to automatically include Razor (.razor.cs) files in @(ScopedCssInput) from @(Content).
-->
<EnableDefaultScopedCssItems Condition="'$(EnableDefaultScopedCssItems)'==''">true</EnableDefaultScopedCssItems>

<!--
Set to true to copy RazorGenerate items (.cshtml) to the publish directory.

Expand Down Expand Up @@ -86,6 +81,4 @@ Copyright (c) .NET Foundation. All rights reserved.
<None Remove="**\*.razor" />
</ItemGroup>

<Import Project="$(MSBuildThisFileDirectory)..\Sdk\Sdk.Razor.StaticAssets.ProjectSystem.props" />

</Project>
28 changes: 0 additions & 28 deletions src/RazorSdk/Targets/Sdk.Razor.CurrentVersion.targets
Original file line number Diff line number Diff line change
Expand Up @@ -103,20 +103,8 @@ Copyright (c) .NET Foundation. All rights reserved.
'$(RazorLangVersion)' == 'Latest' OR
'$(RazorLangVersion)' == 'Experimental' OR
('$(RazorLangVersion)' != '' AND '$(RazorLangVersion)' >= '3.0')">true</_Targeting30OrNewerRazorLangVersion>

<!-- Controls whether or not the static web assets feature is enabled. By default is enabled for netcoreapp3.0
applications and RazorLangVersion 3 or above. -->
<StaticWebAssetsEnabled Condition="'$(StaticWebAssetsEnabled)' == ''">$(_Targeting30OrNewerRazorLangVersion)</StaticWebAssetsEnabled>

<UseStaticWebAssetsV2>$(_TargetingNET60OrLater)</UseStaticWebAssetsV2>

<!-- Controls whether or not the scoped css feature is enabled. By default is enabled for net5.0 applications and RazorLangVersion 5 or above -->
<ScopedCssEnabled Condition="'$(ScopedCssEnabled)' == '' and '$(StaticWebAssetsEnabled)' == 'true'">$(_TargetingNET50OrLater)</ScopedCssEnabled>

<JSModulesEnabled Condition="'$(JSModulesEnabled)' == '' and '$(StaticWebAssetsEnabled)' == 'true'">$(_TargetingNET60OrLater)</JSModulesEnabled>
</PropertyGroup>


<PropertyGroup>
<!--
The property IsRazorCompilerReferenced is defined by the 2.x Razor.Design package. We can use this as a best guess to determine if a project is targeting 2.x or earlier.
Expand Down Expand Up @@ -398,22 +386,6 @@ Copyright (c) .NET Foundation. All rights reserved.

<Import Project="Microsoft.NET.Sdk.Razor.SourceGenerators.targets" Condition="'$(UseRazorSourceGenerator)' == 'true'" />

<!-- These targets are not imported in the outer multi targeting build. This happens alredy because 'StaticWebAssetsEnabled' will be false, but even if the user turns it
on unconditionally in their csproj file (very rare, undocumented, but possible), these targets should not be imported in the outer cross targeting build.
-->
<Import Project="Microsoft.NET.Sdk.Razor.StaticWebAssets.5_0.targets" Condition="'$(UseStaticWebAssetsV2)' != 'true' And '$(StaticWebAssetsEnabled)' == 'true' And '$(IsCrossTargetingBuild)' != 'true'" />
<Import Project="Microsoft.NET.Sdk.Razor.StaticWebAssets.targets" Condition="'$(UseStaticWebAssetsV2)' == 'true' And '$(StaticWebAssetsEnabled)' == 'true' And '$(IsCrossTargetingBuild)' != 'true'" />

<!-- These targets are only included on multi targeting builds and will be imported even if static web assets are disabled. Even though the file is imported,
the targets inside will no-op as all their work depends on nested MSBuild calls to the project where static web assets will not be enabled.
-->
<Import Project="Microsoft.NET.Sdk.Razor.StaticWebAssets.Pack.CrossTargeting.targets" Condition="'$(IsCrossTargetingBuild)' == 'true'" />

<Import Project="Microsoft.NET.Sdk.Razor.ScopedCss.5_0.targets" Condition="'$(UseStaticWebAssetsV2)' != 'true' And '$(ScopedCssEnabled)' == 'true'" />
<Import Project="Microsoft.NET.Sdk.Razor.ScopedCss.targets" Condition="'$(UseStaticWebAssetsV2)' == 'true' And '$(ScopedCssEnabled)' == 'true'" />

<Import Project="Microsoft.NET.Sdk.Razor.JSModules.targets" Condition="'$(JSModulesEnabled)' == 'true'" />

<Import Project="Microsoft.NET.Sdk.Razor.GenerateAssemblyInfo.targets" />

<Import Project="Microsoft.NET.Sdk.Razor.MvcApplicationPartsDiscovery.targets" Condition="'$(_TargetingNETCoreApp30OrLater)' == 'true'" />
Expand Down
9 changes: 9 additions & 0 deletions src/StaticWebAssetsSdk/.editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# C# files
[*.cs]

#### Core EditorConfig Options ####

# var preferences
csharp_style_var_elsewhere = true
csharp_style_var_for_built_in_types = true
csharp_style_var_when_type_is_apparent = true
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<!--
***********************************************************************************************
Sdk.Razor.StaticAssets.ProjectSystem.props
Sdk.StaticWebAssets.StaticAssets.ProjectSystem.props

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
Expand Down
25 changes: 25 additions & 0 deletions src/StaticWebAssetsSdk/Sdk/Sdk.props
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<!--
***********************************************************************************************
Sdk.props

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) .NET Foundation. All rights reserved.
***********************************************************************************************
-->
<Project ToolsVersion="14.0">
<PropertyGroup>
<!-- Determines if the StaticWebAssets Sdk is responsible for importing Microsoft.NET.Sdk. Microsoft.NET.Sdk.Web may have previously imported this. -->
<_StaticWebAssetsSdkImportsMicrosoftNetSdk Condition="'$(UsingMicrosoftNETSdk)' != 'true'">true</_StaticWebAssetsSdkImportsMicrosoftNetSdk>
</PropertyGroup>

<Import Sdk="Microsoft.NET.Sdk" Project="Sdk.props" Condition="'$(_StaticWebAssetsSdkImportsMicrosoftNetSdk)' == 'true'" />

<PropertyGroup>
<StaticWebAssetsSdkCurrentVersionProps Condition="'$(StaticWebAssetsSdkCurrentVersionProps)' == ''">$(MSBuildThisFileDirectory)..\targets\Sdk.StaticWebAssets.CurrentVersion.props</StaticWebAssetsSdkCurrentVersionProps>
</PropertyGroup>

<Import Project="$(StaticWebAssetsSdkCurrentVersionProps)" />
</Project>
22 changes: 22 additions & 0 deletions src/StaticWebAssetsSdk/Sdk/Sdk.targets
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<!--
***********************************************************************************************
Sdk.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) .NET Foundation. All rights reserved.
***********************************************************************************************
-->
<Project ToolsVersion="14.0">

<Import Sdk="Microsoft.NET.Sdk" Project="Sdk.targets" Condition="'$(_StaticWebAssetsSdkImportsMicrosoftNetSdk)' == 'true'" />

<PropertyGroup Condition="'$(StaticWebAssetsSdkCurrentVersionTargets)' == ''">
<StaticWebAssetsSdkCurrentVersionTargets>$(MSBuildThisFileDirectory)..\targets\Sdk.StaticWebAssets.CurrentVersion.targets</StaticWebAssetsSdkCurrentVersionTargets>
</PropertyGroup>

<Import Project="$(StaticWebAssetsSdkCurrentVersionTargets)" />

</Project>
Loading