Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: MSBuild BaseIntermediateOutputPath and unity files exclude #186

Open
wants to merge 11 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion .props
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,7 @@
<Copyright>Unordinal AB</Copyright>
<Description>DarkRift Networking - High Performance Networking Library for .NET and Unity Games</Description>
</PropertyGroup>
</Project>
<PropertyGroup>
<DefaultItemExcludes>$(DefaultItemExcludes);**/*.meta;**/*.asmdef</DefaultItemExcludes>
</PropertyGroup>
</Project>
7 changes: 1 addition & 6 deletions DarkRift.Client/DarkRift.Client.csproj
Original file line number Diff line number Diff line change
@@ -1,16 +1,11 @@
<Project Sdk="Microsoft.NET.Sdk">
<!-- Import global props (must be done here for Version to have effect on class libraries) -->
<Import Project="$(ProjectDir)..\.props" />

<PropertyGroup>
<TargetFrameworks Condition=" '$(DRBuildMode)' != 'coreonly' ">net3.5;netstandard2.0</TargetFrameworks>
<TargetFrameworks Condition=" '$(DRBuildMode)' == 'coreonly' ">netstandard2.0</TargetFrameworks>
<DocumentationFile>$(OutDir)\$(Configuration)\$(TargetFramework)\DarkRift.Client.xml</DocumentationFile>
<Configurations>Debug;Release</Configurations>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<BaseOutputPath>$(ProjectDir)..\..\unordinal\dr-build\$(MSBuildProjectName)\bin\</BaseOutputPath>
<BaseIntermediateOutputPath>$(ProjectDir)..\..\unordinal\dr-build\$(MSBuildProjectName)\obj\</BaseIntermediateOutputPath>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
</PropertyGroup>

<PropertyGroup Condition=" '$(TargetFramework)' == 'net3.5' ">
Expand Down
5 changes: 0 additions & 5 deletions DarkRift.Server.Console/DarkRift.Server.Console.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
<Project Sdk="Microsoft.NET.Sdk">
<!-- Import global props -->
<Import Project="$(ProjectDir)..\.props" />

<PropertyGroup>
<TargetFrameworks Condition=" '$(DRBuildMode)' != 'coreonly' ">net4.0;netcoreapp2.0;netcoreapp3.1;net5.0;net6.0</TargetFrameworks>
<TargetFrameworks Condition=" '$(DRBuildMode)' == 'coreonly' ">netcoreapp2.0;netcoreapp3.1;net5.0;net6.0</TargetFrameworks>
Expand All @@ -14,8 +11,6 @@
<!-- Don't generate a Windows exe, it doesn't work with our packing into ./lib -->
<!-- TODO https://github.com/nulastudio/NetCoreBeauty? -->
<UseAppHost>false</UseAppHost>
<BaseOutputPath>$(ProjectDir)..\..\unordinal\dr-build\$(MSBuildProjectName)\bin\</BaseOutputPath>
<BaseIntermediateOutputPath>$(ProjectDir)..\..\unordinal\dr-build\$(MSBuildProjectName)\obj\</BaseIntermediateOutputPath>
</PropertyGroup>

<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
Expand Down
5 changes: 0 additions & 5 deletions DarkRift.Server.Testing/DarkRift.Server.Testing.csproj
Original file line number Diff line number Diff line change
@@ -1,16 +1,11 @@
<Project Sdk="Microsoft.NET.Sdk">
<!-- Import global props (must be done here for Version to have effect on class libraries) -->
<Import Project="$(ProjectDir)..\.props" />

