Skip to content
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
17 changes: 5 additions & 12 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,6 @@
name: Continuous Integration

on:
push:
branches:
- "**"

tags-ignore:
- "**"

pull_request:
types: [opened, synchronize, edited]

Expand All @@ -21,13 +14,13 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: Setup MSBuild
uses: microsoft/setup-msbuild@v1.0.2
- name: Setup .NET SDK
uses: actions/setup-dotnet@v4

- name: Build
run: msbuild /t:Rebuild /Restore /v:Minimal
run: dotnet build

- name: Test
run: msbuild tests/ProjectFilter.UnitTests /t:Test /v:Minimal
run: dotnet test tests/ProjectFilter.UnitTests
6 changes: 5 additions & 1 deletion Directory.Build.props
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
<Project>

<PropertyGroup>
<LangVersion>10</LangVersion>
<Version>2.5.0</Version>
<TargetFramework>net48</TargetFramework>
<Nullable>enable</Nullable>
<LangVersion>10.0</LangVersion>
<AnalysisMode>AllEnabledByDefault</AnalysisMode>
</PropertyGroup>

</Project>
1 change: 1 addition & 0 deletions ProjectFilter.sln
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = ".solution", ".solution", "{
.editorconfig = .editorconfig
CHANGELOG.md = CHANGELOG.md
Directory.Build.props = Directory.Build.props
global.json = global.json
nuget.config = nuget.config
README.md = README.md
EndProjectSection
Expand Down
5 changes: 5 additions & 0 deletions global.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"sdk": {
"version": "9.0.200"
}
}
52 changes: 9 additions & 43 deletions source/ProjectFilter/ProjectFilter.csproj
Original file line number Diff line number Diff line change
@@ -1,18 +1,12 @@
<Project>

<Import Sdk="Microsoft.NET.Sdk.WindowsDesktop" Project="Sdk.props" />
<Project Sdk="Microsoft.NET.Sdk.WindowsDesktop">

<PropertyGroup>
<TargetFramework>net48</TargetFramework>
<RootNamespace>ProjectFilter</RootNamespace>
<UseWPF>true</UseWPF>
<Nullable>enable</Nullable>
<LangVersion>10.0</LangVersion>
<AnalysisMode>AllEnabledByDefault</AnalysisMode>
<CustomAfterMicrosoftCSharpTargets Condition="$(VsSDKInstall) != ''">$(VsSDKInstall)\Microsoft.VsSDK.targets</CustomAfterMicrosoftCSharpTargets>
</PropertyGroup>

<PropertyGroup>
<Version>2.5.0</Version>
<RootNamespace>ProjectFilter</RootNamespace>
<UseWPF>true</UseWPF>
</PropertyGroup>

<PropertyGroup>
Expand Down Expand Up @@ -86,15 +80,15 @@
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Community.VisualStudio.Toolkit.17" Version="17.0.507" />
<PackageReference Include="Microsoft.CodeAnalysis.NetAnalyzers" Version="8.0.0">
<PackageReference Include="Community.VisualStudio.Toolkit.17" Version="17.0.527" />
<PackageReference Include="Microsoft.CodeAnalysis.NetAnalyzers" Version="9.0.0">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Microsoft.VisualStudio.SDK" Version="17.0.32112.339" ExcludeAssets="runtime">
<IncludeAssets>compile; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Microsoft.VSSDK.BuildTools" Version="17.3.2094">
<PackageReference Include="Microsoft.VSSDK.BuildTools" Version="17.13.2126">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
Expand All @@ -108,33 +102,8 @@
<Reference Include="WindowsBase" />
</ItemGroup>

<PropertyGroup>
<!--
Configure the `PostBuildEvent` target to always run. This gives us a
target that we can restore the manifest file in, even if the build fails.
-->
<RunPostBuildEvent>Always</RunPostBuildEvent>
</PropertyGroup>

