zer0Kerbal / OhScrap

Scrapyard based part failure mod for Kerbal Space Program.
https://forum.kerbalspaceprogram.com/index.php?/topic/192360-*/
GNU General Public License v2.0
5 stars 10 forks source link

[Bug 🐞]: Lightly borked project file #92

Open keyspace opened 1 year ago

keyspace commented 1 year ago

Brief description of your issue (aka the problem)

After commit ca27df71541dfb56678fe214e2b9cab1e8f92ced, 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)

github-actions[bot] commented 1 year ago

:+1: Thank you @keyspace :octocat:

:question::grey_question:

Have you reviewed the open issues logs and recent changelogs?

In order to help us help you, please provide:

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

:vibration_mode::eyes:Please either watch this repositiory for updates.

:speech_balloon:Kindly read our simple guides to:

keyspace commented 1 year ago

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

keyspace commented 1 year ago

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.

keyspace commented 1 year ago

@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?

zer0Kerbal commented 1 year ago

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"> https://github.com/zer0Kerbal/OhScrap/blob/ca27df71541dfb56678fe214e2b9cab1e8f92ced/source/OhScrap/OhScrap.csproj#L2

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.