|
1 |
| -<?xml version="1.0" encoding="utf-8"?> |
2 |
| -<Project ToolsVersion="15.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> |
| 1 | +<Project Sdk="Microsoft.NET.Sdk"> |
3 | 2 | <PropertyGroup>
|
4 |
| - <MinimumVisualStudioVersion>16.0</MinimumVisualStudioVersion> |
| 3 | + <TargetFramework>net472</TargetFramework> |
| 4 | + |
| 5 | + <!-- Use the same experimental hive as Roslyn and Razor. This makes it easy to mix private builds. --> |
| 6 | + <VSSDKTargetPlatformRegRootSuffix>RoslynDev</VSSDKTargetPlatformRegRootSuffix> |
| 7 | + |
| 8 | + <!-- Required to run the project localy --> |
| 9 | + <StartAction>Program</StartAction> |
| 10 | + <StartProgram>$(DevEnvDir)devenv.exe</StartProgram> |
| 11 | + <StartArguments>/rootsuffix $(VSSDKTargetPlatformRegRootSuffix) /log</StartArguments> |
| 12 | + |
| 13 | + <!-- |
| 14 | + Mark the VSIX as a per-computer install (not-per-user). Putting a component "in the box" |
| 15 | + requires this, and trying to change it after doing a release has lot of problems. |
| 16 | + --> |
| 17 | + <ExtensionInstallationRoot>CommonExtensions</ExtensionInstallationRoot> |
| 18 | + <ExtensionInstallationFolder>Microsoft\Blazor</ExtensionInstallationFolder> |
| 19 | + |
| 20 | + <!-- This should be set as true if we're ever building the VSIX for inclusion by the VS installer. --> |
| 21 | + <IsProductComponent Condition="'$(IsProductComponent)'==''">false</IsProductComponent> |
| 22 | + |
| 23 | + <!-- Update the VSToolsPath to ensure VSIX builds --> |
5 | 24 | <VSToolsPath Condition="'$(VSToolsPath)' == ''">$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)</VSToolsPath>
|
6 |
| - <UseCodebase>true</UseCodebase> |
7 |
| - <ImportDirectoryBuildProps>true</ImportDirectoryBuildProps> |
8 |
| - <ImportDirectoryBuildTargets>true</ImportDirectoryBuildTargets> |
9 |
| - <OutputPath>bin\$(Configuration)\</OutputPath> |
10 |
| - <IntermediateOutputPath>obj\$(Configuration)\</IntermediateOutputPath> |
11 | 25 | <!-- Other projects should not reference this assembly. It is only meaning to be used in Visual Studio. -->
|
12 | 26 | <IsProjectReferenceProvider>false</IsProjectReferenceProvider>
|
13 |
| - <IsShippingPackage>false</IsShippingPackage> |
| 27 | + |
14 | 28 | <IsPackable>false</IsPackable>
|
15 |
| - <EnableSourceLink>false</EnableSourceLink> |
16 |
| - <GenerateSourceLinkFile>false</GenerateSourceLinkFile> |
| 29 | + <UseCodebase>true</UseCodebase> |
| 30 | + <GeneratePkgDefFile>true</GeneratePkgDefFile> |
17 | 31 | <DeployExtension Condition="'$(CI)' == 'true'">false</DeployExtension>
|
18 | 32 | <DisablePackageReferenceRestrictions>true</DisablePackageReferenceRestrictions>
|
19 | 33 | </PropertyGroup>
|
20 |
| - <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" /> |
21 | 34 |
|
22 | 35 | <!--
|
23 | 36 | Since the VSSDK doeesn't support SDK-based projects, we have to use the long/verbose version.
|
|
38 | 51 | <VsixVersionSuffix Condition="'$(BuildNumberSuffix)'=='t000'">424242.424242</VsixVersionSuffix>
|
39 | 52 | <VsixVersionSuffix Condition="'$(VsixVersionSuffix)'==''">$(BuildNumberSuffix.Replace('-', '.'))</VsixVersionSuffix>
|
40 | 53 | <VsixVersion>$(VsixVersionPrefix).$(VsixVersionSuffix)</VsixVersion>
|
| 54 | + |
| 55 | + <InformationalVersion>$(VsixVersion)</InformationalVersion> |
41 | 56 | </PropertyGroup>
|
42 | 57 |
|
43 | 58 | <PropertyGroup>
|
|
50 | 65 | -->
|
51 | 66 | <Target Name="GetBuildVersion" Outputs="$(VsixVersion)" />
|
52 | 67 |
|
53 |
| - <PropertyGroup> |
54 |
| - <!-- Use the same experimental hive as Roslyn and Razor. This makes it easy to mix private builds. --> |
55 |
| - <StartAction>Program</StartAction> |
56 |
| - <StartProgram Condition="'$(DevEnvDir)' != ''">$(DevEnvDir)devenv.exe</StartProgram> |
57 |
| - <StartArguments>/rootsuffix RoslynDev</StartArguments> |
58 |
| - <VSSDKTargetPlatformRegRootSuffix>RoslynDev</VSSDKTargetPlatformRegRootSuffix> |
59 |
| - </PropertyGroup> |
60 |
| - <PropertyGroup> |
61 |
| - <!-- |
62 |
| - Mark the VSIX as a per-computer install (not-per-user). Putting a component "in the box" |
63 |
| - requires this, and trying to change it after doing a release has lot of problems. |
64 |
| - --> |
65 |
| - <ExtensionInstallationRoot>CommonExtensions</ExtensionInstallationRoot> |
66 |
| - <ExtensionInstallationFolder>Microsoft\Blazor</ExtensionInstallationFolder> |
67 |
| - <!-- This should be set as true if we're ever building the VSIX for inclusion by the VS installer. --> |
68 |
| - <IsProductComponent Condition="'$(IsProductComponent)'==''">false</IsProductComponent> |
69 |
| - </PropertyGroup> |
70 | 68 | <PropertyGroup>
|
71 | 69 | <!--
|
72 | 70 | Include this assembly in the VSIX but not its symbols, except when installing it to the experimental
|
|
101 | 99 | </Target>
|
102 | 100 |
|
103 | 101 | <ItemGroup>
|
104 |
| - <!-- |
105 |
| - Let's continue our parade of gross workarounds. |
| 102 | + <Content Include="CodeSnippets.pkgdef" CopyToOutputDirectory="PreserveNewest" IncludeInVSIX="true" /> |
| 103 | + <Content Include="Templates.pkgdef" /> |
| 104 | + <Content Include="CodeSnippets\Blazor\para.snippet" CopyToOutputDirectory="PreserveNewest" IncludeInVSIX="true" /> |
| 105 | + <Content Include="Content\WebConfiguration.png" CopyToOutputDirectory="PreserveNewest" IncludeInVSIX="true" /> |
| 106 | + <Content Include="Resources\BlazorPackage.ico" CopyToOutputDirectory="PreserveNewest" IncludeInVSIX="true" /> |
106 | 107 |
|
107 |
| - Referencing a cross-targeting project using a P2P from a VSIX project doesn't work well. To work around |
108 |
| - this problem, we're only using the P2P references to force build ordering. Then we include the build |
109 |
| - output of those projects as content. |
110 |
| - --> |
111 |
| - <Content Include="CodeSnippets.pkgdef"> |
112 |
| - <CopyToOutputDirectory>Always</CopyToOutputDirectory> |
113 |
| - <IncludeInVSIX>true</IncludeInVSIX> |
| 108 | + <Content Include="..\..\..\THIRD-PARTY-NOTICES.txt" CopyToOutputDirectory="PreserveNewest" IncludeInVSIX="true"> |
| 109 | + <Link>Content\THIRD-PARTY-NOTICES.txt</Link> |
114 | 110 | </Content>
|
115 |
| - <Content Include="Templates.pkgdef" /> |
116 |
| - <ProjectReference Include="..\..\Templates\src\Microsoft.AspNetCore.Blazor.Templates.csproj"> |
117 |
| - <Project>{edd21533-c6e6-4f85-be4f-10e06756e24c}</Project> |
118 |
| - <Name>Microsoft.AspNetCore.Blazor.Templates</Name> |
119 |
| - <Targets>Pack</Targets> |
120 |
| - <Private>False</Private> |
121 |
| - <IncludeOutputGroupsInVSIX> |
122 |
| - </IncludeOutputGroupsInVSIX> |
123 |
| - <IncludeOutputGroupsInVSIXLocalOnly> |
124 |
| - </IncludeOutputGroupsInVSIXLocalOnly> |
125 |
| - </ProjectReference> |
| 111 | + <Content Include="$(RepositoryRoot)LICENSE.txt" CopyToOutputDirectory="PreserveNewest" IncludeInVSIX="true"> |
| 112 | + <Link>Content\LICENSE.txt</Link> |
| 113 | + </Content> |
| 114 | + |
| 115 | + <None Include="source.extension.vsixmanifest" SubType="Designer" /> |
126 | 116 | </ItemGroup>
|
127 |
| - <!-- |
128 |
| - We need to generate the assembly attributes for our assembly using the version from the build, so |
129 |
| - we can flow it to the about dialog. |
130 |
| - --> |
| 117 | + |
131 | 118 | <ItemGroup>
|
132 |
| - <_VSIXAssemblyAttribute Include="System.Reflection.AssemblyInformationalVersionAttribute"> |
133 |
| - <_Parameter1>$(VersionPrefix)-$(VersionSuffix)</_Parameter1> |
134 |
| - </_VSIXAssemblyAttribute> |
| 119 | + <ProjectReference Include="..\..\Templates\src\Microsoft.AspNetCore.Blazor.Templates.csproj" /> |
135 | 120 | </ItemGroup>
|
136 |
| - <Target Name="_GenerateVSIXAssemblyAttributesHash" DependsOnTargets="PrepareForBuild" Condition="'@(_VSIXAssemblyAttribute)' != ''"> |
137 |
| - <!-- We only use up to _Parameter1 for most attributes, but other targets may add additional assembly attributes with multiple parameters. --> |
138 |
| - <Hash ItemsToHash="@(_VSIXAssemblyAttribute->'%(Identity)%(_Parameter1)%(_Parameter2)%(_Parameter3)%(_Parameter4)%(_Parameter5)%(_Parameter6)%(_Parameter7)%(_Parameter8)')"> |
139 |
| - <Output TaskParameter="HashResult" PropertyName="_VSIXAssemblyAttributesHash" /> |
140 |
| - </Hash> |
141 |
| - <WriteLinesToFile Lines="$(_VSIXAssemblyAttributesHash)" File="$(_GeneratedVSIXAssemblyInfoInputsCacheFile)" Overwrite="True" WriteOnlyWhenDifferent="True" /> |
142 |
| - <ItemGroup> |
143 |
| - <FileWrites Include="$(_GeneratedVSIXAssemblyInfoInputsCacheFile)" /> |
144 |
| - </ItemGroup> |
145 |
| - </Target> |
146 |
| - <Target Name="_GenerateVSIXAssemblyAttributes" DependsOnTargets="_GenerateVSIXAssemblyAttributesHash" Inputs="$(_GeneratedVSIXAssemblyInfoInputsCacheFile)" Outputs="$(_GeneratedVSIXAssemblyInfoFile)" BeforeTargets="CoreCompile"> |
147 |
| - <ItemGroup> |
148 |
| - <Compile Include="$(_GeneratedVSIXAssemblyInfoFile)"> |
149 |
| - <Visible>false</Visible> |
150 |
| - </Compile> |
151 |
| - </ItemGroup> |
152 |
| - <WriteCodeFragment AssemblyAttributes="@(_VSIXAssemblyAttribute)" Language="C#" OutputFile="$(_GeneratedVSIXAssemblyInfoFile)" /> |
153 |
| - <ItemGroup> |
154 |
| - <FileWrites Include="$(_GeneratedVSIXAssemblyInfoFile)" /> |
155 |
| - </ItemGroup> |
156 |
| - </Target> |
157 |
| - <!-- |
158 |
| -
|
159 |
| - END INTERESTING STUFF |
160 | 121 |
|
161 |
| - --> |
162 |
| - <PropertyGroup> |
163 |
| - <SchemaVersion>2.0</SchemaVersion> |
164 |
| - <ProjectTypeGuids>{82b43b9b-a64c-4715-b499-d71e9ca2bd60};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids> |
165 |
| - <ProjectGuid>{9088E4E4-B855-457F-AE9E-D86709A5E1F4}</ProjectGuid> |
166 |
| - <OutputType>Library</OutputType> |
167 |
| - <AppDesignerFolder>Properties</AppDesignerFolder> |
168 |
| - <RootNamespace>Microsoft.VisualStudio.BlazorExtension</RootNamespace> |
169 |
| - <AssemblyName>Microsoft.VisualStudio.BlazorExtension</AssemblyName> |
170 |
| - <TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion> |
171 |
| - <GeneratePkgDefFile>true</GeneratePkgDefFile> |
172 |
| - </PropertyGroup> |
173 |
| - <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> |
174 |
| - <DebugSymbols>true</DebugSymbols> |
175 |
| - <DebugType>full</DebugType> |
176 |
| - <Optimize>false</Optimize> |
177 |
| - <DefineConstants>DEBUG;TRACE</DefineConstants> |
178 |
| - <ErrorReport>prompt</ErrorReport> |
179 |
| - <WarningLevel>4</WarningLevel> |
180 |
| - </PropertyGroup> |
181 |
| - <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> |
182 |
| - <DebugType>pdbonly</DebugType> |
183 |
| - <Optimize>true</Optimize> |
184 |
| - <DefineConstants>TRACE</DefineConstants> |
185 |
| - <ErrorReport>prompt</ErrorReport> |
186 |
| - <WarningLevel>4</WarningLevel> |
187 |
| - </PropertyGroup> |
188 | 122 | <ItemGroup>
|
189 | 123 | <PackageReference Include="Microsoft.VisualStudio.Shell.15.0" Version="15.7.27703" />
|
190 | 124 | <PackageReference Include="Microsoft.VSSDK.BuildTools" Version="15.9.3032" />
|
191 | 125 | <PackageReference Include="StreamJsonRpc" Version="1.5.43" />
|
192 | 126 | </ItemGroup>
|
193 |
| - <ItemGroup> |
194 |
| - <Compile Include="AboutDialogInfoAttribute.cs" /> |
195 |
| - <Compile Include="AutoRebuild\AutoRebuildService.cs" /> |
196 |
| - <Compile Include="AutoRebuild\BuildEventsWatcher.cs" /> |
197 |
| - <Compile Include="AutoRebuild\StreamProtocolExtensions.cs" /> |
198 |
| - <Compile Include="BlazorPackage.cs" /> |
199 |
| - </ItemGroup> |
200 |
| - <ItemGroup> |
201 |
| - <Content Include="CodeSnippets\Blazor\para.snippet"> |
202 |
| - <CopyToOutputDirectory>Always</CopyToOutputDirectory> |
203 |
| - <IncludeInVSIX>true</IncludeInVSIX> |
204 |
| - </Content> |
205 |
| - <None Include="Key.snk" /> |
206 |
| - <None Include="source.extension.vsixmanifest"> |
207 |
| - <SubType>Designer</SubType> |
208 |
| - </None> |
209 |
| - </ItemGroup> |
210 |
| - <ItemGroup> |
211 |
| - <Content Include="..\..\..\THIRD-PARTY-NOTICES.txt"> |
212 |
| - <Link>Content\THIRD-PARTY-NOTICES.txt</Link> |
213 |
| - <IncludeInVSIX>true</IncludeInVSIX> |
214 |
| - <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> |
215 |
| - </Content> |
216 |
| - <Content Include="$(RepositoryRoot)LICENSE.txt"> |
217 |
| - <Link>Content\LICENSE.txt</Link> |
218 |
| - <IncludeInVSIX>true</IncludeInVSIX> |
219 |
| - <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> |
220 |
| - </Content> |
221 |
| - <Content Include="Content\WebConfiguration.png"> |
222 |
| - <IncludeInVSIX>true</IncludeInVSIX> |
223 |
| - <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> |
224 |
| - </Content> |
225 |
| - <Content Include="Resources\BlazorPackage.ico"> |
226 |
| - <IncludeInVSIX>true</IncludeInVSIX> |
227 |
| - <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> |
228 |
| - </Content> |
229 |
| - </ItemGroup> |
| 127 | + |
| 128 | + <!-- Resources are a little bit special in a VSIX --> |
| 129 | + <PropertyGroup> |
| 130 | + <EnableDefaultEmbeddedResourceItems>false</EnableDefaultEmbeddedResourceItems> |
| 131 | + </PropertyGroup> |
| 132 | + |
230 | 133 | <ItemGroup>
|
231 | 134 | <EmbeddedResource Include="Resources.resx">
|
232 | 135 | <MergeWithCTO>true</MergeWithCTO>
|
233 | 136 | <ManifestResourceName>VSPackage</ManifestResourceName>
|
234 | 137 | </EmbeddedResource>
|
235 | 138 | </ItemGroup>
|
| 139 | + |
236 | 140 | <ItemGroup>
|
237 |
| - <Reference Include="EnvDTE, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> |
238 |
| - <EmbedInteropTypes>False</EmbedInteropTypes> |
239 |
| - </Reference> |
240 |
| - <Reference Include="EnvDTE100, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL"> |
241 |
| - <EmbedInteropTypes>False</EmbedInteropTypes> |
242 |
| - </Reference> |
243 |
| - <Reference Include="EnvDTE80, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> |
244 |
| - <EmbedInteropTypes>False</EmbedInteropTypes> |
245 |
| - </Reference> |
246 |
| - <Reference Include="EnvDTE90, Version=9.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> |
247 |
| - <EmbedInteropTypes>False</EmbedInteropTypes> |
248 |
| - </Reference> |
249 |
| - <Reference Include="Microsoft.CSharp" /> |
250 |
| - <Reference Include="Microsoft.VisualStudio.CommandBars, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> |
251 |
| - <EmbedInteropTypes>False</EmbedInteropTypes> |
252 |
| - </Reference> |
253 |
| - <Reference Include="stdole, Version=7.0.3300.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> |
254 |
| - <EmbedInteropTypes>False</EmbedInteropTypes> |
255 |
| - </Reference> |
| 141 | + <Reference Include="PresentationCore" /> |
| 142 | + <Reference Include="PresentationFramework" /> |
256 | 143 | <Reference Include="System" />
|
257 |
| - <Reference Include="System.Data" /> |
258 | 144 | <Reference Include="System.Design" />
|
259 | 145 | <Reference Include="System.Drawing" />
|
260 | 146 | <Reference Include="System.Windows.Forms" />
|
261 |
| - <Reference Include="System.Xml" /> |
262 | 147 | </ItemGroup>
|
263 |
| - <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> |
264 |
| - <Import Project="$(VSToolsPath)\VSSDK\Microsoft.VsSDK.targets" Condition="'$(VSToolsPath)' != ''" /> |
265 |
| - <!-- Must be defined after the CSharp.targets --> |
266 |
| - <PropertyGroup> |
267 |
| - <_GeneratedVSIXAssemblyInfoInputsCacheFile>$(IntermediateOutputPath)$(MSBuildProjectName).VSIXAssemblyInfo.cache.txt</_GeneratedVSIXAssemblyInfoInputsCacheFile> |
268 |
| - <_GeneratedVSIXAssemblyInfoFile>$(IntermediateOutputPath)$(MSBuildProjectName).VSIXAssemblyInfo.cs</_GeneratedVSIXAssemblyInfoFile> |
269 |
| - </PropertyGroup> |
270 |
| - |
271 |
| - <!-- This needs to be here because the build will try to call it --> |
272 |
| - <Target Name="Pack"> |
273 |
| - </Target> |
274 | 148 | </Project>
|
0 commit comments