Skip to content

Commit

Permalink
Resolving assembly loading dependencies.
Browse files Browse the repository at this point in the history
  • Loading branch information
Francisco Nabas committed Jun 21, 2023
1 parent ea25a8a commit 4576cdd
Show file tree
Hide file tree
Showing 19 changed files with 205 additions and 27 deletions.
7 changes: 1 addition & 6 deletions Core/Core.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
</ClCompile>
<Link>
<AdditionalDependencies>Ole32.lib;Msi.lib;User32.lib;WtsApi32.lib;AdvApi32.lib;Shlwapi.lib;Version.lib</AdditionalDependencies>
<AdditionalDependencies>efswrt.lib;Ole32.lib;Msi.lib;User32.lib;WtsApi32.lib;AdvApi32.lib;Shlwapi.lib;Version.lib</AdditionalDependencies>
<GenerateDebugInformation>false</GenerateDebugInformation>
<TargetMachine>MachineX64</TargetMachine>
<AdditionalOptions>/NOENTRY msvcrt.lib /NODEFAULTLIB:nochkclr.obj /INCLUDE:_DllMainCRTStartup %(AdditionalOptions)</AdditionalOptions>
Expand Down Expand Up @@ -191,11 +191,6 @@
<ItemGroup>
<None Include="SystemKnownInformation.mc" />
</ItemGroup>
<ItemGroup>
<Reference Include="System.Management.Automation">
<HintPath>..\..\..\Program Files (x86)\Reference Assemblies\Microsoft\WindowsPowerShell\3.0\System.Management.Automation.dll</HintPath>
</Reference>
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
Expand Down
Binary file modified Core/Release/x64/Core.dll
Binary file not shown.
2 changes: 0 additions & 2 deletions Core/Release/x64/Core.dll.metagen
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@ Assembly Core, Version=1.0.*, Culture=Invariant Language (Invariant Country):
hash=SHA1, flags=PublicKey
Assembly mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089:
hash=None, flags=None
Assembly System.Management.Automation, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35:
hash=None, flags=None
Struct WindowsUtils.Core.Utilities: AutoLayout, AnsiClass, Class, Public, SequentialLayout, Sealed, BeforeFieldInit
:System.ValueType
Struct WindowsUtils.Core.Utilities+_WU_RESOURCE_MESSAGE_TABLE: AutoLayout, AnsiClass, Class, NestedPublic, SequentialLayout, Sealed, BeforeFieldInit
Expand Down
3 changes: 1 addition & 2 deletions Tools/Helpers/Build.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,7 @@ Write-Host 'Copying files...' -ForegroundColor DarkGreen
Copy-Item -Path $copypath -Destination $releaseDir -Force

Write-Host 'Copying CRT libraries...' -ForegroundColor DarkGreen
if (!(Test-Path "$releaseDir\bin")) { [void](mkdir "$releaseDir\bin") }
Copy-Item -Path '.\Tools\Libraries\win-x64\*' -Destination "$releaseDir\bin" -Recurse -Force
Copy-Item -Path '.\Tools\Libraries\win-x64\msvcp140.dll', '.\Tools\Libraries\win-x64\vcruntime140.dll', '.\Tools\Libraries\win-x64\vcruntime140_1.dll' -Destination $releaseDir -Recurse -Force