<PropertyGroup>
<TargetFrameworks Condition=" '$(DRBuildMode)' != 'coreonly' ">net4.5;net6.0</TargetFrameworks>
<TargetFrameworks Condition=" '$(DRBuildMode)' == 'coreonly' ">net6.0</TargetFrameworks>
<Configurations>Debug;Release</Configurations>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<!-- MSTest.TestAdapter package is for .NET Framework 4.6.1 so throws errors on .NET Standard build -->
<NoWarn>NU1701</NoWarn>
<BaseOutputPath>$(ProjectDir)..\..\unordinal\dr-build\$(MSBuildProjectName)\bin\</BaseOutputPath>
<BaseIntermediateOutputPath>$(ProjectDir)..\..\unordinal\dr-build\$(MSBuildProjectName)\obj\</BaseIntermediateOutputPath>
</PropertyGroup>

<ItemGroup>
Expand Down
7 changes: 1 addition & 6 deletions DarkRift.Server/DarkRift.Server.csproj
Original file line number Diff line number Diff line change
@@ -1,16 +1,11 @@
<Project Sdk="Microsoft.NET.Sdk">
<!-- Import global props (must be done here for Version to have effect on class libraries) -->
<Import Project="$(ProjectDir)..\.props" />

<PropertyGroup>
<TargetFrameworks Condition=" '$(DRBuildMode)' != 'coreonly' ">net3.5;netstandard2.0</TargetFrameworks>
<TargetFrameworks Condition=" '$(DRBuildMode)' == 'coreonly' ">netstandard2.0</TargetFrameworks>
<DocumentationFile>$(OutDir)\$(Configuration)\$(TargetFramework)\DarkRift.Server.xml</DocumentationFile>
<Configurations>Debug;Release</Configurations>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<BaseOutputPath>$(ProjectDir)..\..\unordinal\dr-build\$(MSBuildProjectName)\bin\</BaseOutputPath>
<BaseIntermediateOutputPath>$(ProjectDir)..\..\unordinal\dr-build\$(MSBuildProjectName)\obj\</BaseIntermediateOutputPath>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
</PropertyGroup>

<PropertyGroup Condition=" '$(TargetFramework)' == 'net3.5' ">
Expand Down
5 changes: 0 additions & 5 deletions DarkRift.SystemTesting/DarkRift.SystemTesting.csproj
Original file line number Diff line number Diff line change
@@ -1,15 +1,10 @@
<Project Sdk="Microsoft.NET.Sdk">
<!-- Import global props (must be done here for Version to have effect on class libraries) -->
<Import Project="$(ProjectDir)..\.props" />

<PropertyGroup>
<TargetFrameworks>net6.0</TargetFrameworks>
<Configurations>Debug;Release</Configurations>
<IsTestProject>true</IsTestProject>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<IsPackable>false</IsPackable>
<BaseOutputPath>$(ProjectDir)..\..\unordinal\dr-build\$(MSBuildProjectName)\bin\</BaseOutputPath>
<BaseIntermediateOutputPath>$(ProjectDir)..\..\unordinal\dr-build\$(MSBuildProjectName)\obj\</BaseIntermediateOutputPath>
</PropertyGroup>

<ItemGroup>
Expand Down
5 changes: 0 additions & 5 deletions DarkRift.Testing/DarkRift.Testing.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
<Project Sdk="Microsoft.NET.Sdk">
<!-- Import global props (must be done here for Version to have effect on class libraries) -->
<Import Project="$(ProjectDir)..\.props" />

<PropertyGroup>
<TargetFrameworks Condition=" '$(DRBuildMode)' != 'coreonly' ">net4.5;net6.0</TargetFrameworks>
<TargetFrameworks Condition=" '$(DRBuildMode)' == 'coreonly' ">net6.0</TargetFrameworks>
Expand All @@ -10,8 +7,6 @@
<!-- MSTest.TestAdapter package is for .NET Framework 4.6.1 so throws errors on .NET Standard build -->
<NoWarn>NU1701</NoWarn>
<IsPackable>false</IsPackable>
<BaseOutputPath>$(ProjectDir)..\..\unordinal\dr-build\$(MSBuildProjectName)\bin\</BaseOutputPath>
<BaseIntermediateOutputPath>$(ProjectDir)..\..\unordinal\dr-build\$(MSBuildProjectName)\obj\</BaseIntermediateOutputPath>
</PropertyGroup>

