Skip to content

Commit 72a7fd1

Browse files
authored
Build DotNetDeltaApplier and BrowserRefresh dependencies using source packages (#9822)
* Disable Trace level log messages * Update to latest Hot Reload packages. * Use .NET 10 * Workaround for PDB conversion issues * Remove unnecessary package refs * Fx * Include embedded resources * Fix
1 parent 0204748 commit 72a7fd1

File tree

20 files changed

+161
-78
lines changed

20 files changed

+161
-78
lines changed

Directory.Build.targets

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<Project>
33

44
<Import Project="eng\imports\StrongName.targets" />
5-
<Import Project="eng\imports\SymStore.targets" Condition="'$(CIBuild)' == 'true'"/>
5+
<Import Project="eng\imports\SymStore.targets" Condition="'$(CIBuild)' == 'true' and '$(PublishWindowsPdb)' != 'false'"/>
66
<!-- VSSDK is needed in projects generating VSIX packages or pkgdef files. -->
77
<!-- Manually importing the .targets here allows SDK-style VS Extension projects to build properly. -->
88
<!-- See: https://github.com/dotnet/msbuild/issues/2393#issuecomment-1126563335 -->

Directory.Packages.props

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
<PropertyGroup>
77
<ManagePackageVersionsCentrally>true</ManagePackageVersionsCentrally>
8-
<MicrosoftDotNetHotReloadPackageVersion>10.0.100-rc.2.25502.106</MicrosoftDotNetHotReloadPackageVersion>
8+
<MicrosoftDotNetHotReloadPackageVersion>10.0.200-preview.0.25611.111</MicrosoftDotNetHotReloadPackageVersion>
99
</PropertyGroup>
1010

1111
<!--
@@ -29,14 +29,14 @@
2929
<PackageVersion Include="Microsoft.VisualStudioEng.MicroBuild.Core" Version="1.0.0" />
3030
<PackageVersion Include="Nerdbank.GitVersioning" Version="3.6.79-alpha" />
3131
<PackageVersion Include="Nerdbank.Streams" Version="2.12.87" />
32-
<PackageVersion Include="System.IO.Pipelines" Version="9.0.0" />
3332
<PackageVersion Include="StreamJsonRpc" Version="2.23.32-alpha" />
3433
<PackageVersion Include="Microsoft.Extensions.Logging.Abstractions" Version="9.0.0" />
34+
<PackageVersion Include="Microsoft.DotNet.HotReload.Agent" Version="$(MicrosoftDotNetHotReloadPackageVersion)"/>
3535
<PackageVersion Include="Microsoft.DotNet.HotReload.Agent.Data" Version="$(MicrosoftDotNetHotReloadPackageVersion)"/>
3636
<PackageVersion Include="Microsoft.DotNet.HotReload.Agent.PipeRpc" Version="$(MicrosoftDotNetHotReloadPackageVersion)"/>
37-
<PackageVersion Include="Microsoft.DotNet.HotReload.Agent.Host" Version="10.0.100-rc.2.25468.104"/>
37+
<PackageVersion Include="Microsoft.DotNet.HotReload.Agent.Host" Version="$(MicrosoftDotNetHotReloadPackageVersion)"/>
3838
<PackageVersion Include="Microsoft.DotNet.HotReload.Client" Version="$(MicrosoftDotNetHotReloadPackageVersion)"/>
39-
<PackageVersion Include="Microsoft.DotNet.HotReload.Web.Middleware" Version="10.0.100-rc.2.25468.104"/>
39+
<PackageVersion Include="Microsoft.DotNet.HotReload.Web.Middleware" Version="$(MicrosoftDotNetHotReloadPackageVersion)"/>
4040

4141
<!-- VS SDK -->
4242
<!-- https://dev.azure.com/azure-public/vside/_artifacts/feed/vssdk -->
@@ -72,8 +72,6 @@
7272
<PackageVersion Include="Microsoft.VisualStudio.Validation" Version="17.8.8" />
7373
<PackageVersion Include="Microsoft.VisualStudio.XmlEditor" Version="17.13.0-preview-1-35408-014" />
7474
<PackageVersion Include="Microsoft.VSSDK.BuildTools" Version="18.0.136-preview1" />
75-
<PackageVersion Include="System.Threading.Tasks.Dataflow" Version="9.0.0" />
76-
<PackageVersion Include="System.Formats.Asn1" Version="8.0.1" />
7775
<PackageVersion Include="Microsoft.VSDesigner" Version="18.0.1755-preview.1" />
7876
<PackageVersion Include="VsWebSite.Interop" Version="18.0.1755-preview.1" />
7977

@@ -90,7 +88,6 @@
9088
<!-- Roslyn -->
9189
<PackageVersion Include="Microsoft.CodeAnalysis" Version="5.0.0-1.25321.102" />
9290
<PackageVersion Include="Microsoft.CodeAnalysis.Common" Version="5.0.0-1.25321.102" />
93-
<PackageVersion Include="Microsoft.CSharp" Version="4.7.0" />
9491
<PackageVersion Include="Microsoft.Net.Compilers.Toolset" Version="5.0.0-1.25321.102" />
9592
<PackageVersion Include="Microsoft.VisualStudio.LanguageServices" Version="5.0.0-1.25321.102" />
9693

@@ -106,8 +103,6 @@
106103

107104
<!-- Framework packages -->
108105
<PackageVersion Include="Microsoft.IO.Redist" Version="6.1.0" />
109-
<!-- Pin version to avoid CVE in System.Text.Json 8.0.4 -->
110-
<PackageVersion Include="System.Text.Json" Version="9.0.0" />
111106

112107
<!-- MSBuild (for tests only) -->
113108
<PackageVersion Include="Microsoft.Build" Version="17.13.0-preview-24504-04" />

ProjectSystem.sln

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11

22
Microsoft Visual Studio Solution File, Format Version 12.00
3-
# Visual Studio Version 17
4-
VisualStudioVersion = 17.0.31514.227
3+
# Visual Studio Version 18
4+
VisualStudioVersion = 18.0.11114.144 d18.0
55
MinimumVisualStudioVersion = 10.0.40219.1
66
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "setup", "setup", "{AC8DB8AE-AC9F-4503-83C6-255B66C318C6}"
77
ProjectSection(SolutionItems) = preProject
@@ -81,6 +81,10 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Common", "Common", "{2BEDB9
8181
src\Common\BannedSymbols.txt = src\Common\BannedSymbols.txt
8282
EndProjectSection
8383
EndProject
84+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Microsoft.AspNetCore.Watch.BrowserRefresh", "src\Microsoft.AspNetCore.Watch.BrowserRefresh\Microsoft.AspNetCore.Watch.BrowserRefresh.csproj", "{C45E9403-8251-B5D1-CF02-6E8367F7218E}"
85+
EndProject
86+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Microsoft.Extensions.DotNetDeltaApplier", "src\Microsoft.Extensions.DotNetDeltaApplier\Microsoft.Extensions.DotNetDeltaApplier.csproj", "{51C57440-D5AB-889E-510A-CF81B0DA5333}"
87+
EndProject
8488
Global
8589
GlobalSection(SolutionConfigurationPlatforms) = preSolution
8690
Debug|Any CPU = Debug|Any CPU
@@ -142,6 +146,14 @@ Global
142146
{A0B3F2BD-C92A-4037-A9F0-4EC484267E75}.Debug|Any CPU.Build.0 = Debug|Any CPU
143147
{A0B3F2BD-C92A-4037-A9F0-4EC484267E75}.Release|Any CPU.ActiveCfg = Release|Any CPU
144148
{A0B3F2BD-C92A-4037-A9F0-4EC484267E75}.Release|Any CPU.Build.0 = Release|Any CPU
149+
{C45E9403-8251-B5D1-CF02-6E8367F7218E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
150+
{C45E9403-8251-B5D1-CF02-6E8367F7218E}.Debug|Any CPU.Build.0 = Debug|Any CPU
151+
{C45E9403-8251-B5D1-CF02-6E8367F7218E}.Release|Any CPU.ActiveCfg = Release|Any CPU
152+
{C45E9403-8251-B5D1-CF02-6E8367F7218E}.Release|Any CPU.Build.0 = Release|Any CPU
153+
{51C57440-D5AB-889E-510A-CF81B0DA5333}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
154+
{51C57440-D5AB-889E-510A-CF81B0DA5333}.Debug|Any CPU.Build.0 = Debug|Any CPU
155+
{51C57440-D5AB-889E-510A-CF81B0DA5333}.Release|Any CPU.ActiveCfg = Release|Any CPU
156+
{51C57440-D5AB-889E-510A-CF81B0DA5333}.Release|Any CPU.Build.0 = Release|Any CPU
145157
EndGlobalSection
146158
GlobalSection(SolutionProperties) = preSolution
147159
HideSolutionNode = FALSE
@@ -162,6 +174,8 @@ Global
162174
{02578366-DFA9-4827-93F7-08E2AE5CE6A4} = {7349958E-C619-481F-BB2A-8A4CA2E349D9}
163175
{A0B3F2BD-C92A-4037-A9F0-4EC484267E75} = {7349958E-C619-481F-BB2A-8A4CA2E349D9}
164176
{2BEDB95B-AAC2-4F6D-92EA-61F07E77887E} = {1FF0293B-6808-4BB1-8370-1FE222986654}
177+
{C45E9403-8251-B5D1-CF02-6E8367F7218E} = {1FF0293B-6808-4BB1-8370-1FE222986654}
178+
{51C57440-D5AB-889E-510A-CF81B0DA5333} = {1FF0293B-6808-4BB1-8370-1FE222986654}
165179
EndGlobalSection
166180
GlobalSection(ExtensibilityGlobals) = postSolution
167181
SolutionGuid = {6B652C28-D1FD-4885-A0CA-4704C54E78E7}

eng/Build.proj

Lines changed: 2 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -50,27 +50,11 @@
5050

5151
<Exec Command="dotnet --info" WorkingDirectory="$(ArtifactsDir)" />
5252

53-
<!-- Due to bug https://github.com/dotnet/sdk/issues/47008 we cannot pass paths that contain drive letters to "dotnet sln add".
54-
We do some contortion here to make the paths relative, and run them from the root directory. This code is a big ugly because
55-
there's no Path.GetRelativePath on .NET Framework. -->
56-
<PropertyGroup>
57-
<DriveRootPath>$([System.IO.Path]::GetPathRoot('$(ArtifactsDir)'))</DriveRootPath>
58-
<ArtifactsDirRelative>$([System.String]::Copy('$(ArtifactsDir)').Substring(3))</ArtifactsDirRelative>
59-
</PropertyGroup>
60-
6153
<!-- Create the solution. Use 'force' to override existing. -->
62-
<Exec Command="dotnet new sln -n $(MSBuildProjectName) -o $(ArtifactsDir) --force" WorkingDirectory="$(DriveRootPath)" />
63-
64-
<!-- Strip the drive letter and backslash, e.g. D:\ => -->
65-
<ItemGroup>
66-
<BuildProjectWithRel Include="@(BuildProject)">
67-
<!-- Trim the first three characters: D:\ -->
68-
<RelPath>$([System.String]::Copy('%(BuildProject.FullPath)').Substring(3))</RelPath>
69-
</BuildProjectWithRel>
70-
</ItemGroup>
54+
<Exec Command="dotnet new sln -n $(MSBuildProjectName) -o $(ArtifactsDir) -f sln --force" WorkingDirectory="$(DriveRootPath)" />
7155

7256
<!-- Add each BuildProject to the solution. -->
73-
<Exec Command="dotnet sln &quot;$(ArtifactsDirRelative)/$(MSBuildProjectName).sln&quot; add &quot;%(BuildProjectWithRel.RelPath)&quot;" WorkingDirectory="$(DriveRootPath)" />
57+
<Exec Command="dotnet sln &quot;$(ArtifactsDir)$(MSBuildProjectName).sln&quot; add &quot;%(BuildProject.FullPath)&quot;" />
7458

7559
<!-- Build the solution. -->
7660
<MSBuild Projects="$(ArtifactsDir)$(MSBuildProjectName).sln" Targets="@(BuildTarget)" BuildInParallel="true" Condition="'@(BuildTarget)' != ''" />

eng/imports/HostAgnostic.props

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,18 +18,15 @@
1818
<!-- Note: We require Nerdbank.GitVersioning beyond simply generating version numbers. It also produces some assembly information such as AssemblyName and PublicKeyToken into a *.ThisAssembly.cs file. -->
1919
<PackageReference Include="Nerdbank.GitVersioning" PrivateAssets="all" />
2020
<PackageReference Include="Nerdbank.Streams" ExcludeAssets="all" />
21-
<PackageReference Include="System.IO.Pipelines" ExcludeAssets="all" />
2221

2322
<!-- CPS -->
2423
<PackageReference Include="Microsoft.VisualStudio.ProjectSystem" />
2524
<PackageReference Include="Microsoft.VisualStudio.ProjectSystem.Sdk.Tools" PrivateAssets="all" />
2625
<PackageReference Include="Microsoft.VisualStudio.ProjectSystem.XamlTypes" Condition="'$(TargetFramework)' == '$(NetCoreTargetFramework)'" />
2726
<PackageReference Include="Microsoft.VisualStudio.Threading" />
2827
<PackageReference Include="Microsoft.VisualStudio.Validation" />
29-
<PackageReference Include="System.Threading.Tasks.Dataflow" />
3028

3129
<PackageReference Include="Microsoft.IO.Redist" Condition="'$(TargetFramework)' == 'net472'" />
32-
<PackageReference Include="System.Text.Json" />
3330

3431
<!-- VS MEF -->
3532
<PackageReference Include="Microsoft.VisualStudio.Composition" />
@@ -38,7 +35,6 @@
3835
<PackageReference Include="MessagePack" />
3936

4037
<!-- Roslyn -->
41-
<PackageReference Include="Microsoft.CSharp" />
4238
<PackageReference Include="Microsoft.CodeAnalysis" />
4339

4440
<!-- Needed to tie-break a potentially misspecified dependency somewhere -->

eng/pipelines/templates/build-pull-request.yml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,12 +31,19 @@ jobs:
3131

3232
# Ensure the .NET runtime needed by our unit tests is installed.
3333
- task: UseDotNet@2
34-
displayName: Install .NET Runtime
34+
displayName: Install .NET 9.0.x Runtime
3535
inputs:
3636
packageType: runtime
3737
# This should match the target of our unit test projects.
3838
version: 9.0.x
3939

40+
# .NET SDK used for build
41+
- task: UseDotNet@2
42+
displayName: Install .NET 10.x Runtime
43+
inputs:
44+
includePreviewVersions: true
45+
version: 10.x
46+
4047
# Allows for accessing the internal AzDO feed (vs-impl-internal) for project restore via Azure Artifacts Credential Provider.
4148
# See: https://github.com/microsoft/artifacts-credprovider#automatic-usage
4249
# YAML reference: https://docs.microsoft.com/azure/devops/pipelines/tasks/package/nuget-authenticate?view=azure-devops

eng/pipelines/templates/generate-localization.yml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,8 @@ jobs:
2323
- task: UseDotNet@2
2424
displayName: Install .NET Runtime
2525
inputs:
26-
packageType: runtime
27-
# This should match the target in OneLocBuildSetup.csproj.
28-
version: 9.0.x
26+
includePreviewVersions: true
27+
version: 10.x
2928

3029
# Creates the LocProject.json and perform some necessary file copying and renaming.
3130
- task: DotNetCoreCLI@2

global.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"sdk": {
3+
// necessary for VS to find pre-release SDKs
4+
"allowPrerelease": true
5+
}
6+
}

setup/ProjectSystemSetup/ProjectSystemSetup.csproj

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,8 @@
5555
</Compile>
5656
</ItemGroup>
5757

58+
<Import Project="..\..\src\HotReloadRuntimeDependencies.props"/>
59+
5860
<Target Name="PostProcessVsixSourceItems" AfterTargets="GetVsixSourceItems">
5961
<ItemGroup>
6062
<!-- Excludes the localized .xaml files from the VSIX which are added from the GetCopyToOutputDirectoryItems output group. Only the localized .dlls are needed in the VSIX. -->

src/Directory.Build.props

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,4 @@
1212
<CopyVsixManifestToOutput>false</CopyVsixManifestToOutput>
1313
</PropertyGroup>
1414

15-
<ItemGroup>
16-
<Compile Include="..\Common\GlobalAssemblyInfo.cs" Condition="'$(Language)' == 'C#'" />
17-
<Compile Include="..\Common\GlobalAssemblyInfo.vb" Condition="'$(Language)' == 'VB'" />
18-
</ItemGroup>
19-
2015
</Project>

0 commit comments

Comments
 (0)