-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathSdk.Vsix.props
More file actions
118 lines (93 loc) · 5.19 KB
/
Sdk.Vsix.props
File metadata and controls
118 lines (93 loc) · 5.19 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
<Project>
<!--
CodingWithCalvin.VsixSdk - Sdk.Vsix.props
VSIX-specific properties. Can be imported standalone or as part of the full SDK.
-->
<!--
Include source generators from the SDK package.
The analyzers folder is at the package root, parallel to the Sdk folder.
-->
<ItemGroup>
<Analyzer Include="$(MSBuildThisFileDirectory)..\analyzers\dotnet\cs\CodingWithCalvin.VsixSdk.Generators.dll"
Condition="Exists('$(MSBuildThisFileDirectory)..\analyzers\dotnet\cs\CodingWithCalvin.VsixSdk.Generators.dll')" />
</ItemGroup>
<!--
Implicit package references for VSIX development.
Users can override the version by setting VssdkBuildToolsVersion before SDK import.
-->
<PropertyGroup>
<VssdkBuildToolsVersion Condition="'$(VssdkBuildToolsVersion)' == ''">17.*</VssdkBuildToolsVersion>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.VSSDK.BuildTools" Version="$(VssdkBuildToolsVersion)" PrivateAssets="all" />
</ItemGroup>
<PropertyGroup>
<!-- Identify that this SDK is in use -->
<UsingCodingWithCalvinVsixSdk>true</UsingCodingWithCalvinVsixSdk>
<!-- VsixInfo class name (used by source generator) -->
<VsixInfoClassName Condition="'$(VsixInfoClassName)' == ''">VsixInfo</VsixInfoClassName>
<!-- AnyCPU works fine for VS 2022+ extensions -->
<Platform Condition="'$(Platform)' == ''">AnyCPU</Platform>
<PlatformTarget Condition="'$(PlatformTarget)' == ''">AnyCPU</PlatformTarget>
<!-- Default to .NET Framework 4.7.2 (minimum for VS 2022) -->
<TargetFramework Condition="'$(TargetFramework)' == ''">net472</TargetFramework>
<!-- VSIX projects should not be packable as regular NuGet packages -->
<IsPackable Condition="'$(IsPackable)' == ''">false</IsPackable>
<!-- Disable deterministic builds by default (can cause issues with VSIX) -->
<Deterministic Condition="'$(Deterministic)' == ''">false</Deterministic>
<!-- Use codebase for assembly loading -->
<UseCodebase Condition="'$(UseCodebase)' == ''">true</UseCodebase>
<!-- Generate PkgDef file for VS registration -->
<GeneratePkgDefFile Condition="'$(GeneratePkgDefFile)' == ''">true</GeneratePkgDefFile>
<!-- Default VSCT resource name -->
<VSCTResourceName Condition="'$(VSCTResourceName)' == ''">Menus.ctmenu</VSCTResourceName>
<!-- Include symbols for debugging -->
<DebugSymbols Condition="'$(DebugSymbols)' == ''">true</DebugSymbols>
<DebugType Condition="'$(DebugType)' == ''">portable</DebugType>
<!-- Output type is always a library for VSIX -->
<OutputType>Library</OutputType>
<!-- Disable nullable by default for .NET Framework compatibility -->
<Nullable Condition="'$(Nullable)' == ''">disable</Nullable>
<!-- Enable implicit usings is off by default for Framework -->
<ImplicitUsings Condition="'$(ImplicitUsings)' == ''">disable</ImplicitUsings>
<!--
Source Generator Configuration
Generated files are written to disk so they're visible in Solution Explorer
-->
<EmitCompilerGeneratedFiles Condition="'$(EmitCompilerGeneratedFiles)' == ''">true</EmitCompilerGeneratedFiles>
<CompilerGeneratedFilesOutputPath Condition="'$(CompilerGeneratedFilesOutputPath)' == ''">$(MSBuildProjectDirectory)\Generated</CompilerGeneratedFilesOutputPath>
<!--
Exclude generated files from default compilation
Source generators already include them - having them on disk is for visibility only
-->
<DefaultItemExcludes>$(DefaultItemExcludes);Generated\**</DefaultItemExcludes>
<!--
Exclude VSPackage.resx from default EmbeddedResource includes
The SDK adds these with special metadata (MergeWithCTO) in targets
-->
<DefaultItemExcludes>$(DefaultItemExcludes);**/VSPackage.resx;**/VSPackage.*.resx</DefaultItemExcludes>
</PropertyGroup>
<!-- F5 Debugging Configuration -->
<PropertyGroup Condition="'$(EnableDefaultVsixDebugging)' != 'false'">
<StartAction Condition="'$(StartAction)' == ''">Program</StartAction>
<StartProgram Condition="'$(StartProgram)' == ''">$(DevEnvDir)devenv.exe</StartProgram>
<StartArguments Condition="'$(StartArguments)' == ''">$(VsixDebuggingArguments)</StartArguments>
<!-- Default debugging arguments -->
<VsixDebuggingArguments Condition="'$(VsixDebuggingArguments)' == ''">/rootSuffix Exp</VsixDebuggingArguments>
</PropertyGroup>
<!-- VSIX Version Configuration -->
<PropertyGroup>
<!-- Allow users to set VsixVersion explicitly, otherwise derive from Version -->
<VsixVersion Condition="'$(VsixVersion)' == '' and '$(Version)' != ''">$(Version)</VsixVersion>
<VsixVersion Condition="'$(VsixVersion)' == ''">1.0.0</VsixVersion>
</PropertyGroup>
<!--
Deploy extension to experimental instance during build (for development)
Only deploy when building inside Visual Studio (not with dotnet build)
Must be set in props so it's defined before VSSDK.BuildTools imports
-->
<PropertyGroup>
<DeployExtension Condition="'$(DeployExtension)' == '' and '$(Configuration)' == 'Debug' and '$(BuildingInsideVisualStudio)' == 'true'">true</DeployExtension>
<DeployExtension Condition="'$(DeployExtension)' == ''">false</DeployExtension>
</PropertyGroup>
</Project>