Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updating various nugets #262

Merged
merged 4 commits into from
Oct 31, 2024
Merged
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
6 changes: 3 additions & 3 deletions Directory.Packages.props
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@
<ItemGroup>
<PackageVersion Include="coverlet.collector" Version="6.0.2" />
<PackageVersion Include="CommunityToolkit.Mvvm" Version="8.3.2" />
<PackageVersion Include="Grpc.Tools" Version="2.66.0" />
<PackageVersion Include="Grpc.Tools" Version="2.67.0" />
<PackageVersion Include="GrpcDotNetNamedPipes" Version="3.0.0" />
<PackageVersion Include="MaterialDesignThemes" Version="4.9.0" />
<PackageVersion Include="MaterialDesignThemes" Version="5.1.0" />
<PackageVersion Include="Microsoft.CodeAnalysis.Analyzers" Version="3.3.4" PrivateAssets="all" />
<PackageVersion Include="Microsoft.CodeAnalysis.CSharp" Version="4.7.0" PrivateAssets="all" />
<PackageVersion Include="Microsoft.CodeAnalysis.Common" Version="4.7.0" />
<PackageVersion Include="Microsoft.NET.Test.Sdk" Version="17.11.1" />
<PackageVersion Include="Microsoft.SourceLink.GitHub" Version="8.0.0" PrivateAssets="All" />
<PackageVersion Include="Microsoft.VisualStudio.Debugger.InteropA" Version="17.5.33428.366" />
<PackageVersion Include="Microsoft.VisualStudio.Interop" Version="17.11.40262" />
<PackageVersion Include="Microsoft.Windows.CsWin32" Version="0.3.106" />
<PackageVersion Include="MSTest.TestAdapter" Version="3.6.1" />
<PackageVersion Include="MSTest.TestFramework" Version="3.6.1" />
Expand Down
39 changes: 39 additions & 0 deletions NuGet.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<!-- `clear` ensures no additional sources are inherited from another config file. -->
<packageSources>
<clear />
<!-- `key` can be any identifier for your source. -->
<add key="nuget.org" value="https://api.nuget.org/v3/index.json" />
</packageSources>

<!-- Define mappings by adding package patterns beneath the target source. -->
<packageSourceMapping>
<!-- key value for <packageSource> should match key values from <packageSources> element -->
<packageSource key="nuget.org">
<package pattern="*" />
</packageSource>
</packageSourceMapping>
</configuration>

<!--
As an example, you can define multiple package sources and map particular nuget packages from each source.
This defines the package sources, nuget.org and contoso.com and maps all NuGet packages with Contoso.* to it.
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<packageSources>
<clear />
<add key="nuget.org" value="https://api.nuget.org/v3/index.json" />
<add key="contoso.com" value="https://contoso.com/packages/" />
</packageSources>

<packageSourceMapping>
<packageSource key="nuget.org">
<package pattern="*" />
</packageSource>
<packageSource key="contoso.com">
<package pattern="Contoso.*" />
</packageSource>
</packageSourceMapping>
</configuration>
-->
22 changes: 13 additions & 9 deletions XAMLTest.TestApp/App.xaml
Original file line number Diff line number Diff line change
@@ -1,15 +1,19 @@
<Application x:Class="XAMLTest.TestApp.App"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="clr-namespace:XAMLTest.TestApp"
xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
StartupUri="MainWindow.xaml">
<Application
x:Class="XAMLTest.TestApp.App"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="clr-namespace:XAMLTest.TestApp"
xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
StartupUri="MainWindow.xaml">
<Application.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<materialDesign:BundledTheme BaseTheme="Inherit" PrimaryColor="DeepPurple" SecondaryColor="Lime"
ColorAdjustment="{materialDesign:ColorAdjustment}" />
<ResourceDictionary Source="pack://application:,,,/MaterialDesignThemes.Wpf;component/Themes/MaterialDesignTheme.Defaults.xaml" />
<materialDesign:BundledTheme
BaseTheme="Inherit"
ColorAdjustment="{materialDesign:ColorAdjustment}"
PrimaryColor="DeepPurple"
SecondaryColor="Lime" />
<ResourceDictionary Source="pack://application:,,,/MaterialDesignThemes.Wpf;component/Themes/MaterialDesign2.Defaults.xaml" />
</ResourceDictionary.MergedDictionaries>
</ResourceDictionary>
</Application.Resources>
Expand Down
5 changes: 1 addition & 4 deletions XAMLTest.TestApp/MainWindow.xaml.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
using System;
using System.Windows;

