|
1 | | -<?xml version="1.0" encoding="utf-8"?> |
2 | | -<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> |
| 1 | +<Project> |
| 2 | + <Import Sdk="Microsoft.NET.Sdk" Project="Sdk.props" /> |
| 3 | + |
3 | 4 | <PropertyGroup> |
4 | | - <MinimumVisualStudioVersion>15.0</MinimumVisualStudioVersion> |
5 | | - <VSToolsPath Condition="'$(VSToolsPath)' == ''">$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)</VSToolsPath> |
6 | | - </PropertyGroup> |
7 | | - <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" |
8 | | - Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" /> |
9 | | - <PropertyGroup> |
10 | | - <Configuration Condition="'$(Configuration)' == ''">Debug</Configuration> |
11 | | - <Platform Condition="'$(Platform)' == ''">AnyCPU</Platform> |
12 | | - <PlatformTarget>AnyCPU</PlatformTarget> |
13 | | - <SchemaVersion>2.0</SchemaVersion> |
14 | | - <ProjectTypeGuids>{82b43b9b-a64c-4715-b499-d71e9ca2bd60};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids> |
15 | | - <ProjectGuid>{CBD344C6-15E1-4337-AC0A-49E72D7B31C2}</ProjectGuid> |
16 | | - <OutputType>Library</OutputType> |
17 | | - <AppDesignerFolder>Properties</AppDesignerFolder> |
| 5 | + <TargetFramework>net472</TargetFramework> |
18 | 6 | <RootNamespace>CSharpGuidelinesAnalyzer</RootNamespace> |
19 | 7 | <AssemblyName>CSharpGuidelinesAnalyzer</AssemblyName> |
20 | | - <TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion> |
| 8 | + </PropertyGroup> |
| 9 | + |
| 10 | + <PropertyGroup> |
21 | 11 | <GeneratePkgDefFile>false</GeneratePkgDefFile> |
22 | 12 | <IncludeAssemblyInVSIXContainer>false</IncludeAssemblyInVSIXContainer> |
23 | 13 | <IncludeDebugSymbolsInVSIXContainer>false</IncludeDebugSymbolsInVSIXContainer> |
|
26 | 16 | <CopyOutputSymbolsToOutputDirectory>false</CopyOutputSymbolsToOutputDirectory> |
27 | 17 | <VSSDKTargetPlatformRegRootSuffix>Roslyn</VSSDKTargetPlatformRegRootSuffix> |
28 | 18 | </PropertyGroup> |
| 19 | + |
29 | 20 | <PropertyGroup Condition="'$(BuildingInsideVisualStudio)' != 'true'"> |
30 | 21 | <!-- This property disables extension deployment for command line builds; required for AppVeyor --> |
31 | 22 | <DeployExtension>False</DeployExtension> |
32 | 23 | </PropertyGroup> |
33 | | - <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|AnyCPU'"> |
34 | | - <DebugSymbols>true</DebugSymbols> |
35 | | - <DebugType>full</DebugType> |
36 | | - <Optimize>false</Optimize> |
37 | | - <OutputPath>bin\Debug\</OutputPath> |
38 | | - <DefineConstants>DEBUG;TRACE</DefineConstants> |
39 | | - <ErrorReport>prompt</ErrorReport> |
40 | | - <WarningLevel>4</WarningLevel> |
41 | | - </PropertyGroup> |
42 | | - <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|AnyCPU'"> |
43 | | - <DebugType>pdbonly</DebugType> |
44 | | - <Optimize>true</Optimize> |
45 | | - <OutputPath>bin\Release\</OutputPath> |
46 | | - <DefineConstants>TRACE</DefineConstants> |
47 | | - <ErrorReport>prompt</ErrorReport> |
48 | | - <WarningLevel>4</WarningLevel> |
49 | | - </PropertyGroup> |
| 24 | + |
| 25 | + <ItemGroup> |
| 26 | + <PackageReference Include="Microsoft.VSSDK.BuildTools" Version="17.1.4057" PrivateAssets="all" /> |
| 27 | + </ItemGroup> |
| 28 | + |
50 | 29 | <PropertyGroup> |
51 | 30 | <StartAction>Program</StartAction> |
52 | 31 | <StartProgram>$(DevEnvDir)devenv.exe</StartProgram> |
53 | | - <StartArguments>/rootsuffix Roslyn</StartArguments> |
| 32 | + <StartArguments>/rootsuffix $(VSSDKTargetPlatformRegRootSuffix)</StartArguments> |
54 | 33 | </PropertyGroup> |
55 | | - <ItemGroup> |
56 | | - <None Include="source.extension.vsixmanifest"> |
57 | | - <SubType>Designer</SubType> |
58 | | - </None> |
59 | | - </ItemGroup> |
60 | | - <ItemGroup> |
61 | | - <ProjectReference Include="..\CSharpGuidelinesAnalyzer\CSharpGuidelinesAnalyzer.csproj"> |
62 | | - <Project>{560612BD-75DC-40B3-A070-A913B925B60F}</Project> |
63 | | - <Name>CSharpGuidelinesAnalyzer</Name> |
64 | | - </ProjectReference> |
65 | | - </ItemGroup> |
| 34 | + |
| 35 | + <Import Sdk="Microsoft.NET.Sdk" Project="Sdk.targets" /> |
| 36 | + |
| 37 | + <Import Project="$(VSToolsPath)\VSSDK\Microsoft.VsSDK.targets" Condition="Exists('$(VSToolsPath)\VSSDK\Microsoft.VsSDK.targets')" /> |
| 38 | + |
66 | 39 | <ItemGroup> |
67 | 40 | <Content Include="..\..\..\LICENSE.txt"> |
68 | 41 | <Link>LICENSE.txt</Link> |
69 | 42 | <IncludeInVSIX>true</IncludeInVSIX> |
70 | 43 | </Content> |
71 | 44 | </ItemGroup> |
72 | | - <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> |
73 | | - <Import Project="$(VSToolsPath)\VSSDK\Microsoft.VsSDK.targets" Condition="'$(VSToolsPath)' != ''" /> |
| 45 | + |
| 46 | + <ItemGroup> |
| 47 | + <ProjectReference Include="..\CSharpGuidelinesAnalyzer\CSharpGuidelinesAnalyzer.csproj" /> |
| 48 | + </ItemGroup> |
| 49 | + |
| 50 | + <ItemGroup> |
| 51 | + <!-- https://github.com/dotnet/sdk/issues/433 --> |
| 52 | + <ProjectReference Update="@(ProjectReference)" AdditionalProperties="TargetFramework=netstandard1.3" /> |
| 53 | + |
| 54 | + <!-- https://github.com/Microsoft/extendvs/issues/57 --> |
| 55 | + <ProjectReference Update="@(ProjectReference)" Name="%(Filename)" /> |
| 56 | + </ItemGroup> |
| 57 | + |
74 | 58 | <Target Name="GetVsixPackageVersion" Outputs="$(VsixPackageVersion)"> |
75 | 59 | <GetAssemblyIdentity AssemblyFiles="$(ProjectDir)$(OutDir)CSharpGuidelinesAnalyzer.dll"> |
76 | 60 | <Output TaskParameter="Assemblies" ItemName="assemblyVersionInfo" /> |
|
81 | 65 | <VsixPackageVersion>$([System.Text.RegularExpressions.Regex]::Match($(In), $(Pattern)))</VsixPackageVersion> |
82 | 66 | </PropertyGroup> |
83 | 67 | </Target> |
84 | | - <Target Name="ExcludeFilesFromVSIX" BeforeTargets="CreateVsixContainer" AfterTargets="GetVsixSourceItems"> |
85 | | - <ItemGroup> |
86 | | - <VsixSourceItem Remove="$(SolutionDir)CSharpGuidelinesAnalyzer\CSharpGuidelinesAnalyzer\tools\install.ps1" /> |
87 | | - <VsixSourceItem Remove="$(SolutionDir)CSharpGuidelinesAnalyzer\CSharpGuidelinesAnalyzer\tools\uninstall.ps1" /> |
88 | | - </ItemGroup> |
89 | | - <!-- |
90 | | - <Message Text="VsixSourceItem collection now contains: @(VsixSourceItem)" Importance="High" /> |
91 | | - --> |
92 | | - </Target> |
| 68 | + |
93 | 69 | </Project> |
0 commit comments