Skip to content

Commit fb4e220

Browse files
committed
Revert "Remove support for legacy csproj files"
This reverts commit 5d58022.
1 parent 0687107 commit fb4e220

File tree

8 files changed

+140
-1
lines changed

8 files changed

+140
-1
lines changed

.github/actions/compile/action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ runs:
6969
- name: Restore Mod Solution
7070
shell: bash
7171
working-directory: ${{ inputs.working-directory }}
72-
run: dotnet restore ${{ inputs.solution-file-path }} ${{ runner.debug && '-v:diagnostic' }}
72+
run: dotnet nuget restore ${{ inputs.solution-file-path }} ${{ runner.debug && '-v:diagnostic' }}
7373

7474
- name: Build Mod Solution
7575
shell: bash

.github/workflows/internal-ci.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,9 @@ jobs:
6060
with:
6161
package-version: ${{ needs.build.outputs.package-version }}
6262

63+
test-plugin-legacy:
64+
uses: './.github/workflows/internal-test-plugin-legacy.yml'
65+
6366
test-assetbundle:
6467
uses: './.github/workflows/internal-test-assetbundle.yml'
6568
if: github.event_name != 'pull_request'
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# This is an internal test for KSPBuildTools and not intended to be used by other projects
2+
name: Test Plugin Mod (Legacy)
3+
4+
on:
5+
workflow_call:
6+
7+
env:
8+
TESTDIR: tests/plugin-mod-legacy
9+
10+
jobs:
11+
build:
12+
runs-on: ubuntu-22.04
13+
steps:
14+
- uses: actions/checkout@v4
15+
16+
- uses: ./.github/actions/setup-ckan
17+
18+
- uses: ./.github/actions/compile
19+
with:
20+
ksp-zip-url: https://github.com/KSPModdingLibs/KSPLibs/raw/main/KSP-1.12.5.zip
21+
working-directory: ${{ env.TESTDIR }}
22+
23+
- uses: ./.github/actions/assemble-release
24+
with:
25+
artifacts: ${{ env.TESTDIR }}/GameData
26+
output-file-name: plugin-mod-legacy

