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

Add Remora.Sdk.Web and Remora.Sdk.Razor #20

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
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
27 changes: 27 additions & 0 deletions Remora.Sdk.Razor/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# Remora.Sdk.Razor

This SDK provides an extension to Remora.Sdk wherein the underlying extended framework is `Microsoft.NET.Sdk.Razor`.

All general `Remora.Sdk` properties and requirements apply. For instance, `LegalAuthor` and `LegalEmail` still need to
be defined.

For more information, refer to the [Remora.Sdk Readme](../Remora.Sdk/Readme.md).

## Usage

```xml
<Project Sdk="Remora.Sdk.Razor/1.0.0">
<PropertyGroup>
<LegalAuthor>John Doe</LegalAuthor>
<LegalEmail>[email protected]</LegalEmail>
</PropertyGroup>
</Project>
```

## Remora.Sdk.Web Properties

No additional properties have been added at this time.

## Microsoft.NET.Sdk.Razor Properties

All properties added with the inclusion of `Microsoft.NET.Sdk.Razor` are available for use in projects with this type.
18 changes: 18 additions & 0 deletions Remora.Sdk.Razor/Remora.Sdk.Razor.msbuildproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<Project Sdk="Microsoft.Build.NoTargets/3.5.6">
<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
<NoWarn>NU5128</NoWarn>
</PropertyGroup>
<PropertyGroup>
<Title>Remora.Web.Razor</Title>
<Description>Provides default properties and targets for remora-style Razor projects</Description>
<VersionPrefix>1.0.0</VersionPrefix>
<PackageReleaseNotes>Initial Release</PackageReleaseNotes>
<IsPackable>true</IsPackable>
<PackageTags>MSBuild;MSBuildSdk;Remora;Web;ASP.NET Core;Razor</PackageTags>
<PackageType>MSBuildSdk</PackageType>
</PropertyGroup>
<ItemGroup>
<Folder Include="Sdk\" />
</ItemGroup>
</Project>
10 changes: 10 additions & 0 deletions Remora.Sdk.Razor/Sdk/Sdk.Packages.props
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<Project>

<!--
Centrally managed versions for the default SDK packages - remember to update the direct references in
Sdk.targets, too
-->
<ItemGroup>
</ItemGroup>

</Project>
25 changes: 25 additions & 0 deletions Remora.Sdk.Razor/Sdk/Sdk.props
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<Project>
<!-- Defaults for centrally managed package versions -->
<Import Project="Sdk.Packages.props"/>

<!-- Override Remora.Sdk to skip importing Microsoft.NET.Sdk-->
<PropertyGroup>
<UsingMicrosoftNETSdk>true</UsingMicrosoftNETSdk>
<RemoraSdkImportsMicrosoftSdk>false</RemoraSdkImportsMicrosoftSdk>
</PropertyGroup>

<PropertyGroup Condition="'$(UsingMicrosoftNETSdkWeb)' != 'true'">
<RemoraSdkRazorImportsMicrosoftSdkRazor>true</RemoraSdkRazorImportsMicrosoftSdkRazor>
</PropertyGroup>

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

<Import Project="Sdk.props" Sdk="Remora.Sdk" Version="3.1.2" Condition="'$(_RemoraInSourceBuild)' != 'true'"/>
<Import Project="../../Remora.Sdk/Sdk/Sdk.props" Condition="'$(_RemoraInSourceBuild)' == 'true'"/>

<!-- Override target frameworks -->
<PropertyGroup>
<TargetNetStandard>false</TargetNetStandard>
</PropertyGroup>

</Project>
35 changes: 35 additions & 0 deletions Remora.Sdk.Razor/Sdk/Sdk.targets
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
<Project>
<!-- Override packability -->
<PropertyGroup Condition="'$(OutputType)' == 'Exe'">
<IsPackable>false</IsPackable>
</PropertyGroup>

<TargetFrameworkVersion>$([MSBuild]::GetTargetFrameworkIdentifier($TargetFramework))</TargetFrameworkVersion>
<PropertyGroup>
<IsNET>$(TargetFrameworkVersion) == '.NETCoreApp'</IsNET>
<IsNETCore>$(TargetFrameworkVersion) == '.NETCoreApp'</IsNETCore>
<IsNETStandard>$(TargetFrameworkVersion) == '.NETStandard'</IsNETStandard>
<IsNETFramework>$(TargetFrameworkVersion) == '.NETFramework'</IsNETFramework>
<IsRunnableTarget>$(TargetFrameworkVersion) != '.NETStandard'</IsRunnableTarget>
</PropertyGroup>

