Skip to content

Commit

Permalink
Merge pull request #17 from Lombiq/issue/VSIX-38
Browse files Browse the repository at this point in the history
VSIX-38: VS 2022 upgrade
  • Loading branch information
Piedone authored Feb 23, 2022
2 parents 8feda54 + 8db0670 commit 8859f14
Show file tree
Hide file tree
Showing 23 changed files with 886 additions and 868 deletions.
10 changes: 8 additions & 2 deletions Lombiq.Vsix.Orchard.sln
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 16
VisualStudioVersion = 16.0.29905.134
# Visual Studio Version 17
VisualStudioVersion = 17.0.31903.59
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Lombiq.Vsix.Orchard", "Lombiq.Vsix.Orchard\Lombiq.Vsix.Orchard.csproj", "{EF02401B-9EB3-4E06-8C34-8411700E4B58}"
EndProject
Expand All @@ -14,13 +14,19 @@ EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Debug|x86 = Debug|x86
Release|Any CPU = Release|Any CPU
Release|x86 = Release|x86
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{EF02401B-9EB3-4E06-8C34-8411700E4B58}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{EF02401B-9EB3-4E06-8C34-8411700E4B58}.Debug|Any CPU.Build.0 = Debug|Any CPU
{EF02401B-9EB3-4E06-8C34-8411700E4B58}.Debug|x86.ActiveCfg = Debug|x86
{EF02401B-9EB3-4E06-8C34-8411700E4B58}.Debug|x86.Build.0 = Debug|x86
{EF02401B-9EB3-4E06-8C34-8411700E4B58}.Release|Any CPU.ActiveCfg = Release|Any CPU
{EF02401B-9EB3-4E06-8C34-8411700E4B58}.Release|Any CPU.Build.0 = Release|Any CPU
{EF02401B-9EB3-4E06-8C34-8411700E4B58}.Release|x86.ActiveCfg = Release|x86
{EF02401B-9EB3-4E06-8C34-8411700E4B58}.Release|x86.Build.0 = Release|x86
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand Down
1 change: 1 addition & 0 deletions Lombiq.Vsix.Orchard/Commands/InjectDependencyCommand.cs
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ private void MenuItemCallback(object sender, EventArgs e) =>

private async Task MenuItemCallbackAsync()
{
await ThreadHelper.JoinableTaskFactory.SwitchToMainThreadAsync();
const string injectDependencyCaption = "Inject Dependency";
var dte = await _package.GetDteAsync().ConfigureAwait(true);

Expand Down
2 changes: 2 additions & 0 deletions Lombiq.Vsix.Orchard/Commands/OpenErrorLogCommand.cs
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,7 @@ private void LogWatcherSettingsUpdatedCallback(object sender, LogWatcherSettings

private async Task LogWatcherSettingsUpdatedCallbackAsync(LogWatcherSettingsUpdatedEventArgs e)
{
await ThreadHelper.JoinableTaskFactory.SwitchToMainThreadAsync();
var isEnabled = e.Settings.LogWatcherEnabled;
var orchardLogWatcherToolbar = ((CommandBars)(await _package.GetDteAsync()
.ConfigureAwait(true)).CommandBars)[CommandBarNames.OrchardLogWatcherToolbarName];
Expand Down Expand Up @@ -178,6 +179,7 @@ await Task.Run(() =>

private async Task UpdateOpenErrorLogCommandAccessibilityAndTextAsync(ILogFileStatus logFileStatus = null)
{
await ThreadHelper.JoinableTaskFactory.SwitchToMainThreadAsync();
var logWatcherSettings = await _logWatcherSettingsAccessor.GetSettingsAsync().ConfigureAwait(true);

if (!(await _package.GetDteAsync().ConfigureAwait(true)).SolutionIsOpen())
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace Lombiq.Vsix.Orchard.Constants
namespace Lombiq.Vsix.Orchard.Constants
{
internal static class DependencyInjectorErrorCodes
{
Expand Down
4 changes: 2 additions & 2 deletions Lombiq.Vsix.Orchard/Constants/ExtensionVersion.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
namespace Lombiq.Vsix.Orchard.Constants
namespace Lombiq.Vsix.Orchard.Constants
{
internal static class ExtensionVersion
{
public const string Current = "1.5.4";
public const string Current = "1.5.40";
}
}
20 changes: 13 additions & 7 deletions Lombiq.Vsix.Orchard/Extensions/DTEExtensions.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,13 @@
namespace EnvDTE
{
public static class DteExtensions
{
public static bool SolutionIsOpen(this DTE dte) => dte.Solution.IsOpen;
}
}
namespace EnvDTE
{
public static class DteExtensions
{
public static bool SolutionIsOpen(this DTE dte)
{
// We should never get an exception here. This is just to ensure we access DTE on the main thread and get
// rid of the VSTHRD010 violation.
Microsoft.VisualStudio.Shell.ThreadHelper.ThrowIfNotOnUIThread();
return dte.Solution.IsOpen;
}
}
}
4 changes: 2 additions & 2 deletions Lombiq.Vsix.Orchard/Forms/InjectDependencyDialog.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions Lombiq.Vsix.Orchard/Forms/InjectDependencyDialog.resx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Expand Down Expand Up @@ -117,4 +117,4 @@
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>
</root>
2 changes: 1 addition & 1 deletion Lombiq.Vsix.Orchard/Helpers/DialogHelpers.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using System.Windows.Forms;
using System.Windows.Forms;

namespace Lombiq.Vsix.Orchard.Helpers
{
Expand Down
2 changes: 1 addition & 1 deletion Lombiq.Vsix.Orchard/Licence.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@ Redistribution and use in source and binary forms, with or without modification,

* Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Loading

0 comments on commit 8859f14

Please sign in to comment.