|
1 | | -<Project> |
2 | | - |
3 | | - <Import Sdk="Microsoft.NET.Sdk.WindowsDesktop" Project="Sdk.props" /> |
| 1 | +<Project Sdk="Microsoft.NET.Sdk.WindowsDesktop"> |
4 | 2 |
|
5 | 3 | <PropertyGroup> |
6 | | - <TargetFramework>net48</TargetFramework> |
7 | | - <RootNamespace>ProjectFilter</RootNamespace> |
8 | | - <UseWPF>true</UseWPF> |
9 | | - <Nullable>enable</Nullable> |
10 | | - <LangVersion>10.0</LangVersion> |
11 | | - <AnalysisMode>AllEnabledByDefault</AnalysisMode> |
| 4 | + <CustomAfterMicrosoftCSharpTargets Condition="$(VsSDKInstall) != ''">$(VsSDKInstall)\Microsoft.VsSDK.targets</CustomAfterMicrosoftCSharpTargets> |
12 | 5 | </PropertyGroup> |
13 | 6 |
|
14 | 7 | <PropertyGroup> |
15 | | - <Version>2.5.0</Version> |
| 8 | + <RootNamespace>ProjectFilter</RootNamespace> |
| 9 | + <UseWPF>true</UseWPF> |
16 | 10 | </PropertyGroup> |
17 | 11 |
|
18 | 12 | <PropertyGroup> |
|
86 | 80 | <PrivateAssets>all</PrivateAssets> |
87 | 81 | <IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets> |
88 | 82 | </PackageReference> |
89 | | - <PackageReference Include="Community.VisualStudio.Toolkit.17" Version="17.0.507" /> |
90 | | - <PackageReference Include="Microsoft.CodeAnalysis.NetAnalyzers" Version="8.0.0"> |
| 83 | + <PackageReference Include="Community.VisualStudio.Toolkit.17" Version="17.0.527" /> |
| 84 | + <PackageReference Include="Microsoft.CodeAnalysis.NetAnalyzers" Version="9.0.0"> |
91 | 85 | <PrivateAssets>all</PrivateAssets> |
92 | 86 | <IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets> |
93 | 87 | </PackageReference> |
94 | 88 | <PackageReference Include="Microsoft.VisualStudio.SDK" Version="17.0.32112.339" ExcludeAssets="runtime"> |
95 | 89 | <IncludeAssets>compile; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets> |
96 | 90 | </PackageReference> |
97 | | - <PackageReference Include="Microsoft.VSSDK.BuildTools" Version="17.3.2094"> |
| 91 | + <PackageReference Include="Microsoft.VSSDK.BuildTools" Version="17.13.2126"> |
98 | 92 | <PrivateAssets>all</PrivateAssets> |
99 | 93 | <IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets> |
100 | 94 | </PackageReference> |
|
108 | 102 | <Reference Include="WindowsBase" /> |
109 | 103 | </ItemGroup> |
110 | 104 |
|
111 | | - <PropertyGroup> |
112 | | - <!-- |
113 | | - Configure the `PostBuildEvent` target to always run. This gives us a |
114 | | - target that we can restore the manifest file in, even if the build fails. |
115 | | - --> |
116 | | - <RunPostBuildEvent>Always</RunPostBuildEvent> |
117 | | - </PropertyGroup> |
118 | | - |
119 | | - <Target Name="SetVsixVersion" BeforeTargets="BeforeBuild"> |
120 | | - <!-- |
121 | | - We only want to change the version number during |
122 | | - the build, so backup the manifest file first. |
123 | | - --> |
124 | | - <PropertyGroup> |
125 | | - <VsixManifestOriginal>source.extension.vsixmanifest</VsixManifestOriginal> |
126 | | - <VsixManifestBackup>$(IntermediateOutputPath)$(VsixManifestOriginal).backup</VsixManifestBackup> |
127 | | - </PropertyGroup> |
128 | | - |
129 | | - <Copy SourceFiles="$(VsixManifestOriginal)" DestinationFiles="$(VsixManifestBackup)" /> |
130 | | - <XmlPoke XmlInputPath="source.extension.vsixmanifest" Query="/x:PackageManifest/x:Metadata/x:Identity/@Version" Value="$(Version)" Namespaces="<Namespace Prefix='x' Uri='http://schemas.microsoft.com/developer/vsx-schema/2011' />" /> |
131 | | - </Target> |
132 | | - |
133 | | - <Target Name="RestoreVsixVersion" AfterTargets="PostBuildEvent"> |
134 | | - <!-- Restore the backup of the manifest file. --> |
135 | | - <Move SourceFiles="$(VsixManifestBackup)" DestinationFiles="$(VsixManifestOriginal)" /> |
136 | | - </Target> |
137 | | - |
| 105 | + <Target Name="VsixVersion" Returns="$(Version)" /> |
| 106 | + |
138 | 107 | <!-- Workaround for https://github.com/dotnet/wpf/issues/6792 --> |
139 | 108 | <Target Name="RemoveDuplicateAnalyzers" BeforeTargets="CoreCompile"> |
140 | 109 | <ItemGroup> |
|
144 | 113 | </ItemGroup> |
145 | 114 | </Target> |
146 | 115 |
|
147 | | - <Import Sdk="Microsoft.NET.Sdk" Project="Sdk.targets" /> |
148 | | - <Import Project="$(VSToolsPath)\VSSDK\Microsoft.VsSDK.targets" Condition="Exists('$(VSToolsPath)\VSSDK\Microsoft.VsSDK.targets')" /> |
149 | | - |
150 | 116 | </Project> |
0 commit comments