<!-- Default Packages-->
<Choose>
<When Condition="'$(ManagePackageVersionsCentrally)' == true">
<ItemGroup>
<!-- TODO: Include any default package references. -->
</ItemGroup>
</When>
<Otherwise>
<ItemGroup>
<!-- TODO: Include any default package references.-->
</ItemGroup>
</Otherwise>
</Choose>

<!-- Import last to respect set properties. -->
<Import Project="Sdk.targets" Sdk="Remora.Sdk" Version="3.1.2" Condition="'$(_RemoraInSourceBuild)' != 'true'"/>
<Import Project="../../Remora.Sdk/Sdk/Sdk.targets" Condition="'$(_RemoraInSourceBuild)' == 'true'"/>

<Import Project="Sdk.targets" Sdk="Microsoft.NET.Sdk.Razor" Condition="'$(RemoraSdkRazorImportsMicrosoftSdkRazor)' == 'true'"/>
</Project>
27 changes: 27 additions & 0 deletions Remora.Sdk.Web/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# Remora.Sdk.Web

This SDK provides an extension to Remora.Sdk wherein the underlying extended framework is `Microsoft.NET.Sdk.Web`.

All general `Remora.Sdk` properties and requirements apply. For instance, `LegalAuthor` and `LegalEmail` still need to
be defined.

For more information, refer to the [Remora.Sdk Readme](../Remora.Sdk/Readme.md).

## Usage

```xml
<Project Sdk="Remora.Sdk.Web/1.0.0">
<PropertyGroup>
<LegalAuthor>John Doe</LegalAuthor>
<LegalEmail>[email protected]</LegalEmail>
</PropertyGroup>
</Project>
```

## Remora.Sdk.Web Properties

No additional properties have been added at this time.

## Microsoft.NET.Sdk.Web Properties

All properties added with the inclusion of `Microsoft.NET.Sdk.Web` are available for use in projects with this type.
18 changes: 18 additions & 0 deletions Remora.Sdk.Web/Remora.Sdk.Web.msbuildproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<Project Sdk="Microsoft.Build.NoTargets/3.5.6">
<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
<NoWarn>NU5128</NoWarn>
</PropertyGroup>
<PropertyGroup>
<Title>Remora.Web.Sdk</Title>
<Description>Provides default properties and targets for remora-style web projects</Description>
<VersionPrefix>1.0.0</VersionPrefix>
<PackageReleaseNotes>Initial Release</PackageReleaseNotes>
<IsPackable>true</IsPackable>
<PackageTags>MSBuild;MSBuildSdk;Remora;Web;ASP.NET Core;</PackageTags>
<PackageType>MSBuildSdk</PackageType>
</PropertyGroup>
<ItemGroup>
<Folder Include="Sdk\" />
</ItemGroup>
</Project>
10 changes: 10 additions & 0 deletions Remora.Sdk.Web/Sdk/Sdk.Packages.props
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<Project>

<!--
Centrally managed versions for the default SDK packages - remember to update the direct references in
Sdk.targets, too
-->
<ItemGroup>
</ItemGroup>

</Project>
25 changes: 25 additions & 0 deletions Remora.Sdk.Web/Sdk/Sdk.props
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<Project>
<!-- Defaults for centrally managed package versions -->
<Import Project="Sdk.Packages.props"/>

<!-- Override Remora.Sdk to skip importing Microsoft.NET.Sdk-->
<PropertyGroup>
<UsingMicrosoftNETSdk>true</UsingMicrosoftNETSdk>
<RemoraSdkImportsMicrosoftSdk>false</RemoraSdkImportsMicrosoftSdk>
</PropertyGroup>

<PropertyGroup Condition="'$(UsingMicrosoftNETSdkWeb)' != 'true'">
<RemoraSdkWebImportsMicrosoftSdkWeb>true</RemoraSdkWebImportsMicrosoftSdkWeb>
</PropertyGroup>

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

<Import Project="Sdk.props" Sdk="Remora.Sdk" Version="3.1.2" Condition="'$(_RemoraInSourceBuild)' != 'true'"/>
<Import Project="../../Remora.Sdk/Sdk/Sdk.props" Condition="'$(_RemoraInSourceBuild)' == 'true'"/>

