- Updated solution to VS2026

- Disabled Excel interop
- Fixed maxDirDepth
This commit is contained in:
2026-05-27 11:06:50 +02:00
parent d5307f04a3
commit 207f7912ad
9 changed files with 95 additions and 9 deletions

View File

@@ -17,7 +17,7 @@ using System.Diagnostics;
using System.Globalization;
using System.Deployment;
using System.Reflection;
using Excel = Microsoft.Office.Interop.Excel;
//using Excel = Microsoft.Office.Interop.Excel;
namespace Permissions
{
@@ -30,7 +30,7 @@ namespace Permissions
string getUserInfo = "sAMAccountName"; // TODO: Make configurable through UI
string ignoreGroupNameBegin = "BUILTIN,LOCAL,NT AUTHORITY,SYSTEM,S-"; // TODO: Make configurable through UI
public static string startFolder = @""; // TODO: Obsolete, remove all references
int maxDirDepth = 5;
int maxDirDepth = 1;
// END CONFIGURATION
string groupNameStripBegin = Environment.UserDomainName + @"\";
@@ -631,6 +631,7 @@ namespace Permissions
}
}
/*
private void saveXLS(string savedFile)
{
CultureInfo oldCI = Thread.CurrentThread.CurrentCulture;
@@ -670,6 +671,7 @@ namespace Permissions
if (oldCI != null)
{ Thread.CurrentThread.CurrentCulture = oldCI; }
}
*/
private void saveCSV(string savedFile)
{
@@ -706,7 +708,7 @@ namespace Permissions
{ maxDirDept_plus = 1; }
maxDirDepth = maxDirDepth + maxDirDept_plus;
maxDirDepth = maxDirDept_plus;
updateDebugInfo("Max dir depth set to:" + maxDirDepth);
@@ -878,7 +880,7 @@ namespace Permissions
if (savedFile.EndsWith(".xls"))
{
updateDebugInfo("Saving as .xls file");
saveXLS(savedFile);
//saveXLS(savedFile);
}
else if (Path.GetExtension(savedFile).ToLower() == ".csv" || Path.GetExtension(savedFile).ToLower() == ".txt")
{

View File

@@ -10,7 +10,7 @@
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>Permissions</RootNamespace>
<AssemblyName>SharePermissions</AssemblyName>
<TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
<TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<ManifestCertificateThumbprint>F310EB7CA93BF5E37B87521DB1AAD8394E53E9D1</ManifestCertificateThumbprint>
<ManifestKeyFile>Permissions_TemporaryKey.pfx</ManifestKeyFile>
@@ -37,6 +37,7 @@
<UseApplicationTrust>false</UseApplicationTrust>
<PublishWizardCompleted>true</PublishWizardCompleted>
<BootstrapperEnabled>true</BootstrapperEnabled>
<TargetFrameworkProfile />
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
@@ -46,6 +47,7 @@
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
@@ -54,6 +56,7 @@
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<PropertyGroup>
<ApplicationIcon>icon.ico</ApplicationIcon>
@@ -108,6 +111,7 @@
<DependentUpon>Resources.resx</DependentUpon>
<DesignTime>True</DesignTime>
</Compile>
<None Include="app.config" />
<None Include="Permissions_TemporaryKey.pfx" />
<None Include="Properties\Settings.settings">
<Generator>SettingsSingleFileGenerator</Generator>

View File

@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="12.0">
<PropertyGroup>
<PublishUrlHistory>publish\</PublishUrlHistory>
@@ -15,4 +15,7 @@
<FallbackCulture>en-US</FallbackCulture>
<VerifyUploadedFiles>false</VerifyUploadedFiles>
</PropertyGroup>
<PropertyGroup>
<EnableSecurityDebugging>false</EnableSecurityDebugging>
</PropertyGroup>
</Project>

View File

@@ -19,7 +19,7 @@ namespace Permissions.Properties {
// class via a tool like ResGen or Visual Studio.
// To add or remove a member, edit your .ResX file then rerun ResGen
// with the /str option, or rebuild your VS project.
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "18.0.0.0")]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
internal class Resources {

View File

@@ -1,7 +1,7 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.34014
// Runtime Version:4.0.30319.42000
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
@@ -12,7 +12,7 @@ namespace Permissions.Properties {
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "12.0.0.0")]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "18.6.0.0")]
internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));

3
Permissions/app.config Normal file
View File

@@ -0,0 +1,3 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.8"/></startup></configuration>