<ItemGroup>
Expand Down
11 changes: 3 additions & 8 deletions DarkRift/DarkRift.csproj
Original file line number Diff line number Diff line change
@@ -1,17 +1,12 @@
<Project Sdk="Microsoft.NET.Sdk">
<!-- Import global props (must be done here for Version to have effect on class libraries) -->
<Import Project="$(ProjectDir)..\.props" />

<PropertyGroup>
<TargetFrameworks Condition=" '$(DRBuildMode)' != 'coreonly' ">net3.5;netstandard2.0</TargetFrameworks>
<TargetFrameworks Condition=" '$(DRBuildMode)' == 'coreonly' ">netstandard2.0</TargetFrameworks>
<DocumentationFile>$(OutDir)\$(Configuration)\$(TargetFramework)\DarkRift.xml</DocumentationFile>
<Configurations>Debug;Release</Configurations>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<BaseOutputPath>$(ProjectDir)..\..\unordinal\dr-build\$(MSBuildProjectName)\bin\</BaseOutputPath>
<BaseIntermediateOutputPath>$(ProjectDir)..\..\unordinal\dr-build\$(MSBuildProjectName)\obj\</BaseIntermediateOutputPath>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
</PropertyGroup>

<PropertyGroup Condition=" '$(TargetFramework)' == 'net3.5' ">
Expand All @@ -25,8 +20,8 @@
<PropertyGroup Condition="'$(Configuration)'=='Debug'">
<DefineConstants>DEBUG;TRACE</DefineConstants>
</PropertyGroup>

<ItemGroup>
<None Include="..\README.md" Pack="true" PackagePath=""/>
<None Include="..\README.md" Pack="true" PackagePath="" />
</ItemGroup>
</Project>
2 changes: 1 addition & 1 deletion DarkRift/Dispatching/FunctionDispatcherTask.cs
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ internal override void Execute(bool synchronous)
catch (Exception e)
{
SetTaskFailed(e);
throw new DispatcherException("An exception occurred whilst running a dispatcher task. See inner exception for more details.", e); ;
throw new DispatcherException("An exception occurred whilst running a dispatcher task. See inner exception for more details.", e);
}

SetTaskComplete(synchronous);
Expand Down
1 change: 1 addition & 0 deletions DarkRift2.sln
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution
.props = .props
.targets = .targets
bitbucket-pipelines.yml = bitbucket-pipelines.yml
Directory.Build.props = Directory.Build.props
ReadMe.md = ReadMe.md
DarkRift.Schemas\Server.config.xsd = DarkRift.Schemas\Server.config.xsd
EndProjectSection
Expand Down
16 changes: 16 additions & 0 deletions Directory.Build.props
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<!-- Common properties -->
<PropertyGroup>
<!-- SolutionDir is not defined when building projects explicitly -->
<SolutionDir Condition=" '$(SolutionDir)' == '' ">$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildProjectDirectory), DarkRift2.sln))\</SolutionDir>
<!-- Output paths -->
<BaseIntermediateOutputPath>$(SolutionDir)..\unordinal\dr-build\$(MSBuildProjectName)\obj\</BaseIntermediateOutputPath>
<IntermediateOutputPath>$(SolutionDir)..\unordinal\dr-build\$(MSBuildProjectName)\obj\$(Configuration)</IntermediateOutputPath>
<MSBuildProjectExtensionsPath>$(IntermediateOutputPath)\</MSBuildProjectExtensionsPath>
<BaseOutputPath>$(SolutionDir)..\unordinal\dr-build\$(MSBuildProjectName)\bin\</BaseOutputPath>
<OutDir>$(OutputPath)</OutDir>
</PropertyGroup>

<Import Project="$(SolutionDir)\.props" />
</Project>