- 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
.localhistory/
src/apphost-extract/apphost-extract/apphost-extract.csproj.old

@ -19,11 +19,17 @@ namespace apphost_extract
{
FileStream = fileStream;
var buffer = new byte[sizeof(int)];
FileStream.Seek(HEADER_OFFSET_PTR, SeekOrigin.Begin);
FileStream.Read(buffer, 0, buffer.Length);
var headerVA = GetHeaderAddress(HEADER_OFFSET_PTR);
Header = new AppHostFileHeader(FileStream, headerVA);
}
Header = new AppHostFileHeader(FileStream, BitConverter.ToInt32(buffer, 0));
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 AppHostFileHeader(FileStream File, int HeaderOffset)
public AppHostFileHeader(FileStream File, long HeaderOffset)
{
File.Seek(HeaderOffset, SeekOrigin.Begin);
byte[] headerBuffer = new byte[HEADER_SIZE];

@ -1,59 +1,15 @@
<?xml version="1.0" encoding="utf-8"?>
<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')" />
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{150E6D0D-598E-40E7-B7DD-3941F31E5C63}</ProjectGuid>
<TargetFramework>net5.0</TargetFramework>
<OutputType>Exe</OutputType>
<RootNamespace>apphost_extract</RootNamespace>
<AssemblyName>apphost-extract</AssemblyName>
<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>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugType>none</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Core" />
<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" />
<PackageReference Include="Microsoft.CSharp" Version="4.7.0" />
<PackageReference Include="System.Data.DataSetExtensions" Version="4.5.0" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project>
Loading…
Cancel
Save