tests/plugin-mod-legacy/.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
packages
2+
obj
3+
bin
4+
GameData
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
2+
Microsoft Visual Studio Solution File, Format Version 12.00
3+
# Visual Studio Version 17
4+
VisualStudioVersion = 17.0.31903.59
5+
MinimumVisualStudioVersion = 10.0.40219.1
6+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "plugin-mod-legacy", "PluginModLegacy\plugin-mod-legacy.csproj", "{F19C7AB4-50C2-4378-9673-CC039CA12E10}"
7+
EndProject
8+
Global
9+
GlobalSection(SolutionConfigurationPlatforms) = preSolution
10+
Debug|Any CPU = Debug|Any CPU
11+
Release|Any CPU = Release|Any CPU
12+
EndGlobalSection
13+
GlobalSection(SolutionProperties) = preSolution
14+
HideSolutionNode = FALSE
15+
EndGlobalSection
16+
GlobalSection(ProjectConfigurationPlatforms) = postSolution
17+
{F19C7AB4-50C2-4378-9673-CC039CA12E10}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
18+
{F19C7AB4-50C2-4378-9673-CC039CA12E10}.Debug|Any CPU.Build.0 = Debug|Any CPU
19+
{F19C7AB4-50C2-4378-9673-CC039CA12E10}.Release|Any CPU.ActiveCfg = Release|Any CPU
20+
{F19C7AB4-50C2-4378-9673-CC039CA12E10}.Release|Any CPU.Build.0 = Release|Any CPU
21+
EndGlobalSection
22+
EndGlobal
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
using System.Reflection;
2+
using System.Runtime.CompilerServices;
3+
4+
// Information about this assembly is defined by the following attributes.
5+
// Change them to the values specific to your project.
6+
[assembly: AssemblyTitle ("PluginModLegacy")]
7+
[assembly: AssemblyDescription ("Test mod using a legacy csproj")]
8+
9+
// This supposedly helps avoid plugin depencency problems.
10+
[assembly: KSPAssembly("plugin-mod-legacy", 1, 2, 3)]
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<packages>
3+
<package id="Krafs.Publicizer" version="1.0.3" targetFramework="net48" developmentDependency="true" />
4+
</packages>
Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3+
<Import Project="$(MSBuildThisFileDirectory)../packages/Krafs.Publicizer.1.0.3/build/Krafs.Publicizer.props" Condition="Exists('$(MSBuildThisFileDirectory)../packages/Krafs.Publicizer.1.0.3/build/Krafs.Publicizer.props')" />
4+
<PropertyGroup>
5+
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
6+
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
7+
<ProjectGuid>{F19C7AB4-50C2-4378-9673-CC039CA12E10}</ProjectGuid>
8+
<OutputType>Library</OutputType>
9+
<RootNamespace>JSI</RootNamespace>
10+
<AssemblyName>PluginModMono</AssemblyName>
11+
<TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
12+
<CodePage>65001</CodePage>
13+
<TargetFrameworkProfile />
14+
<NuGetPackageImportStamp>
15+
</NuGetPackageImportStamp>
16+
</PropertyGroup>
17+
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
18+
<DebugSymbols>true</DebugSymbols>
19+
<DebugType>portable</DebugType>
20+
<Optimize>false</Optimize>
21+
<OutputPath>bin\Debug</OutputPath>
22+
<DefineConstants>DEBUG;</DefineConstants>
23+
<ErrorReport>prompt</ErrorReport>
24+
<WarningLevel>4</WarningLevel>
25+
<ConsolePause>false</ConsolePause>
26+
<PlatformTarget>AnyCPU</PlatformTarget>
27+
<Prefer32Bit>false</Prefer32Bit>
28+
</PropertyGroup>
29+
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
30+
<Optimize>true</Optimize>
31+
<OutputPath>bin\Release</OutputPath>
32+
<ErrorReport>prompt</ErrorReport>
33+
<WarningLevel>4</WarningLevel>
34+
<ConsolePause>false</ConsolePause>
35+
<PlatformTarget>AnyCPU</PlatformTarget>
36+
<Prefer32Bit>false</Prefer32Bit>
37+
<DebugType>portable</DebugType>
38+
<DebugSymbols>true</DebugSymbols>
39+
</PropertyGroup>
40+
<PropertyGroup>
41+
<RunPostBuildEvent>Always</RunPostBuildEvent>
42+
</PropertyGroup>
43+
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Profile|AnyCPU'">
44+
<DebugSymbols>true</DebugSymbols>
45+
<OutputPath>bin\Profile\</OutputPath>
46+
<DefineConstants>ENABLE_PROFILER</DefineConstants>
47+
<Optimize>true</Optimize>
48+
<DebugType>portable</DebugType>
49+
<PlatformTarget>AnyCPU</PlatformTarget>
50+
<ErrorReport>prompt</ErrorReport>
51+
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
52+
</PropertyGroup>
53+
<Import Project="$(MSBuildExtensionsPath)/$(MSBuildToolsVersion)\Microsoft.Common.props" />
54+
<Import Project="$(MSBuildThisFileDirectory)../../../KSPCommon.targets" />
55+
<Import Project="$(MSBuildBinPath)/Microsoft.CSharp.targets" />
56+
<ItemGroup>
57+
<Compile Include="Properties/AssemblyInfo.cs"/>
58+
</ItemGroup>
59+
<ItemGroup>
60+
<Publicize Include="Assembly-CSharp" />
61+
</ItemGroup>
62+
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
63+
<PropertyGroup>
64+
<ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
65+
</PropertyGroup>
66+
<Error Condition="!Exists('$(MSBuildThisFileDirectory)../packages/Krafs.Publicizer.1.0.3/build/Krafs.Publicizer.props')" Text="$([System.String]::Format('$(ErrorText)', '$(MSBuildThisFileDirectory)../packages/Krafs.Publicizer.1.0.3/build/Krafs.Publicizer.props'))" />
67+
<Error Condition="!Exists('$(MSBuildThisFileDirectory)../packages/Krafs.Publicizer.1.0.3/build/Krafs.Publicizer.targets')" Text="$([System.String]::Format('$(ErrorText)', '$(MSBuildThisFileDirectory)../packages/Krafs.Publicizer.1.0.3/build/Krafs.Publicizer.targets'))" />
68+
</Target>
69+
<Import Project="$(MSBuildThisFileDirectory)../packages/Krafs.Publicizer.1.0.3/build/Krafs.Publicizer.targets" Condition="Exists('$(MSBuildThisFileDirectory)packages/Krafs.Publicizer.1.0.3/build/Krafs.Publicizer.targets')" />
70+
</Project>

0 commit comments

Comments
 (0)