Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 10 additions & 4 deletions src/nuget-client/.github/copilot-instructions.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,15 @@
# Instructions

When creating pull requests, always follow the [PR template](PULL_REQUEST_TEMPLATE.md).
## General Guidelines

Use the following coding guidelines: https://github.com/NuGet/NuGet.Client/blob/dev/docs/coding-guidelines.md
- When creating pull requests, always follow the [PR template](PULL_REQUEST_TEMPLATE.md).
- Always format before submitting a pull request.

Always format before submitting a pull request.
## Coding Standards

Never use reflection.
- Use the following coding guidelines: https://github.com/NuGet/NuGet.Client/blob/dev/docs/coding-guidelines.md
- Never use reflection.

## Project-Specific Rules

- All files in the repository are nullable by default (project-level nullable enable). No need to add `#nullable enable` directives to individual files.
2 changes: 1 addition & 1 deletion src/nuget-client/build/config.props
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
<!-- ** Change for each new version -->
<!-- when changing any of the NuGetVersion props below, run tools-local\ship-public-apis -->
<MajorNuGetVersion Condition="'$(MajorNuGetVersion)' == ''">7</MajorNuGetVersion>
<MinorNuGetVersion Condition="'$(MinorNuGetVersion)' == ''">5</MinorNuGetVersion>
<MinorNuGetVersion Condition="'$(MinorNuGetVersion)' == ''">6</MinorNuGetVersion>
<PatchNuGetVersion Condition="'$(PatchNuGetVersion)' == ''">0</PatchNuGetVersion>
<SemanticVersion Condition=" '$(SemanticVersion)' == '' ">$(MajorNuGetVersion).$(MinorNuGetVersion).$(PatchNuGetVersion)</SemanticVersion>

Expand Down
2 changes: 1 addition & 1 deletion src/nuget-client/eng/pipelines/backup_build_artifacts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
displayName: "Backup Build Artifacts"
timeoutInMinutes: 10
pool:
name: VSEngSS-MicroBuild2022-1ES
name: VSEng-MicroBuildVSStable

steps:
- checkout: none
Expand Down
6 changes: 3 additions & 3 deletions src/nuget-client/eng/pipelines/compliance.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ extends:
template: azure-pipelines/MicroBuild.1ES.Unofficial.yml@MicroBuildTemplate
parameters:
sdl:
sourceAnalysisPool: VSEngSS-MicroBuild2022-1ES
sourceAnalysisPool: VSEng-MicroBuildVSStable
binskim:
enabled: true
scanOutputDirectoryOnly: true
Expand All @@ -39,7 +39,7 @@ extends:
notificationAliases: $(TsaNotificationAliases)
pool:
name: AzurePipelines-EO
image: VSEngSS-MicroBuild2022-1ES
image: VSEng-MicroBuildVSStable
os: windows
stages:
- stage: compliance
Expand All @@ -49,7 +49,7 @@ extends:
displayName: "Static Analysis"
timeoutInMinutes: 180
pool:
name: VSEngSS-MicroBuild2022-1ES
name: VSEng-MicroBuildVSStable
templateContext:
inputs:
- input: pipelineArtifact
Expand Down
2 changes: 1 addition & 1 deletion src/nuget-client/eng/pipelines/dailytests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ stages:
- job: Build
timeoutInMinutes: 170
pool:
name: VSEngSS-MicroBuild2022-1ES
name: VSEng-MicroBuildVSStable
steps:
- template: vs-test/build.yml

Expand Down
2 changes: 1 addition & 1 deletion src/nuget-client/eng/pipelines/official.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ extends:
template: azure-pipelines/MicroBuild.1ES.Official.yml@MicroBuildTemplate
parameters:
sdl:
sourceAnalysisPool: VSEngSS-MicroBuild2022-1ES
sourceAnalysisPool: VSEng-MicroBuildVSStable
binskim:
enabled: true
scanOutputDirectoryOnly: true
Expand Down
16 changes: 8 additions & 8 deletions src/nuget-client/eng/pipelines/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ stages:
agentPool: NetCore-Public
agentDemands: ImageOverride -equals Windows.VS2022.Amd64.Open
${{ else }}:
agentPool: VSEngSS-MicroBuild2022-1ES
agentPool: VSEng-MicroBuildVSStable
testType: Unit
testTargetFramework: net472

