Skip to content

Commit

Permalink
GitHubSync update
Browse files Browse the repository at this point in the history
  • Loading branch information
GeertvanHorrik committed Nov 16, 2022
1 parent 6262216 commit 3c82a5b
Show file tree
Hide file tree
Showing 6 changed files with 89 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/dependabot-auto-merge.yml
Expand Up @@ -11,7 +11,7 @@ jobs:
steps:
- name: Dependabot metadata
id: dependabot-metadata
uses: dependabot/fetch-metadata@v1.3.4
uses: dependabot/fetch-metadata@v1.3.5
with:
github-token: "${{ secrets.GITHUB_TOKEN }}"
- name: Approve Dependabot PR
Expand Down
2 changes: 1 addition & 1 deletion deployment/cake/generic-variables.cake
@@ -1,6 +1,6 @@
#l "buildserver.cake"

#tool "nuget:?package=GitVersion.CommandLine&version=5.10.3"
#tool "nuget:?package=GitVersion.CommandLine&version=5.11.1"

//-------------------------------------------------------------

Expand Down
2 changes: 1 addition & 1 deletion deployment/cake/tests-nunit.cake
@@ -1,4 +1,4 @@
#tool "nuget:?package=NUnit.ConsoleRunner&version=3.15.2"
#tool "nuget:?package=NUnit.ConsoleRunner&version=3.16.0"

//-------------------------------------------------------------

Expand Down
25 changes: 25 additions & 0 deletions src/Directory.Build.shared.explicit.props
Expand Up @@ -129,6 +129,7 @@
<Resource Include="Resources\Images\**\*.gif" />
<Resource Include="Resources\Images\**\*.jpg" />
<Resource Include="Resources\Images\**\*.jpeg" />
<Resource Include="Resources\Lottie\**\*.json" />
<Resource Include="Resources\Videos\**\*.mp4" />
<Resource Include="Resources\Videos\**\*.wav" />
<EmbeddedResource Include="Resources\ThirdPartyNotices\**\*" />
Expand Down Expand Up @@ -203,6 +204,30 @@
<Page Include="Platforms\net\**\*.xaml" SubType="Designer" Generator="MSBuild:Compile" />
<Compile Update="Platforms\net\**\*.xaml.cs" SubType="Code" DependentUpon="%(Filename)" />
</ItemGroup>

<!-- .NET 7.0 -->
<PropertyGroup Condition=" $(TargetFramework.StartsWith('net7.0')) ">
<DefineConstants>$(DefineConstants);NETCORE;NETCORE7;NETCORE7_0;NET7;NET7_0</DefineConstants>
</PropertyGroup>

<ItemGroup Condition=" $(TargetFramework.StartsWith('net7.0')) ">
<None Remove="Platforms\net\**\*.cs;Platforms\net\**\*.xaml;Platforms\net\**\*.xaml.cs" />
<Compile Include="Platforms\net\**\*.cs" DependentUpon="%(Filename)" />
<Page Include="Platforms\net\**\*.xaml" SubType="Designer" Generator="MSBuild:Compile" />
<Compile Update="Platforms\net\**\*.xaml.cs" SubType="Code" DependentUpon="%(Filename)" />
</ItemGroup>

<!-- .NET 8.0 -->
<PropertyGroup Condition=" $(TargetFramework.StartsWith('net8.0')) ">
<DefineConstants>$(DefineConstants);NETCORE;NETCORE8;NETCORE8_0;NET8;NET8_0</DefineConstants>
</PropertyGroup>

<ItemGroup Condition=" $(TargetFramework.StartsWith('net8.0')) ">
<None Remove="Platforms\net\**\*.cs;Platforms\net\**\*.xaml;Platforms\net\**\*.xaml.cs" />
<Compile Include="Platforms\net\**\*.cs" DependentUpon="%(Filename)" />
<Page Include="Platforms\net\**\*.xaml" SubType="Designer" Generator="MSBuild:Compile" />
<Compile Update="Platforms\net\**\*.xaml.cs" SubType="Code" DependentUpon="%(Filename)" />
</ItemGroup>

