OhScrap! (OHS) by severedsolo

OhScrap! (OHS) by severedsolo

3.6k Downloads

[Bug 🐞]: Lightly borked project file

keyspace opened this issue Β· 5 comments

commented

Brief description of your issue (aka the problem)

After commit ca27df7, the solution cannot be opened in either MSVS 2019 or 2022:

C:\Users\keysp\source\repos\OhScrap\source\OhScrap\OhScrap.csproj : error  : The project file could not be loaded. The 'ItemGroup' start tag on line 41 position 4 does not match the end tag of 'Reference'. Line 58, position 7.  C:\Users\keysp\source\repos\OhScrap\source\OhScrap\OhScrap.csproj

There is a stray </Reference> closing tag where the previous tag already has an inline close.

Removing the stray allows opening the project/solution.

Operating system

No response

KSP version

N/A

Version of addon

git master

Steps to reproduce the behavior or issue

  1. Clone the repo.
  2. Launch the solution.

Expected behavior

Solution opens.

Actual behavior

Error as outlined.

Environment

N/A

Log files

No response

Screenshots

No response

Additional context

No response

How did you download and install this?

GitHub clone (expert manual installation)

commented

πŸ‘ Thank you @keyspace :octocat:

❓❔

Have you reviewed the open issues logs and recent changelogs?

In order to help us help you, please provide:

  • <KSP_ROOT>/KSP.LOG
  • and one of the following:
    • if Module Manger is installed
      • <KSP_ROOT>/GameData/ModuleManager.ConfigCache
    • if Module Manger /L is installed
      • <KSP_ROOT>/PluginData\ModuleManager\ConfigCache.cfg
  • Screenshots of issue (if appropriate) (images tell a much stronger tale)

You can archive these files (rar or zip, sadly no 7zip) and drag-n-drop them into an issue comment

πŸ“³πŸ‘€Please either watch this repositiory for updates.

πŸ’¬Kindly read our simple guides to:

commented

Not sure if intended, but the same commit changed <TargetFrameworkVersion> to v3.5, which makes the solution impossible to compile for me.

commented

For anyone wanting to build right now:

Removing the stray line, changing .NET back to v4.7.2 (and leaving the pre/post build hooks in Project->Properties->Build Events, i.e. not heeding Microsoft's security warning) allows the solution to be built.

The post-hook will fail, since the deploy scripts are not in the repo (IMO that's good). The pre-hook is required, as otherwise version information will not be populated, and building will fail with a cryptic error referencing Version.Text.


Also, set K112 environment variable to C:\Program Files (x86)\Steam\steamapps\common\Kerbal Space Program\KSP_x64_Data\Managed\, or wherever the .dlls are. Yes, trailing backslash.

commented

@Lisias - sorry to ping.

You're the author of the borked commit, and have write access. I've posted PR #93 to fix this. It's a three-liner.

Could you review?

commented

Thank you @keyspace !

Not sure if intended, but the same commit changed <TargetFrameworkVersion> to v3.5, which makes the solution impossible to compile for me.
In order to compile against .NET 3.5. the following line needs to read: <Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">

<Project ToolsVersion="17.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">

Also, set K112 environment variable to C:\Program Files (x86)\Steam\steamapps\common\Kerbal Space Program\KSP_x64_Data\Managed\, or wherever the .dlls are. Yes, trailing backslash.

All good - I use environmental variables so I can easily and quickly compile against all major versions of KSP.