if (!(Test-Path "$releaseDir\en-us")) { [void](mkdir "$releaseDir\en-us") }
Move-Item "$releaseDir\WindowsUtils.dll-Help.xml" "$releaseDir\en-us\WindowsUtils.dll-Help.xml" -Force
Expand Down
Binary file not shown.
Binary file removed Tools/Libraries/win-x64/concrt140.dll
Binary file not shown.
Binary file modified Tools/Libraries/win-x64/msvcp140.dll
Binary file not shown.
Binary file removed Tools/Libraries/win-x64/msvcp140_1.dll
Binary file not shown.
Binary file removed Tools/Libraries/win-x64/msvcp140_2.dll
Binary file not shown.
Binary file removed Tools/Libraries/win-x64/msvcp140_atomic_wait.dll
Binary file not shown.
Binary file removed Tools/Libraries/win-x64/msvcp140_codecvt_ids.dll
Binary file not shown.
Binary file removed Tools/Libraries/win-x64/vccorlib140.dll
Binary file not shown.
Binary file modified Tools/Libraries/win-x64/vcruntime140.dll
Binary file not shown.
Binary file modified Tools/Libraries/win-x64/vcruntime140_1.dll
Binary file not shown.
2 changes: 1 addition & 1 deletion Tools/PSModule/WindowsUtils.psd1
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
# RequiredModules = @()

# Assemblies that must be loaded prior to importing this module
RequiredAssemblies = @('WindowsUtils.dll', 'Core.dll')
RequiredAssemblies = @('WindowsUtils.dll', 'Core.dll', 'System.Security.Principal.Windows.dll', 'System.Security.AccessControl.dll', 'System.ServiceProcess.ServiceController.dll')

# Script files (.ps1) that are run in the caller's environment prior to importing this module.
# ScriptsToProcess = @()
Expand Down
4 changes: 2 additions & 2 deletions WindowsUtils.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<TargetFramework>netstandard2.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<Version>1.4.1</Version>
<Version>1.6.0</Version>
<Authors>FranciscoNabas</Authors>
<Platforms>x64</Platforms>
<AssemblyName></AssemblyName>
Expand All @@ -26,7 +26,7 @@
</PropertyGroup>

<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<Optimize>True</Optimize>
<Optimize>False</Optimize>
</PropertyGroup>