<!-- .NET Standard 2.0 -->
<PropertyGroup Condition=" '$(TargetFramework)' == 'netstandard2.0' ">
Expand Down
62 changes: 61 additions & 1 deletion src/Directory.Build.shared.xamltools.props
Expand Up @@ -4,10 +4,70 @@
<PackageReference Include="XAMLTools.MSBuild" Version="1.0.0-alpha0085" PrivateAssets="all" />
</ItemGroup>

<!-- Note: to disable XAML tools during debug and development, use the following csproj:
<PropertyGroup>
<XamlToolsDisableInDebugMode>true</XamlToolsDisableInDebugMode>
</PropertyGroup>
In order to make Resharper work properly add Extra condtions to your ItemGroup with XAMLCombineItems,
as in exmaple below:
<ItemGroup Condition="'$(Configuration)' != 'Debug' Or '$(XamlToolsDisableInDebugMode)' != 'true'">
<XAMLCombineItems Include="Themes\Styles.xaml">
<TargetFile>Themes\Generic.generated.xaml</TargetFile>
<Visible>True</Visible>
</XAMLCombineItems>
...
</ItemGroup>
-->

<ItemGroup>
<Page Remove="Themes\Generic.XamlTools.Disabled.xaml" />
<None Include="Themes\Generic.XamlTools.Disabled.xaml" />

<Page Remove="Themes\Generic.XamlTools.Enabled.xaml" />
<None Include="Themes\Generic.XamlTools.Enabled.xaml" />
</ItemGroup>

<PropertyGroup>
<XamlToolsDisable>false</XamlToolsDisable>
</PropertyGroup>

<PropertyGroup Condition="'$(Configuration)' == 'Debug' And '$(XamlToolsDisableInDebugMode)' == 'true'">
<XamlToolsDisable>true</XamlToolsDisable>
</PropertyGroup>

<!-- Generic shared properties -->
<PropertyGroup>
<XAMLColorSchemeGeneratorEnabled>False</XAMLColorSchemeGeneratorEnabled>
<XAMLCombineEnabled>True</XAMLCombineEnabled>
<XAMLCombineImportMergedResourceDictionaryReferences>False</XAMLCombineImportMergedResourceDictionaryReferences>
<RemoveXAMLCombineItemsFromPages>False</RemoveXAMLCombineItemsFromPages>
</PropertyGroup>

<PropertyGroup>
<!-- Enable by default -->
<XAMLCombineEnabled>True</XAMLCombineEnabled>
</PropertyGroup>

<!--Allow disabling XAML tools during debug mode-->
<PropertyGroup Condition="'$(XamlToolsDisable)' == 'true'">
<XAMLCombineEnabled>False</XAMLCombineEnabled>
</PropertyGroup>

<ItemGroup Condition="'$(XamlToolsDisable)' == 'true'">
<Page Remove="Themes\Generic.generated.xaml" />
<None Include="Themes\Generic.generated.xaml" />
</ItemGroup>

<!--Copy correct file based on whether it's enabled or not-->
<Target Name="PreBuildXamlToolsDisabled" AfterTargets="PreBuildEvent"
Condition="'$(XamlToolsDisable)' == 'true'">
<Exec Command="xcopy /f /y &quot;$(ProjectDir)Themes\Generic.XamlTools.Disabled.xaml&quot; &quot;$(ProjectDir)Themes\Generic.xaml&quot;" />
</Target>

<Target Name="PreBuildXamlToolsEnabled" AfterTargets="PreBuildEvent"
Condition="'$(XamlToolsDisable)' != 'true'">
<Exec Command="xcopy /f /y &quot;$(ProjectDir)Themes\Generic.XamlTools.Enabled.xaml&quot; &quot;$(ProjectDir)Themes\Generic.xaml&quot;" />
</Target>
</Project>
2 changes: 0 additions & 2 deletions src/MethodTimeLogger.cs
Expand Up @@ -8,7 +8,6 @@
/// </summary>
internal static class MethodTimeLogger
{
#region Methods
public static void Log(MethodBase methodBase, long milliseconds, string message)
{
Log(methodBase.DeclaringType ?? typeof(object), methodBase.Name, milliseconds, message);
Expand Down Expand Up @@ -37,5 +36,4 @@ public static void Log(Type type, string methodName, long milliseconds, string m
// var logger = LogManager.GetLogger(type);
// logger.Debug(finalMessage);
}
#endregion
}

0 comments on commit 3c82a5b

Please sign in to comment.