<Target Name="SetVsixVersion" BeforeTargets="BeforeBuild">
<!--
We only want to change the version number during
the build, so backup the manifest file first.
-->
<PropertyGroup>
<VsixManifestOriginal>source.extension.vsixmanifest</VsixManifestOriginal>
<VsixManifestBackup>$(IntermediateOutputPath)$(VsixManifestOriginal).backup</VsixManifestBackup>
</PropertyGroup>

<Copy SourceFiles="$(VsixManifestOriginal)" DestinationFiles="$(VsixManifestBackup)" />
<XmlPoke XmlInputPath="source.extension.vsixmanifest" Query="/x:PackageManifest/x:Metadata/x:Identity/@Version" Value="$(Version)" Namespaces="&lt;Namespace Prefix='x' Uri='http://schemas.microsoft.com/developer/vsx-schema/2011' /&gt;" />
</Target>

<Target Name="RestoreVsixVersion" AfterTargets="PostBuildEvent">
<!-- Restore the backup of the manifest file. -->
<Move SourceFiles="$(VsixManifestBackup)" DestinationFiles="$(VsixManifestOriginal)" />
</Target>

<Target Name="VsixVersion" Returns="$(Version)" />

<!-- Workaround for https://github.com/dotnet/wpf/issues/6792 -->
<Target Name="RemoveDuplicateAnalyzers" BeforeTargets="CoreCompile">
<ItemGroup>
Expand All @@ -144,7 +113,4 @@
</ItemGroup>
</Target>

<Import Sdk="Microsoft.NET.Sdk" Project="Sdk.targets" />
<Import Project="$(VSToolsPath)\VSSDK\Microsoft.VsSDK.targets" Condition="Exists('$(VSToolsPath)\VSSDK\Microsoft.VsSDK.targets')" />

</Project>
2 changes: 1 addition & 1 deletion source/ProjectFilter/source.extension.vsixmanifest
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<PackageManifest Version="2.0.0" xmlns="http://schemas.microsoft.com/developer/vsx-schema/2011" xmlns:d="http://schemas.microsoft.com/developer/vsx-schema-design/2011">
<Metadata>
<Identity Id="ProjectFilter.76800882-6e41-4df7-9db4-1945655b2620" Version="1.0" Language="en-US" Publisher="reduckted" />
<Identity Id="ProjectFilter.76800882-6e41-4df7-9db4-1945655b2620" Version="|%CurrentProject%;VsixVersion|" Language="en-US" Publisher="reduckted" />
<DisplayName>Project Filter</DisplayName>
<Description xml:space="preserve">Quickly load and unload projects.</Description>
<MoreInfo>https://github.com/reduckted/ProjectFilter</MoreInfo>
Expand Down
18 changes: 3 additions & 15 deletions tests/ProjectFilter.UnitTests/ProjectFilter.UnitTests.csproj
Original file line number Diff line number Diff line change
@@ -1,17 +1,13 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net48</TargetFramework>
<RootNamespace>ProjectFilter</RootNamespace>
<IsPackable>false</IsPackable>
<Nullable>enable</Nullable>
<LangVersion>10.0</LangVersion>
<AnalysisMode>AllEnabledByDefault</AnalysisMode>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Community.VisualStudio.Toolkit.17" Version="17.0.507" />
<PackageReference Include="Microsoft.CodeAnalysis.NetAnalyzers" Version="8.0.0">
<PackageReference Include="Community.VisualStudio.Toolkit.17" Version="17.0.527" />
<PackageReference Include="Microsoft.CodeAnalysis.NetAnalyzers" Version="9.0.0">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
Expand All @@ -21,10 +17,6 @@
<PackageReference Include="Microsoft.VisualStudio.Sdk.TestFramework.Xunit" Version="17.2.7" />
<PackageReference Include="NSubstitute" Version="5.1.0" />
<PackageReference Include="xunit" Version="2.6.3" />
<PackageReference Include="xunit.runner.msbuild" Version="2.6.3">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="xunit.runner.visualstudio" Version="2.5.5">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
Expand All @@ -40,8 +32,4 @@
<Reference Include="System.Xaml" />
</ItemGroup>

<Target Name="Test">
<xunit Assemblies="$(TargetPath)" />
</Target>

</Project>