namespace XAMLTest.TestApp;
namespace XAMLTest.TestApp;

/// <summary>
/// Interaction logic for MainWindow.xaml
Expand Down
3 changes: 1 addition & 2 deletions XAMLTest.Tests/XAMLTest.Tests.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<!--<TargetFrameworks>netcoreapp3.1;net5.0-windows7.0</TargetFrameworks>-->
<TargetFrameworks>net6.0-windows;net7.0-windows;net8.0-windows7</TargetFrameworks>
<IsPackable>false</IsPackable>
<UseWPF>true</UseWPF>
Expand All @@ -14,7 +13,7 @@
<PackageReference Include="Microsoft.NET.Test.Sdk" />
<PackageReference Include="MSTest.TestAdapter" />
<PackageReference Include="MSTest.TestFramework" />
<PackageReference Include="coverlet.collector" >
<PackageReference Include="coverlet.collector">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
Expand Down
1 change: 1 addition & 0 deletions XAMLTest.sln
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution
Directory.Build.targets = Directory.Build.targets
Directory.Packages.props = Directory.Packages.props
global.json = global.json
NuGet.config = NuGet.config
README.md = README.md
EndProjectSection
EndProject
Expand Down
13 changes: 6 additions & 7 deletions XAMLTest/VisualStudioAttacher.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using EnvDTE;
using System.Runtime.InteropServices;
using System.Runtime.InteropServices;
using System.Runtime.InteropServices.ComTypes;
using EnvDTE;
using DTEProcess = EnvDTE.Process;
using Process = System.Diagnostics.Process;

Expand All @@ -16,6 +16,7 @@ public class VisualStudioAttacher

public static string? GetSolutionForVisualStudio(Process visualStudioProcess)
{

if (TryGetVsInstance(visualStudioProcess.Id, out _DTE? visualStudioInstance))
{
try
Expand Down Expand Up @@ -86,17 +87,15 @@ private static IEnumerable<Process> GetVisualStudioProcesses()
private static bool TryGetVsInstance(int processId, [NotNullWhen(true)] out _DTE? instance)
{
IntPtr numFetched = IntPtr.Zero;
IRunningObjectTable runningObjectTable;
IEnumMoniker monikerEnumerator;
IMoniker[] monikers = new IMoniker[1];

GetRunningObjectTable(0, out runningObjectTable);
runningObjectTable.EnumRunning(out monikerEnumerator);
_ = GetRunningObjectTable(0, out IRunningObjectTable runningObjectTable);
runningObjectTable.EnumRunning(out IEnumMoniker monikerEnumerator);
monikerEnumerator.Reset();

while (monikerEnumerator.Next(1, monikers, numFetched) == 0)
{
CreateBindCtx(0, out IBindCtx ctx);
_ = CreateBindCtx(0, out IBindCtx ctx);

monikers[0].GetDisplayName(ctx, null, out string runningObjectName);

Expand Down
2 changes: 1 addition & 1 deletion XAMLTest/XAMLTest.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
</PackageReference>
<PackageReference Include="GrpcDotNetNamedPipes" />
<PackageReference Include="Microsoft.SourceLink.GitHub" PrivateAssets="All" />
<PackageReference Include="Microsoft.VisualStudio.Debugger.InteropA" />
<PackageReference Include="Microsoft.VisualStudio.Interop" />
<PackageReference Include="Microsoft.Windows.CsWin32">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
Expand Down
Loading