diff --git a/LocalSystem/Msi/Api.cs b/LocalSystem/Msi/Api.cs
index d9431de..168ff3f 100644
--- a/LocalSystem/Msi/Api.cs
+++ b/LocalSystem/Msi/Api.cs
@@ -483,7 +483,7 @@ public static class Api
private static extern Int32 MsiGetProductInfo(
string product,
string property,
- [Out] String valueBuf,
+ StringBuilder valueBuf,
ref Int32 len);
[DllImport("msi.dll",
@@ -641,7 +641,7 @@ public static string GetComponentPathByFile(string fileName)
/// Get property of a product indicated by GUID. Throws exception if cannot read the property.
///
/// Product GUID
- /// Property name
+ /// Property name
/// Property value, if available.
/// Throws MSIException if reading property was not successful
public static String getProperty(string productGUID, string propertyName)
@@ -652,7 +652,7 @@ public static String getProperty(string productGUID, string propertyName)
// increase for the terminating \0
len++;
- String r = new string(new char[len]);
+ var r = new StringBuilder();
int returnValue = Api.MsiGetProductInfo(productGUID, propertyName, r, ref len);
if (returnValue != 0)
{
@@ -661,7 +661,7 @@ public static String getProperty(string productGUID, string propertyName)
throw new MSIException(returnValue);
}
}
- return r;
+ return r.ToString();
}
#endregion
}
diff --git a/LocalSystem/Msi/MsiException.cs b/LocalSystem/Msi/MsiException.cs
index 876f7ae..7473ec6 100644
--- a/LocalSystem/Msi/MsiException.cs
+++ b/LocalSystem/Msi/MsiException.cs
@@ -54,20 +54,5 @@ public MSIException(int returnValue)
public MSIException(string message, Exception innerException)
: base(message, innerException) { }
- ///
- /// Initializes a new instance of the class
- /// when provided with the serialization information and streaming
- /// context.
- ///
- ///
- /// The serialization information.
- ///
- ///
- /// The streaming context.
- ///
- protected MSIException(
- SerializationInfo info,
- StreamingContext context)
- : base(info, context) { }
}
}
diff --git a/LocalSystem/WindowsUserSidNotFound.cs b/LocalSystem/WindowsUserSidNotFound.cs
index d0acb74..0355eba 100644
--- a/LocalSystem/WindowsUserSidNotFound.cs
+++ b/LocalSystem/WindowsUserSidNotFound.cs
@@ -17,10 +17,5 @@ public WindowsUserSidNotFound(
string message,
Exception innerException)
: base(message, innerException) { }
-
- protected WindowsUserSidNotFound(
- SerializationInfo info,
- StreamingContext context)
- : base(info, context) { }
}
}
diff --git a/Plex/AppNotInstalledException.cs b/Plex/AppNotInstalledException.cs
index ba649f5..00a68dc 100644
--- a/Plex/AppNotInstalledException.cs
+++ b/Plex/AppNotInstalledException.cs
@@ -19,9 +19,5 @@ public AppNotInstalledException(
Exception innerException)
: base(message, innerException) { }
- protected AppNotInstalledException(
- SerializationInfo info,
- StreamingContext context)
- : base(info, context) { }
}
}
diff --git a/Plex/PlexDataFolderNotFoundException.cs b/Plex/PlexDataFolderNotFoundException.cs
index 966cdec..c924802 100644
--- a/Plex/PlexDataFolderNotFoundException.cs
+++ b/Plex/PlexDataFolderNotFoundException.cs
@@ -18,10 +18,5 @@ public PlexDataFolderNotFoundException(
string message,
Exception innerException)
: base(message, innerException) { }
-
- protected PlexDataFolderNotFoundException(
- SerializationInfo info,
- StreamingContext context)
- : base(info, context) { }
}
}
diff --git a/Plex/ServiceNotInstalledException.cs b/Plex/ServiceNotInstalledException.cs
index dbb69ee..ae8f53e 100644
--- a/Plex/ServiceNotInstalledException.cs
+++ b/Plex/ServiceNotInstalledException.cs
@@ -17,10 +17,5 @@ public ServiceNotInstalledException(
string message,
Exception innerException)
: base(message, innerException) { }
-
- protected ServiceNotInstalledException(
- SerializationInfo info,
- StreamingContext context)
- : base(info, context) { }
}
}
diff --git a/Plex/SilentUpdate.cs b/Plex/SilentUpdate.cs
index 31260d7..3538fe7 100644
--- a/Plex/SilentUpdate.cs
+++ b/Plex/SilentUpdate.cs
@@ -28,7 +28,7 @@ public class SilentUpdate
///
/// The wait timer.
///
- private Timer _timer = null;
+ private System.Timers.Timer _timer = null;
#endregion
#region Properties
@@ -199,7 +199,7 @@ private void Initialize(string logPath)
try
{
_server = new MediaServer(logPath, ServerUpdateMessage);
- _timer = new Timer(DefaultWaitTime * 1000);
+ _timer = new System.Timers.Timer(DefaultWaitTime * 1000);
_timer.Elapsed += OnTimedEvent;
_timer.Enabled = false;
}
diff --git a/PlexServerAutoUpdater-net10.csproj b/PlexServerAutoUpdater-net10.csproj
new file mode 100644
index 0000000..06b62fd
--- /dev/null
+++ b/PlexServerAutoUpdater-net10.csproj
@@ -0,0 +1,21 @@
+
+
+
+ WinExe
+ net10.0-windows
+ PlexServerAutoUpdater
+ disable
+ true
+ enable
+ Plex Service Auto Updater
+ 0.3.0.0
+ 0.3.0.0
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/PlexServerAutoUpdater.sln b/PlexServerAutoUpdater.sln
index c6f8f49..1c806f3 100644
--- a/PlexServerAutoUpdater.sln
+++ b/PlexServerAutoUpdater.sln
@@ -1,8 +1,9 @@
-Microsoft Visual Studio Solution File, Format Version 11.00
-# Visual Studio 2010
-# SharpDevelop 5.1
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PlexServerAutoUpdater", "PlexServerAutoUpdater.csproj", "{5E327EE8-620A-4945-81CE-029CE9448171}"
+Microsoft Visual Studio Solution File, Format Version 12.00
+# Visual Studio Version 18
+VisualStudioVersion = 18.3.11206.111
+MinimumVisualStudioVersion = 10.0.40219.1
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PlexServerAutoUpdater-net10", "PlexServerAutoUpdater-net10.csproj", "{C0DA8A85-CCC6-A879-0926-9A3280D319EB}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
@@ -10,9 +11,15 @@ Global
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
- {5E327EE8-620A-4945-81CE-029CE9448171}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {5E327EE8-620A-4945-81CE-029CE9448171}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {5E327EE8-620A-4945-81CE-029CE9448171}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {5E327EE8-620A-4945-81CE-029CE9448171}.Release|Any CPU.Build.0 = Release|Any CPU
+ {C0DA8A85-CCC6-A879-0926-9A3280D319EB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {C0DA8A85-CCC6-A879-0926-9A3280D319EB}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {C0DA8A85-CCC6-A879-0926-9A3280D319EB}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {C0DA8A85-CCC6-A879-0926-9A3280D319EB}.Release|Any CPU.Build.0 = Release|Any CPU
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+ GlobalSection(ExtensibilityGlobals) = postSolution
+ SolutionGuid = {234DC311-F4B2-495A-B034-B09F513121C7}
EndGlobalSection
EndGlobal
diff --git a/Properties/AssemblyInfo.cs b/Properties/AssemblyInfo.cs
deleted file mode 100644
index 619553a..0000000
--- a/Properties/AssemblyInfo.cs
+++ /dev/null
@@ -1,29 +0,0 @@
-#region Using directives
-using System;
-using System.Reflection;
-using System.Runtime.InteropServices;
-
-#endregion
-// General Information about an assembly is controlled through the following
-// set of attributes. Change these attribute values to modify the information
-// associated with an assembly.
-[assembly: AssemblyTitle ("PlexServerAutoUpdater")]
-[assembly: AssemblyDescription("Updates the Plex Server when it is run as a service.")]
-[assembly: AssemblyConfiguration ("")]
-[assembly: AssemblyCompany ("")]
-[assembly: AssemblyProduct ("PlexServerAutoUpdater")]
-[assembly: AssemblyCopyright("Copyright 2021")]
-[assembly: AssemblyTrademark ("")]
-[assembly: AssemblyCulture ("")]
-// This sets the default COM visibility of types in the assembly to invisible.
-// If you need to expose a type to COM, use [ComVisible(true)] on that type.
-[assembly: ComVisible (false)]
-// The assembly version has following format :
-//
-// Major.Minor.Build.Revision
-//
-// You can specify all the values or you can use the default the Revision and
-// Build Numbers by using the '*' as shown below:
-[assembly: AssemblyVersion("0.2.1.1")]
-[assembly: AssemblyFileVersion("0.2.1.1")]
-