Expand All @@ -79,7 +79,7 @@ stages:
agentPool: NetCore-Public
agentDemands: ImageOverride -equals Windows.VS2022.Amd64.Open
${{ else }}:
agentPool: VSEngSS-MicroBuild2022-1ES
agentPool: VSEng-MicroBuildVSStable
testType: Unit
testTargetFramework: net10.0

Expand All @@ -96,7 +96,7 @@ stages:
agentPool: NetCore-Public
agentDemands: ImageOverride -equals Windows.VS2022.Amd64.Open
${{ else }}:
agentPool: VSEngSS-MicroBuild2022-1ES
agentPool: VSVSEng-MicroBuildVSStable
testType: Functional
testTargetFramework: net472
testProjectName: Msbuild.Integration.Test
Expand All @@ -114,7 +114,7 @@ stages:
agentPool: NetCore-Public
agentDemands: ImageOverride -equals Windows.VS2022.Amd64.Open
${{ else }}:
agentPool: VSEngSS-MicroBuild2022-1ES
agentPool: VSEng-MicroBuildVSStable
testType: Functional
testTargetFramework: net472
testProjectName: NuGet.CommandLine.FuncTest
Expand All @@ -133,7 +133,7 @@ stages:
agentPool: NetCore-Public
agentDemands: ImageOverride -equals Windows.VS2022.Amd64.Open
${{ else }}:
agentPool: VSEngSS-MicroBuild2022-1ES
agentPool: VSEng-MicroBuildVSStable
testType: Functional
testTargetFramework: net472
testProjectName: NuGet.CommandLine.Test
Expand All @@ -153,7 +153,7 @@ stages:
agentPool: NetCore-Public
agentDemands: ImageOverride -equals Windows.VS2022.Amd64.Open
${{ else }}:
agentPool: VSEngSS-MicroBuild2022-1ES
agentPool: VSEng-MicroBuildVSStable
testType: Functional
testTargetFramework: net472
testProjectName: NuGet.Packaging.FuncTest
Expand All @@ -171,7 +171,7 @@ stages:
agentPool: NetCore-Public
agentDemands: ImageOverride -equals Windows.VS2022.Amd64.Open
${{ else }}:
agentPool: VSEngSS-MicroBuild2022-1ES
agentPool: VSEng-MicroBuildVSStable
testType: Functional
testTargetFramework: net10.0
testProjectName: Dotnet.Integration.Test
Expand All @@ -190,7 +190,7 @@ stages:
agentPool: NetCore-Public
agentDemands: ImageOverride -equals Windows.VS2022.Amd64.Open
${{ else }}:
agentPool: VSEngSS-MicroBuild2022-1ES
agentPool: VSEng-MicroBuildVSStable
testType: Functional
testTargetFramework: net10.0
testProjectName: NuGet.Packaging.FuncTest
Expand Down
2 changes: 1 addition & 1 deletion src/nuget-client/eng/pipelines/pull_request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ extends:
template: azure-pipelines/MicroBuild.1ES.Unofficial.yml@MicroBuildTemplate
parameters:
sdl:
sourceAnalysisPool: VSEngSS-MicroBuild2022-1ES
sourceAnalysisPool: VSEng-MicroBuildVSStable
binskim:
enabled: true
scanOutputDirectoryOnly: true
Expand Down
4 changes: 2 additions & 2 deletions src/nuget-client/eng/pipelines/templates/pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ stages:
RunSettingsDropName: 'RunSettings/$(System.TeamProject)/$(Build.Repository.Name)/$(SourceBranch)/$(Build.BuildId)'
ProfilingInputsDropName: 'ProfilingInputs/$(System.TeamProject)/$(Build.Repository.Name)/$(SourceBranch)/$(Build.BuildId)'
pool:
name: VSEngSS-MicroBuild2022-1ES
name: VSEng-MicroBuildVSStable
templateContext:
mb:
localization:
Expand Down Expand Up @@ -204,7 +204,7 @@ stages:
VsTargetMajorVersion: $[stageDependencies.Initialize.Initialize_Build.outputs['updatebuildnumber.VsTargetMajorVersion']]
BuildRTM: "true"
pool:
name: VSEngSS-MicroBuild2022-1ES
name: VSEng-MicroBuildVSStable
templateContext:
mb:
localization:
Expand Down
2 changes: 1 addition & 1 deletion src/nuget-client/eng/pipelines/vs-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ stages:
- job: Build
timeoutInMinutes: 170
pool:
name: VSEngSS-MicroBuild2022-1ES
name: VSEng-MicroBuildVSStable
steps:
- template: vs-test/build.yml

