- Converted to .NET 5

master apphost-extract
VollRagm 4 years ago
parent 6632081bbb
commit 7de296a9fb

1
.gitignore vendored

@ -336,3 +336,4 @@ ASALocalRun/
# Local History for Visual Studio # Local History for Visual Studio
.localhistory/ .localhistory/
src/apphost-extract/apphost-extract/apphost-extract.csproj.old

@ -18,12 +18,18 @@ namespace apphost_extract
public AppHostFile(FileStream fileStream) public AppHostFile(FileStream fileStream)
{ {
FileStream = fileStream; FileStream = fileStream;
var buffer = new byte[sizeof(int)];
FileStream.Seek(HEADER_OFFSET_PTR, SeekOrigin.Begin);
FileStream.Read(buffer, 0, buffer.Length);
Header = new AppHostFileHeader(FileStream, BitConverter.ToInt32(buffer, 0)); var headerVA = GetHeaderAddress(HEADER_OFFSET_PTR);
Header = new AppHostFileHeader(FileStream, headerVA);
}
public int GetHeaderAddress(int offset)
{
var buffer = new byte[16];
FileStream.Seek(offset, SeekOrigin.Begin);
FileStream.Read(buffer, 0, buffer.Length);
return BitConverter.ToInt32(buffer, 0);
} }

@ -17,7 +17,7 @@ namespace apphost_extract
public AppHostManifest Manifest { get; set; } public AppHostManifest Manifest { get; set; }
public AppHostFileHeader(FileStream File, int HeaderOffset) public AppHostFileHeader(FileStream File, long HeaderOffset)
{ {
File.Seek(HeaderOffset, SeekOrigin.Begin); File.Seek(HeaderOffset, SeekOrigin.Begin);
byte[] headerBuffer = new byte[HEADER_SIZE]; byte[] headerBuffer = new byte[HEADER_SIZE];

@ -1,59 +1,15 @@
<?xml version="1.0" encoding="utf-8"?> <Project Sdk="Microsoft.NET.Sdk">
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup> <PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> <TargetFramework>net5.0</TargetFramework>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{150E6D0D-598E-40E7-B7DD-3941F31E5C63}</ProjectGuid>
<OutputType>Exe</OutputType> <OutputType>Exe</OutputType>
<RootNamespace>apphost_extract</RootNamespace> <RootNamespace>apphost_extract</RootNamespace>
<AssemblyName>apphost-extract</AssemblyName> <GenerateAssemblyInfo>false</GenerateAssemblyInfo>
<TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
<Deterministic>true</Deterministic>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugType>none</DebugType> <DebugType>none</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<Reference Include="System" /> <PackageReference Include="Microsoft.CSharp" Version="4.7.0" />
<Reference Include="System.Core" /> <PackageReference Include="System.Data.DataSetExtensions" Version="4.5.0" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Data" />
<Reference Include="System.Net.Http" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="AppHostFile.cs" />
<Compile Include="AppHostFileEntry.cs" />
<Compile Include="AppHostFileHeader.cs" />
<Compile Include="AppHostManifest.cs" />
<Compile Include="Log.cs" />
<Compile Include="Program.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<ItemGroup>
<None Include="App.config" />
</ItemGroup> </ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project> </Project>
Loading…
Cancel
Save