Skip to content

Commit 7caedce

Browse files
author
shiro
committedNov 16, 2019
new csproj format, support for switching between RedM and FiveM references, REDM and FIVEM preprocessor defines
1 parent 62ae9e5 commit 7caedce

File tree

3 files changed

+67
-127
lines changed

3 files changed

+67
-127
lines changed
 

‎MenuAPI.sln

+22-12
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11

22
Microsoft Visual Studio Solution File, Format Version 12.00
33
# Visual Studio Version 16
4-
VisualStudioVersion = 16.0.29509.3
4+
VisualStudioVersion = 16.0.29319.158
55
MinimumVisualStudioVersion = 10.0.40219.1
6-
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MenuAPI", "MenuAPI\MenuAPI.csproj", "{9C746601-9F3D-4B0D-877C-1C7BC493C5BC}"
6+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MenuAPI", "MenuAPI\MenuAPI.csproj", "{9C746601-9F3D-4B0D-877C-1C7BC493C5BC}"
77
EndProject
88
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TestMenu", "TestMenu\TestMenu.csproj", "{A91669DA-E3C1-4DC3-A3A6-97476B17214A}"
99
ProjectSection(ProjectDependencies) = postProject
@@ -12,18 +12,28 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TestMenu", "TestMenu\TestMe
1212
EndProject
1313
Global
1414
GlobalSection(SolutionConfigurationPlatforms) = preSolution
15-
Debug|Any CPU = Debug|Any CPU
16-
Release|Any CPU = Release|Any CPU
15+
Debug FiveM|Any CPU = Debug FiveM|Any CPU
16+
Debug RedM|Any CPU = Debug RedM|Any CPU
17+
Release FiveM|Any CPU = Release FiveM|Any CPU
18+
Release RedM|Any CPU = Release RedM|Any CPU
1719
EndGlobalSection
1820
GlobalSection(ProjectConfigurationPlatforms) = postSolution
19-
{9C746601-9F3D-4B0D-877C-1C7BC493C5BC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
20-
{9C746601-9F3D-4B0D-877C-1C7BC493C5BC}.Debug|Any CPU.Build.0 = Debug|Any CPU
21-
{9C746601-9F3D-4B0D-877C-1C7BC493C5BC}.Release|Any CPU.ActiveCfg = Release|Any CPU
22-
{9C746601-9F3D-4B0D-877C-1C7BC493C5BC}.Release|Any CPU.Build.0 = Release|Any CPU
23-
{A91669DA-E3C1-4DC3-A3A6-97476B17214A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
24-
{A91669DA-E3C1-4DC3-A3A6-97476B17214A}.Debug|Any CPU.Build.0 = Debug|Any CPU
25-
{A91669DA-E3C1-4DC3-A3A6-97476B17214A}.Release|Any CPU.ActiveCfg = Release|Any CPU
26-
{A91669DA-E3C1-4DC3-A3A6-97476B17214A}.Release|Any CPU.Build.0 = Release|Any CPU
21+
{9C746601-9F3D-4B0D-877C-1C7BC493C5BC}.Debug FiveM|Any CPU.ActiveCfg = Debug FiveM|Any CPU
22+
{9C746601-9F3D-4B0D-877C-1C7BC493C5BC}.Debug FiveM|Any CPU.Build.0 = Debug FiveM|Any CPU
23+
{9C746601-9F3D-4B0D-877C-1C7BC493C5BC}.Debug RedM|Any CPU.ActiveCfg = Debug RedM|Any CPU
24+
{9C746601-9F3D-4B0D-877C-1C7BC493C5BC}.Debug RedM|Any CPU.Build.0 = Debug RedM|Any CPU
25+
{9C746601-9F3D-4B0D-877C-1C7BC493C5BC}.Release FiveM|Any CPU.ActiveCfg = Release FiveM|Any CPU
26+
{9C746601-9F3D-4B0D-877C-1C7BC493C5BC}.Release FiveM|Any CPU.Build.0 = Release FiveM|Any CPU
27+
{9C746601-9F3D-4B0D-877C-1C7BC493C5BC}.Release RedM|Any CPU.ActiveCfg = Release RedM|Any CPU
28+
{9C746601-9F3D-4B0D-877C-1C7BC493C5BC}.Release RedM|Any CPU.Build.0 = Release RedM|Any CPU
29+
{A91669DA-E3C1-4DC3-A3A6-97476B17214A}.Debug FiveM|Any CPU.ActiveCfg = Debug FiveM|Any CPU
30+
{A91669DA-E3C1-4DC3-A3A6-97476B17214A}.Debug FiveM|Any CPU.Build.0 = Debug FiveM|Any CPU
31+
{A91669DA-E3C1-4DC3-A3A6-97476B17214A}.Debug RedM|Any CPU.ActiveCfg = Debug RedM|Any CPU
32+
{A91669DA-E3C1-4DC3-A3A6-97476B17214A}.Debug RedM|Any CPU.Build.0 = Debug RedM|Any CPU
33+
{A91669DA-E3C1-4DC3-A3A6-97476B17214A}.Release FiveM|Any CPU.ActiveCfg = Release FiveM|Any CPU
34+
{A91669DA-E3C1-4DC3-A3A6-97476B17214A}.Release FiveM|Any CPU.Build.0 = Release FiveM|Any CPU
35+
{A91669DA-E3C1-4DC3-A3A6-97476B17214A}.Release RedM|Any CPU.ActiveCfg = Release RedM|Any CPU
36+
{A91669DA-E3C1-4DC3-A3A6-97476B17214A}.Release RedM|Any CPU.Build.0 = Release RedM|Any CPU
2737
EndGlobalSection
2838
GlobalSection(SolutionProperties) = preSolution
2939
HideSolutionNode = FALSE

‎MenuAPI/MenuAPI.csproj

+23-58
Original file line numberDiff line numberDiff line change
@@ -1,66 +1,31 @@
1-
<?xml version="1.0" encoding="utf-8"?>
2-
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3-
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
1+
<Project Sdk="Microsoft.NET.Sdk">
2+
43
<PropertyGroup>
5-
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
6-
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
7-
<ProjectGuid>{9C746601-9F3D-4B0D-877C-1C7BC493C5BC}</ProjectGuid>
8-
<OutputType>Library</OutputType>
9-
<AppDesignerFolder>Properties</AppDesignerFolder>
10-
<RootNamespace>MenuAPI</RootNamespace>
11-
<AssemblyName>MenuAPI</AssemblyName>
12-
<TargetFrameworkVersion>v4.5.2</TargetFrameworkVersion>
13-
<FileAlignment>512</FileAlignment>
14-
<Deterministic>true</Deterministic>
15-
</PropertyGroup>
16-
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
17-
<DebugSymbols>true</DebugSymbols>
4+
<TargetFramework>net452</TargetFramework>
185
<DebugType>embedded</DebugType>
19-
<Optimize>false</Optimize>
20-
<OutputPath>bin\Debug\</OutputPath>
21-
<DefineConstants>DEBUG;TRACE</DefineConstants>
22-
<ErrorReport>prompt</ErrorReport>
23-
<WarningLevel>4</WarningLevel>
6+
<TargetName>$(AssemblyName).net</TargetName>
7+
<Configurations>Release RedM;Release FiveM;Debug RedM;Debug FiveM</Configurations>
248
</PropertyGroup>
25-
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
26-
<DebugType>embedded</DebugType>
27-
<Optimize>true</Optimize>
28-
<OutputPath>bin\Release\</OutputPath>
29-
<DefineConstants>TRACE</DefineConstants>
30-
<ErrorReport>prompt</ErrorReport>
31-
<WarningLevel>4</WarningLevel>
32-
<DebugSymbols>true</DebugSymbols>
9+
10+
<PropertyGroup
11+
Condition="'$(Configuration)' == 'Debug FiveM' Or '$(Configuration)' == 'Release FiveM'">
12+
<DefineConstants>FIVEM</DefineConstants>
13+
</PropertyGroup>
14+
15+
<PropertyGroup
16+
Condition="'$(Configuration)' == 'Debug RedM' Or '$(Configuration)' == 'Release RedM'">
17+
<DefineConstants>REDM</DefineConstants>
3318
</PropertyGroup>
19+
3420
<ItemGroup>
35-
<Reference Include="System" />
36-
<Reference Include="System.Core" />
37-
<Reference Include="System.Drawing" />
38-
<Reference Include="System.Xml.Linq" />
39-
<Reference Include="System.Data.DataSetExtensions" />
4021
<Reference Include="Microsoft.CSharp" />
41-
<Reference Include="System.Data" />
42-
<Reference Include="System.Net.Http" />
43-
<Reference Include="System.Xml" />
44-
</ItemGroup>
45-
<ItemGroup>
46-
<Compile Include="items\MenuCheckboxItem.cs" />
47-
<Compile Include="items\MenuDynamicListItem.cs" />
48-
<Compile Include="items\MenuItem.cs" />
49-
<Compile Include="items\MenuListItem.cs" />
50-
<Compile Include="items\MenuSliderItem.cs" />
51-
<Compile Include="MenuController.cs" />
52-
<Compile Include="Menu.cs" />
53-
<Compile Include="Properties\AssemblyInfo.cs" />
22+
23+
<PackageReference Include="CitizenFX.Core.Client" Version="1.0.1688" Condition="'$(Configuration)' == 'Release FiveM' Or '$(Configuration)' == 'Debug FiveM'" />
24+
25+
<!-- currently hardcoded path as no nuget package for RedM exists yet -->
26+
<Reference Include="CitizenFX.Core.Client" Condition="'$(Configuration)' == 'Release RedM' Or '$(Configuration)' == 'Debug RedM'">
27+
<HintPath>..\..\..\..\citizen\clr2\lib\mono\4.5\citizenfx.core.dll</HintPath>
28+
</Reference>
5429
</ItemGroup>
55-
<ItemGroup>
56-
<PackageReference Include="CitizenFX.Core.Client">
57-
<Version>1.0.1688</Version>
58-
<ExcludeAssets>runtime</ExcludeAssets>
59-
<IncludeAssets>compile; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
60-
</PackageReference>
61-
</ItemGroup>
62-
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
63-
<PropertyGroup>
64-
<PostBuildEvent>if exist "$(SolutionDir)\postbuild.cmd" "$(SolutionDir)\postbuild.cmd"</PostBuildEvent>
65-
</PropertyGroup>
30+
6631
</Project>

‎TestMenu/TestMenu.csproj

+22-57
Original file line numberDiff line numberDiff line change
@@ -1,64 +1,29 @@
1-
<?xml version="1.0" encoding="utf-8"?>
2-
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3-
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
1+
<Project Sdk="Microsoft.NET.Sdk">
2+
43
<PropertyGroup>
5-
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
6-
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
7-
<ProjectGuid>{A91669DA-E3C1-4DC3-A3A6-97476B17214A}</ProjectGuid>
8-
<OutputType>Library</OutputType>
9-
<AppDesignerFolder>Properties</AppDesignerFolder>
10-
<RootNamespace>TestMenu</RootNamespace>
11-
<AssemblyName>TestMenu.net</AssemblyName>
12-
<TargetFrameworkVersion>v4.5.2</TargetFrameworkVersion>
13-
<FileAlignment>512</FileAlignment>
14-
<Deterministic>true</Deterministic>
15-
</PropertyGroup>
16-
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
17-
<DebugSymbols>true</DebugSymbols>
18-
<DebugType>embedded</DebugType>
19-
<Optimize>false</Optimize>
20-
<OutputPath>bin\Debug\</OutputPath>
21-
<DefineConstants>DEBUG;TRACE</DefineConstants>
22-
<ErrorReport>prompt</ErrorReport>
23-
<WarningLevel>4</WarningLevel>
24-
</PropertyGroup>
25-
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
4+
<TargetFramework>net452</TargetFramework>
265
<DebugType>embedded</DebugType>
27-
<Optimize>true</Optimize>
28-
<OutputPath>bin\Release\</OutputPath>
29-
<DefineConstants>TRACE</DefineConstants>
30-
<ErrorReport>prompt</ErrorReport>
31-
<WarningLevel>4</WarningLevel>
32-
<DebugSymbols>true</DebugSymbols>
6+
<TargetName>$(AssemblyName).net</TargetName>
7+
<Configurations>Release RedM;Release FiveM;Debug RedM;Debug FiveM</Configurations>
338
</PropertyGroup>
9+
3410
<ItemGroup>
35-
<Reference Include="System" />
36-
<Reference Include="System.Core" />
37-
<Reference Include="System.Drawing" />
38-
<Reference Include="System.Xml.Linq" />
39-
<Reference Include="System.Data.DataSetExtensions" />
4011
<Reference Include="Microsoft.CSharp" />
41-
<Reference Include="System.Data" />
42-
<Reference Include="System.Net.Http" />
43-
<Reference Include="System.Xml" />
44-
</ItemGroup>
45-
<ItemGroup>
46-
<Compile Include="ExampleMenu.cs" />
47-
<Compile Include="Properties\AssemblyInfo.cs" />
48-
</ItemGroup>
49-
<ItemGroup>
50-
<PackageReference Include="CitizenFX.Core.Client">
51-
<Version>1.0.1688</Version>
52-
<ExcludeAssets>runtime</ExcludeAssets>
53-
<IncludeAssets>compile; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
54-
</PackageReference>
55-
</ItemGroup>
56-
<ItemGroup>
57-
<ProjectReference Include="..\MenuAPI\MenuAPI.csproj">
58-
<Project>{9c746601-9f3d-4b0d-877c-1c7bc493c5bc}</Project>
59-
<Name>MenuAPI</Name>
60-
<Private>False</Private>
61-
</ProjectReference>
12+
13+
<ProjectReference
14+
Include="..\MenuAPI\MenuAPI.csproj" />
15+
16+
<PackageReference
17+
Include="CitizenFX.Core.Client"
18+
Version="1.0.1688"
19+
Condition="'$(Configuration)' == 'Release FiveM' Or '$(Configuration)' == 'Debug FiveM'" />
20+
21+
<!-- currently hardcoded path as no nuget package for RedM exists yet -->
22+
<Reference
23+
Include="CitizenFX.Core.Client"
24+
Condition="'$(Configuration)' == 'Release RedM' Or '$(Configuration)' == 'Debug RedM'">
25+
<HintPath>..\..\..\..\citizen\clr2\lib\mono\4.5\citizenfx.core.dll</HintPath>
26+
</Reference>
6227
</ItemGroup>
63-
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
28+
6429
</Project>

0 commit comments

Comments
 (0)
Please sign in to comment.