<!-- Override target frameworks -->
<PropertyGroup>
<TargetNetStandard>false</TargetNetStandard>
</PropertyGroup>

</Project>
35 changes: 35 additions & 0 deletions Remora.Sdk.Web/Sdk/Sdk.targets
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
<Project>
<!-- Override packability -->
<PropertyGroup Condition="'$(OutputType)' == 'Exe'">
<IsPackable>false</IsPackable>
</PropertyGroup>

<TargetFrameworkVersion>$([MSBuild]::GetTargetFrameworkIdentifier($TargetFramework))</TargetFrameworkVersion>
<PropertyGroup>
<IsNET>$(TargetFrameworkVersion) == '.NETCoreApp'</IsNET>
<IsNETCore>$(TargetFrameworkVersion) == '.NETCoreApp'</IsNETCore>
<IsNETStandard>$(TargetFrameworkVersion) == '.NETStandard'</IsNETStandard>
<IsNETFramework>$(TargetFrameworkVersion) == '.NETFramework'</IsNETFramework>
<IsRunnableTarget>$(TargetFrameworkVersion) != '.NETStandard'</IsRunnableTarget>
</PropertyGroup>

<!-- Default Packages-->
<Choose>
<When Condition="'$(ManagePackageVersionsCentrally)' == true">
<ItemGroup>
<!-- TODO: Include any default package references. -->
</ItemGroup>
</When>
<Otherwise>
<ItemGroup>
<!-- TODO: Include any default package references.-->
</ItemGroup>
</Otherwise>
</Choose>

<!-- Import last to respect set properties. -->
<Import Project="Sdk.targets" Sdk="Remora.Sdk" Version="3.1.2" Condition="'$(_RemoraInSourceBuild)' != 'true'"/>
<Import Project="../../Remora.Sdk/Sdk/Sdk.targets" Condition="'$(_RemoraInSourceBuild)' == 'true'"/>

<Import Project="Sdk.targets" Sdk="Microsoft.NET.Sdk.Web" Condition="'$(RemoraSdkWebImportsMicrosoftSdkWeb)' == 'true'"/>
</Project>
12 changes: 12 additions & 0 deletions Remora.Sdk.sln
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,10 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CentrallyManagedPackageVers
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NetFrameworkTestProject", "Tests\NetFrameworkTestProject\NetFrameworkTestProject.csproj", "{9A20B528-1711-4B2A-B6F1-BD3DD235B38C}"
EndProject
Project("{13B669BE-BB05-4DDF-9536-439F39A36129}") = "Remora.Sdk.Web", "Remora.Sdk.Web\Remora.Sdk.Web.msbuildproj", "{AC9B5643-7E81-42C8-B704-DC2E23BFD153}"
EndProject
Project("{13B669BE-BB05-4DDF-9536-439F39A36129}") = "Remora.Sdk.Razor", "Remora.Sdk.Razor\Remora.Sdk.Razor.msbuildproj", "{858B0602-7DDC-4060-A023-34A50AC6D20D}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand Down Expand Up @@ -78,6 +82,14 @@ Global
{9A20B528-1711-4B2A-B6F1-BD3DD235B38C}.Debug|Any CPU.Build.0 = Debug|Any CPU
{9A20B528-1711-4B2A-B6F1-BD3DD235B38C}.Release|Any CPU.ActiveCfg = Release|Any CPU
{9A20B528-1711-4B2A-B6F1-BD3DD235B38C}.Release|Any CPU.Build.0 = Release|Any CPU
{AC9B5643-7E81-42C8-B704-DC2E23BFD153}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{AC9B5643-7E81-42C8-B704-DC2E23BFD153}.Debug|Any CPU.Build.0 = Debug|Any CPU
{AC9B5643-7E81-42C8-B704-DC2E23BFD153}.Release|Any CPU.ActiveCfg = Release|Any CPU
{AC9B5643-7E81-42C8-B704-DC2E23BFD153}.Release|Any CPU.Build.0 = Release|Any CPU
{858B0602-7DDC-4060-A023-34A50AC6D20D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{858B0602-7DDC-4060-A023-34A50AC6D20D}.Debug|Any CPU.Build.0 = Debug|Any CPU
{858B0602-7DDC-4060-A023-34A50AC6D20D}.Release|Any CPU.ActiveCfg = Release|Any CPU
{858B0602-7DDC-4060-A023-34A50AC6D20D}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand Down
Loading