forked from microsoft/typespec
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMicrosoft.TypeSpec.VS.csproj
94 lines (94 loc) · 6.28 KB
/
Microsoft.TypeSpec.VS.csproj
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
<Project>
<Import Sdk="Microsoft.NET.Sdk" Project="Sdk.props" />
<PropertyGroup>
<TargetFramework>net472</TargetFramework>
<DebugType>Embedded</DebugType>
<EmbedAllSources>true</EmbedAllSources>
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
<LangVersion>Latest</LangVersion>
<Nullable>Enable</Nullable>
<!-- Set this to 'all' explicitly to get a consistent behavior. It's the default value now in latest VS/.Net/NugetMgr, but maybe not in some previous version -->
<!-- https://learn.microsoft.com/en-us/dotnet/core/compatibility/sdk/9.0/nugetaudit-transitive-packages -->
<NuGetAuditMode>all</NuGetAuditMode>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<!-- Official build will pass in the real version from package.json, see scripts/build.js -->
<Version>42.42.42</Version>
<!-- Only deploy extension when building inside Visual Studio-->
<DeployExtension>false</DeployExtension>
<DeployExtension Condition="'$(BuildingInsideVisualStudio)' == 'true'">true</DeployExtension>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)' == 'Release'">
<TargetVsixContainer>$(MSBuildThisFileDirectory)..\$(AssemblyName).vsix</TargetVsixContainer>
</PropertyGroup>
<ItemGroup Condition="'$(Configuration)' == 'Debug'">
<Content Include="$(IntermediateOutputPath)DebugSourceDirectory.txt"
Link="DebugSourceDirectory.txt" Visible="False" />
</ItemGroup>
<ItemGroup>
<Content Include="..\LICENSE" Link="LICENSE" />
<Content Include="*.pkgdef" />
<Content Include="../node_modules/typespec-vscode/dist/typespec.tmLanguage"
Link="TextMate/typespec.tmLanguage" />
<Content Update="@(Content)" IncludeInVSIX="true" CopyToOutputDirectory="PreserveNewest" />
<Reference Include="System.ComponentModel.Composition" />
<!-- The 'MessagePack' is not used directly but referenced by nuget package 'Microsoft.VisualStudio.SDK', 'Microsoft.VisualStudio.Workspace' and 'Microsoft.VisualStudio.VSIntegration' -->
<!-- Have to add it explicitly here because the version used by 'Microsoft.VisualStudio...' report vulnerabilities now -->
<!-- TODO: [#5368] remove this explicit reference after 'Microsoft.VisualStudio...' releases new version having 'MessagePack' updated to vulnerability free version-->
<PackageReference Include="MessagePack" Version="2.5.192" />
<PackageReference Include="Microsoft.NETFramework.ReferenceAssemblies" Version="1.0.2" />
<Content Include="Icons\logo.png">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
<IncludeInVSIX>true</IncludeInVSIX>
</Content>
<Resource Include="Icons\tsp-file.png" />
<Content Include="Monikers.imagemanifest">
<IncludeInVSIX>true</IncludeInVSIX>
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
</ItemGroup>
<ItemGroup>
<!-- The 'Microsoft.VisualStudio.Composition' is not used directly but referenced by nuget package 'Microsoft.VisualStudio.Workspace' -->
<!-- Have to add it explicitly here because otherwise 'Microsoft.VisualStudio.Workspace" will report warning NU1603 because its desired version not found and higher version will be used -->
<!-- TODO: [#5368] remove this explicit reference after 'Microsoft.VisualStudio...' releases new version without the warning-->
<PackageReference Include="Microsoft.VisualStudio.Composition" Version="17.12.18" />
<!-- Use 17.0.x or latest 16.x if no 17.0.x for compatible API-->
<PackageReference Include="Microsoft.VisualStudio.SDK" Version="17.12.40392" ExcludeAssets="Runtime" />
<!-- The 'Microsoft.VisualStudio.Shell.15.0' is not used directly but referenced by nuget package 'Microsoft.VisualStudio.Workspace.VSIntegration' -->
<!-- Have to add it explicitly here because otherwise 'Microsoft.VisualStudio.Workspace.VSIntegration" will report warning NU1603 because its desired version not found and higher version will be used -->
<!-- TODO: [#5368] remove this explicit reference after 'Microsoft.VisualStudio...' releases new version without the warning-->
<PackageReference Include="Microsoft.VisualStudio.Shell.15.0" Version="17.12.40392" />
<PackageReference Include="Microsoft.VisualStudio.Workspace" Version="17.12.19" ExcludeAssets="Runtime" />
<PackageReference Include="Microsoft.VisualStudio.Workspace.VSIntegration" Version="17.12.19" ExcludeAssets="Runtime" />
<PackageReference Include="Microsoft.VSSDK.BuildTools" Version="17.9.3184">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<!-- Use latest 17.x for build tools-->
<!-- Align with VS 17.0 version here:
https://devblogs.microsoft.com/visualstudio/using-newtonsoft-json-in-a-visual-studio-extension/-->
<PackageReference Include="NewtonSoft.JSON" Version="13.0.3" ExcludeAssets="Runtime" />
</ItemGroup>
<Import Sdk="Microsoft.NET.Sdk" Project="Sdk.targets" />
<Import Project="$(VSToolsPath)\VSSDK\Microsoft.VsSDK.targets"
Condition="'$(VSToolsPath)' != '' and '$(MSBuildRuntimeType)' != 'Core'" />
<Target Name="GetPackageVersionForVsixManifest" Returns="$(Version)" />
<!-- VS SDK does not currently support building with dotnet build. -->
<Target Name="WarnAboutDotnetBuildAndVsix" Condition="'$(MSBuildRuntimeType)' == 'Core'"
AfterTargets="AfterBuild">
<Message Importance="High"
Text="VSIX packaging skipped: not supported by `dotnet build`, use Visual Studio `msbuild` to package VSIX." />
</Target>
<!-- Stash debug source directory so deployed debug vsix can use it to find and tsp-server under
development in source tree. -->
<Target Name="WriteDebugSourceDirectory" Condition="'$(Configuration)' == 'Debug'"
BeforeTargets="BeforeBuild">
<WriteLinesToFile File="$(IntermediateOutputPath)DebugSourceDirectory.txt"
Lines="$(MSBuildThisFileDirectory)" WriteOnlyWhenDifferent="true" Overwrite="true" />
</Target>
<!-- Helpful for debugging deployment issues to be able to see at minimum verbosity if extension
was deployed -->
<Target Name="LogVsixDeployment" BeforeTargets="DeployVsixExtensionFiles"
Condition="'$(DeployExtension)' == 'true'">
<Message Importance="High" Text="$(TargetVsixContainer) -> $(VsixDeploymentPath)" />
</Target>
</Project>