Expand Down
5 changes: 0 additions & 5 deletions src/nuget-client/global.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,4 @@
{
"sdk": {
"version": "10.0.100",
"rollForward": "latestMajor",
"allowPrerelease": true
},
"tools": {
"dotnet": "10.0.100",
"pinned": true
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,9 @@ public static class Brushes

public static object ListItemTextSelectedColorKey { get; private set; } = SystemColors.HighlightTextColorKey;

public static object Environment122PercentFontSizeKey { get; private set; } = SystemFonts.MessageFontSizeKey;
public static object Environment155PercentFontSizeKey { get; private set; } = SystemFonts.MessageFontSizeKey;

public static void LoadVsBrushes(INuGetExperimentationService nuGetExperimentationService)
{
if (nuGetExperimentationService == null)
Expand All @@ -181,6 +184,10 @@ public static void LoadVsBrushes(INuGetExperimentationService nuGetExperimentati

bool isBgColorFlightEnabled = IsBackgroundColorFlightEnabled(nuGetExperimentationService);

// Maps to VS environment fonts. Used for larger headings.
Environment122PercentFontSizeKey = VsFonts.Environment122PercentFontSizeKey;
Environment155PercentFontSizeKey = VsFonts.Environment155PercentFontSizeKey;

FocusVisualStyleBrushKey = VsBrushes.ToolWindowTextKey;
ActiveBorderKey = VsBrushes.ActiveBorderKey;
BorderBrush = VsBrushes.BrandedUIBorderKey;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,12 +42,6 @@
x:Key="BooleanToHiddenVisibilityConverter" />
<nuget:GreaterThanThresholdToVisibilityConverter
x:Key="GreaterThanThresholdToVisibilityConverter" />
<nuget:FontSizeConverter
Scale="122"
x:Key="Font122PercentSizeConverter" />
<nuget:FontSizeConverter
Scale="155"
x:Key="Font155PercentSizeConverter" />
<nuget:VersionToStringConverter
x:Key="VersionToStringConverter" />
<nuget:ProjectAndSolutionViewHeightConverter
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:imaging="clr-namespace:Microsoft.VisualStudio.Imaging;assembly=Microsoft.VisualStudio.Imaging"
xmlns:catalog="clr-namespace:Microsoft.VisualStudio.Imaging;assembly=Microsoft.VisualStudio.ImageCatalog"
xmlns:shell_controls="clr-namespace:Microsoft.VisualStudio.Shell.Controls;assembly=Microsoft.VisualStudio.Shell.Styles"
mc:Ignorable="d"
d:DesignHeight="150" d:DesignWidth="350">
<UserControl.Resources>
Expand Down Expand Up @@ -35,7 +36,7 @@
FontWeight="Bold"
Text="{x:Static nuget:Resources.Label_Deprecated}"/>
</StackPanel>
<TextBox
<shell_controls:TextBox
Style="{DynamicResource SelectableTextBlockStyle}"
Margin="0,8,0,0"
TextWrapping="WrapWithOverflow"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:imaging="clr-namespace:Microsoft.VisualStudio.Imaging;assembly=Microsoft.VisualStudio.Imaging"
xmlns:catalog="clr-namespace:Microsoft.VisualStudio.Imaging;assembly=Microsoft.VisualStudio.ImageCatalog"
xmlns:shell_controls="clr-namespace:Microsoft.VisualStudio.Shell.Controls;assembly=Microsoft.VisualStudio.Shell.Styles"
Background="{Binding UIBrushes.DetailPaneBackground }"
x:Name="_self"
mc:Ignorable="d"
Expand Down Expand Up @@ -66,13 +67,14 @@
<ColumnDefinition Width="auto"/>
<ColumnDefinition Width="auto"/>
</Grid.ColumnDefinitions>
<TextBox
<shell_controls:TextBox
Grid.Column="0"
Name="_packageId"
AutomationProperties.Name="{Binding Path=Id, Mode=OneWay}"
Style="{DynamicResource SelectableTextBlockStyle}"
Text="{Binding Path=Id, Mode=OneWay}"
FontSize="{Binding ElementName=_self,Path=FontSize,Converter={StaticResource Font155PercentSizeConverter}}" />
FontSize="{DynamicResource {x:Static nuget:Brushes.Environment155PercentFontSizeKey}}"
ContextMenuOpening="OnContextMenuResetFontSize" />
<imaging:CrispImage
Grid.Column="1"
x:Name="_prefixReservedMark"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -211,5 +211,13 @@ private void ExecuteUserAction(UserAction action, NuGetActionType actionType)
}
});
}