<ItemGroup>
Expand Down
19 changes: 12 additions & 7 deletions obj/WindowsUtils.csproj.nuget.dgspec.json
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
{
"format": 1,
"restore": {
"c:\\Users\\francisco.nabas\\OneDrive\\Repositories\\WindowsUtils\\WindowsUtils.csproj": {}
"C:\\Repositories\\WindowsUtils\\WindowsUtils.csproj": {}
},
"projects": {
"c:\\Users\\francisco.nabas\\OneDrive\\Repositories\\WindowsUtils\\WindowsUtils.csproj": {
"version": "1.4.1",
"C:\\Repositories\\WindowsUtils\\WindowsUtils.csproj": {
"version": "1.6.0",
"restore": {
"projectUniqueName": "c:\\Users\\francisco.nabas\\OneDrive\\Repositories\\WindowsUtils\\WindowsUtils.csproj",
"projectUniqueName": "C:\\Repositories\\WindowsUtils\\WindowsUtils.csproj",
"projectName": "WindowsUtils",
"projectPath": "c:\\Users\\francisco.nabas\\OneDrive\\Repositories\\WindowsUtils\\WindowsUtils.csproj",
"projectPath": "C:\\Repositories\\WindowsUtils\\WindowsUtils.csproj",
"packagesPath": "C:\\Users\\francisco.nabas\\.nuget\\packages\\",
"outputPath": "c:\\Users\\francisco.nabas\\OneDrive\\Repositories\\WindowsUtils\\obj\\",
"outputPath": "C:\\Repositories\\WindowsUtils\\obj\\",
"projectStyle": "PackageReference",
"configFilePaths": [
"C:\\Users\\francisco.nabas\\AppData\\Roaming\\NuGet\\NuGet.Config",
Expand Down Expand Up @@ -80,7 +80,12 @@
],
"assetTargetFallback": true,
"warn": true,
"runtimeIdentifierGraphPath": "C:\\Program Files\\dotnet\\sdk\\7.0.302\\RuntimeIdentifierGraph.json"
"runtimeIdentifierGraphPath": "C:\\Program Files\\dotnet\\sdk\\7.0.304\\RuntimeIdentifierGraph.json"
}
},
"runtimes": {
"win-x64": {
"#import": []
}
}
}
Expand Down
191 changes: 186 additions & 5 deletions obj/project.assets.json
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,182 @@
"build/XmlDoc2CmdletDoc.targets": {}
}
}
},
".NETStandard,Version=v2.0/win-x64": {
"Microsoft.NETCore.Platforms/1.1.0": {
"type": "package",
"compile": {
"lib/netstandard1.0/_._": {}
},
"runtime": {
"lib/netstandard1.0/_._": {}
}
},
"Microsoft.Win32.Registry/5.0.0": {
"type": "package",
"dependencies": {
"System.Buffers": "4.5.1",
"System.Memory": "4.5.4",
"System.Security.AccessControl": "5.0.0",
"System.Security.Principal.Windows": "5.0.0"
},
"compile": {
"ref/netstandard2.0/Microsoft.Win32.Registry.dll": {
"related": ".xml"
}
},
"runtime": {
"runtimes/win/lib/netstandard2.0/Microsoft.Win32.Registry.dll": {
"related": ".xml"
}
}
},
"NETStandard.Library/2.0.3": {
"type": "package",
"dependencies": {
"Microsoft.NETCore.Platforms": "1.1.0"
},
"compile": {
"lib/netstandard1.0/_._": {}
},
"runtime": {
"lib/netstandard1.0/_._": {}
},
"build": {
"build/netstandard2.0/NETStandard.Library.targets": {}
}
},
"PowerShellStandard.Library/5.1.1": {
"type": "package",
"compile": {
"lib/netstandard2.0/System.Management.Automation.dll": {}
},
"runtime": {
"lib/netstandard2.0/System.Management.Automation.dll": {}
}
},
"System.Buffers/4.5.1": {
"type": "package",
"compile": {
"ref/netstandard2.0/_._": {
"related": ".xml"
}
},
"runtime": {
"lib/netstandard2.0/System.Buffers.dll": {
"related": ".xml"
}
}
},
"System.Diagnostics.EventLog/7.0.0": {
"type": "package",
"dependencies": {
"System.Security.Principal.Windows": "5.0.0"
},
"compile": {
"lib/netstandard2.0/System.Diagnostics.EventLog.dll": {
"related": ".xml"
}
},
"runtime": {
"lib/netstandard2.0/System.Diagnostics.EventLog.dll": {
"related": ".xml"
}
}
},
"System.Memory/4.5.4": {
"type": "package",
"dependencies": {
"System.Buffers": "4.5.1",
"System.Numerics.Vectors": "4.4.0",
"System.Runtime.CompilerServices.Unsafe": "4.5.3"
},
"compile": {
"lib/netstandard2.0/_._": {
"related": ".xml"
}
},
"runtime": {
"lib/netstandard2.0/System.Memory.dll": {
"related": ".xml"
}
}
},
"System.Numerics.Vectors/4.4.0": {
"type": "package",
"compile": {
"ref/netstandard2.0/_._": {
"related": ".xml"
}
},
"runtime": {
"lib/netstandard2.0/System.Numerics.Vectors.dll": {
"related": ".xml"
}
}
},
"System.Runtime.CompilerServices.Unsafe/4.5.3": {
"type": "package",
"compile": {
"ref/netstandard2.0/_._": {
"related": ".xml"
}
},
"runtime": {
"lib/netstandard2.0/System.Runtime.CompilerServices.Unsafe.dll": {
"related": ".xml"
}
}
},
"System.Security.AccessControl/6.0.0": {
"type": "package",
"dependencies": {
"System.Security.Principal.Windows": "5.0.0"
},
"compile": {
"lib/netstandard2.0/System.Security.AccessControl.dll": {
"related": ".xml"
}
},
"runtime": {
"runtimes/win/lib/netstandard2.0/System.Security.AccessControl.dll": {
"related": ".xml"
}
}
},
"System.Security.Principal.Windows/5.0.0": {
"type": "package",
"compile": {
"ref/netstandard2.0/System.Security.Principal.Windows.dll": {
"related": ".xml"
}
},
"runtime": {
"runtimes/win/lib/netstandard1.3/System.Security.Principal.Windows.dll": {}
}
},
"System.ServiceProcess.ServiceController/7.0.1": {
"type": "package",
"dependencies": {
"System.Diagnostics.EventLog": "7.0.0"
},
"compile": {
"lib/netstandard2.0/System.ServiceProcess.ServiceController.dll": {
"related": ".xml"
}
},
"runtime": {
"lib/netstandard2.0/System.ServiceProcess.ServiceController.dll": {
"related": ".xml"
}
}
},
"XmlDoc2CmdletDoc/0.3.0": {
"type": "package",
"build": {
"build/XmlDoc2CmdletDoc.targets": {}
}
}
}
},
"libraries": {
Expand Down Expand Up @@ -708,13 +884,13 @@
"C:\\Users\\francisco.nabas\\.nuget\\packages\\": {}
},
"project": {
"version": "1.4.1",
"version": "1.6.0",
"restore": {
"projectUniqueName": "c:\\Users\\francisco.nabas\\OneDrive\\Repositories\\WindowsUtils\\WindowsUtils.csproj",
"projectUniqueName": "C:\\Repositories\\WindowsUtils\\WindowsUtils.csproj",
"projectName": "WindowsUtils",
"projectPath": "c:\\Users\\francisco.nabas\\OneDrive\\Repositories\\WindowsUtils\\WindowsUtils.csproj",
"projectPath": "C:\\Repositories\\WindowsUtils\\WindowsUtils.csproj",
"packagesPath": "C:\\Users\\francisco.nabas\\.nuget\\packages\\",
"outputPath": "c:\\Users\\francisco.nabas\\OneDrive\\Repositories\\WindowsUtils\\obj\\",
"outputPath": "C:\\Repositories\\WindowsUtils\\obj\\",
"projectStyle": "PackageReference",
"configFilePaths": [
"C:\\Users\\francisco.nabas\\AppData\\Roaming\\NuGet\\NuGet.Config",
Expand Down Expand Up @@ -783,7 +959,12 @@
],
"assetTargetFallback": true,
"warn": true,
"runtimeIdentifierGraphPath": "C:\\Program Files\\dotnet\\sdk\\7.0.302\\RuntimeIdentifierGraph.json"
"runtimeIdentifierGraphPath": "C:\\Program Files\\dotnet\\sdk\\7.0.304\\RuntimeIdentifierGraph.json"
}
},
"runtimes": {
"win-x64": {
"#import": []
}
}
}
Expand Down
4 changes: 2 additions & 2 deletions obj/project.nuget.cache
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"version": 2,
"dgSpecHash": "XhhZFn5nFMn+Z8mvvpxSaWqTO3VpQwrQFijX+Lj+si64yljwU92siEFE8v3K4MMCfJdcD/h4poCo3O7Oc1tQGg==",
"dgSpecHash": "k1a1Ew6zVQ8JCUUaJU2h61nnNBrnYU4tW8W4iAZElj7b9Ndps+BBw4NM8Uv77DOP2qcHUOfpS+81nJRpCGcHtg==",
"success": true,
"projectFilePath": "c:\\Users\\francisco.nabas\\OneDrive\\Repositories\\WindowsUtils\\WindowsUtils.csproj",
"projectFilePath": "C:\\Repositories\\WindowsUtils\\WindowsUtils.csproj",
"expectedPackageFiles": [
"C:\\Users\\francisco.nabas\\.nuget\\packages\\microsoft.netcore.platforms\\1.1.0\\microsoft.netcore.platforms.1.1.0.nupkg.sha512",
"C:\\Users\\francisco.nabas\\.nuget\\packages\\microsoft.win32.registry\\5.0.0\\microsoft.win32.registry.5.0.0.nupkg.sha512",
Expand Down

0 comments on commit 4576cdd

Please sign in to comment.