private void OnContextMenuResetFontSize(object sender, ContextMenuEventArgs e)
{
if (sender is System.Windows.Controls.TextBox textBox && textBox.ContextMenu != null)
{
textBox.ContextMenu.FontSize = FontSize;
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
<TabControl.Resources>
<Style TargetType="TabItem">
<Setter Property="Background" Value="{DynamicResource {x:Static nuget:Brushes.HeaderBackground}}" />
<Setter Property="FontSize" Value="{Binding FontSize, RelativeSource={RelativeSource AncestorType=UserControl}, Converter={StaticResource Font122PercentSizeConverter}}"/>
<Setter Property="FontSize" Value="{DynamicResource {x:Static nuget:Brushes.Environment122PercentFontSizeKey}}" />
<Setter Property="Foreground" Value="{DynamicResource {x:Static nuget:Brushes.UIText}}" />
<Setter Property="Padding" Value="12,0,12,0" />
<Setter Property="FocusVisualStyle" Value="{DynamicResource ControlsFocusVisualStyle}" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@
Orientation="Horizontal">
<TextBlock
FontWeight="Bold"
FontSize="{Binding ElementName=_self,Path=FontSize,Converter={StaticResource Font122PercentSizeConverter}}"
FontSize="{DynamicResource {x:Static nuget:Brushes.Environment122PercentFontSizeKey}}"
TextWrapping="NoWrap"
VerticalAlignment="Top"
ToolTip="{x:Static nuget:Resources.ToolTip_PackageRecommended}"
Expand All @@ -184,7 +184,7 @@
Text="&#x2605; " />
<TextBlock
FontWeight="Bold"
FontSize="{Binding ElementName=_self,Path=FontSize,Converter={StaticResource Font122PercentSizeConverter}}"
FontSize="{DynamicResource {x:Static nuget:Brushes.Environment122PercentFontSizeKey}}"
TextTrimming="CharacterEllipsis"
TextWrapping="NoWrap"
AutomationProperties.AutomationId="id"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
<TabControl.Resources>
<Style TargetType="TabItem">
<Setter Property="Background" Value="{DynamicResource {x:Static nuget:Brushes.HeaderBackground}}" />
<Setter Property="FontSize" Value="{Binding FontSize, RelativeSource={RelativeSource AncestorType=UserControl},Converter={StaticResource Font122PercentSizeConverter}}"/>
<Setter Property="FontSize" Value="{DynamicResource {x:Static nuget:Brushes.Environment122PercentFontSizeKey}}"/>
<Setter Property="Foreground" Value="{DynamicResource {x:Static nuget:Brushes.UIText}}" />
<Setter Property="Padding" Value="20,0,20,0" />
<Setter Property="FocusVisualStyle" Value="{DynamicResource ControlsFocusVisualStyle}" />
Expand Down Expand Up @@ -171,7 +171,7 @@
Grid.Column="4"
HorizontalAlignment="Right"
VerticalAlignment="Center"
FontSize="{Binding FontSize,RelativeSource={RelativeSource AncestorType=UserControl},Converter={StaticResource Font155PercentSizeConverter}}"
FontSize="{DynamicResource {x:Static nuget:Brushes.Environment155PercentFontSizeKey}}"
Margin="20,0,0,0"
TextTrimming="CharacterEllipsis">
Package Manager
Expand Down
Loading