remove legacy AssemblyInfo and GlobalAssemblyInfo files, use consistent assembly names

This commit is contained in:
Jesse Plamondon-Willard 2019-08-09 17:47:53 -04:00
parent 49b3dbb38f
commit 25e4aa14d8
No known key found for this signature in database
GPG Key ID: CF8B1456B3E29F49
32 changed files with 49 additions and 123 deletions

View File

@ -1,5 +0,0 @@
using System.Reflection;
[assembly: AssemblyProduct("SMAPI")]
[assembly: AssemblyVersion("3.0.0")]
[assembly: AssemblyFileVersion("3.0.0")]

View File

@ -4,6 +4,9 @@
<!--set properties -->
<PropertyGroup>
<Version>3.0.0</Version>
<Product>SMAPI</Product>
<AssemblySearchPaths>$(AssemblySearchPaths);{GAC}</AssemblySearchPaths>
<DefineConstants Condition="$(OS) == 'Windows_NT'">$(DefineConstants);SMAPI_FOR_WINDOWS</DefineConstants>
</PropertyGroup>

View File

@ -50,7 +50,7 @@ argument | purpose
### Compile flags
SMAPI uses a small number of conditional compilation constants, which you can set by editing the
`<DefineConstants>` element in `StardewModdingAPI.csproj`. Supported constants:
`<DefineConstants>` element in `SMAPI.csproj`. Supported constants:
flag | purpose
---- | -------
@ -71,17 +71,17 @@ your current OS automatically and load the correct references. Compile output wi
### Debugging a local build
Rebuilding the solution in debug mode will copy the SMAPI files into your game folder. Starting
the `StardewModdingAPI` project with debugging from Visual Studio (on Mac or Windows) will launch
SMAPI with the debugger attached, so you can intercept errors and step through the code being
executed. This doesn't work in MonoDevelop on Linux, unfortunately.
the `SMAPI` project with debugging from Visual Studio (on Mac or Windows) will launch SMAPI with
the debugger attached, so you can intercept errors and step through the code being executed. This
doesn't work in MonoDevelop on Linux, unfortunately.
### Preparing a release
To prepare a crossplatform SMAPI release, you'll need to compile it on two platforms. See
[crossplatforming info](https://stardewvalleywiki.com/Modding:Modder_Guide/Test_and_Troubleshoot#Testing_on_all_platforms)
on the wiki for the first-time setup.
1. Update the version number in `GlobalAssemblyInfo.cs` and `Constants::Version`. Make sure you use a
[semantic version](https://semver.org). Recommended format:
1. Update the version number in `.root/build/common.targets` and `Constants::Version`. Make sure
you use a [semantic version](https://semver.org). Recommended format:
build type | format | example
:--------- | :----------------------- | :------

View File

@ -1,4 +0,0 @@
using System.Reflection;
[assembly: AssemblyTitle("SMAPI.Installer")]
[assembly: AssemblyDescription("The SMAPI installer for players.")]

View File

@ -1,10 +1,10 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<RootNamespace>SMAPI.Installer</RootNamespace>
<AssemblyName>SMAPI.Installer</AssemblyName>
<RootNamespace>StardewModdingAPI.Installer</RootNamespace>
<Description>The SMAPI installer for players.</Description>
<TargetFramework>net45</TargetFramework>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
<LangVersion>latest</LangVersion>
<OutputType>Exe</OutputType>
<PlatformTarget>x86</PlatformTarget>
@ -12,10 +12,6 @@
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
</PropertyGroup>
<ItemGroup>
<Compile Include="..\..\build\GlobalAssemblyInfo.cs" Link="Properties\GlobalAssemblyInfo.cs" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\SMAPI.Toolkit\SMAPI.Toolkit.csproj" />
</ItemGroup>

View File

@ -16,4 +16,6 @@
<ProjectReference Include="..\SMAPI.ModBuildConfig.Analyzer\SMAPI.ModBuildConfig.Analyzer.csproj" />
</ItemGroup>
<Import Project="..\..\build\common.targets" />
</Project>

View File

@ -1,4 +0,0 @@
using System.Reflection;
[assembly: AssemblyTitle("SMAPI.ModBuildConfig.Analyzer")]
[assembly: AssemblyDescription("")]

View File

@ -1,17 +1,16 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<AssemblyName>SMAPI.ModBuildConfig.Analyzer</AssemblyName>
<RootNamespace>StardewModdingAPI.ModBuildConfig.Analyzer</RootNamespace>
<Version>3.0.0</Version>
<TargetFramework>netstandard2.0</TargetFramework>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
<LangVersion>latest</LangVersion>
<IncludeBuildOutput>false</IncludeBuildOutput>
<OutputPath>bin</OutputPath>
<LangVersion>latest</LangVersion>
</PropertyGroup>
<ItemGroup>
<Compile Include="..\..\build\GlobalAssemblyInfo.cs" Link="Properties\GlobalAssemblyInfo.cs" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.CodeAnalysis.CSharp.Workspaces" Version="2.10.0" PrivateAssets="all" />
<PackageReference Update="NETStandard.Library" PrivateAssets="all" />

View File

@ -1,6 +0,0 @@
using System.Reflection;
[assembly: AssemblyTitle("SMAPI.ModBuildConfig")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyVersion("3.0.0")]
[assembly: AssemblyFileVersion("3.0.0")]

View File

@ -1,10 +1,10 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<RootNamespace>SMAPI.ModBuildConfig</RootNamespace>
<AssemblyName>SMAPI.ModBuildConfig</AssemblyName>
<RootNamespace>StardewModdingAPI.ModBuildConfig</RootNamespace>
<Version>3.0.0</Version>
<TargetFramework>net45</TargetFramework>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
<LangVersion>latest</LangVersion>
<PlatformTarget>x86</PlatformTarget>
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>

View File

@ -1,4 +0,0 @@
using System.Reflection;
[assembly: AssemblyTitle("SMAPI.Mods.ConsoleCommands")]
[assembly: AssemblyDescription("")]

View File

@ -1,10 +1,9 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<RootNamespace>SMAPI.Mods.ConsoleCommands</RootNamespace>
<AssemblyName>ConsoleCommands</AssemblyName>
<RootNamespace>StardewModdingAPI.Mods.ConsoleCommands</RootNamespace>
<TargetFramework>net45</TargetFramework>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
<LangVersion>latest</LangVersion>
<OutputPath>$(SolutionDir)\..\bin\$(Configuration)\Mods\ConsoleCommands</OutputPath>
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
@ -62,12 +61,6 @@
</Otherwise>
</Choose>
<ItemGroup>
<Compile Include="..\..\build\GlobalAssemblyInfo.cs">
<Link>Properties\GlobalAssemblyInfo.cs</Link>
</Compile>
</ItemGroup>
<ItemGroup>
<None Update="manifest.json">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>

View File

@ -1,4 +0,0 @@
using System.Reflection;
[assembly: AssemblyTitle("StardewModdingAPI.Mods.SaveBackup")]
[assembly: AssemblyDescription("")]

View File

@ -1,10 +1,9 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<RootNamespace>SMAPI.Mods.SaveBackup</RootNamespace>
<AssemblyName>SaveBackup</AssemblyName>
<RootNamespace>StardewModdingAPI.Mods.SaveBackup</RootNamespace>
<TargetFramework>net45</TargetFramework>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
<LangVersion>latest</LangVersion>
<OutputPath>$(SolutionDir)\..\bin\$(Configuration)\Mods\SaveBackup</OutputPath>
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
@ -24,12 +23,6 @@
</Reference>
</ItemGroup>
<ItemGroup>
<Compile Include="..\..\build\GlobalAssemblyInfo.cs">
<Link>Properties\GlobalAssemblyInfo.cs</Link>
</Compile>
</ItemGroup>
<ItemGroup>
<None Update="manifest.json">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>

View File

@ -5,13 +5,15 @@ using System.Linq;
using Moq;
using Newtonsoft.Json;
using NUnit.Framework;
using StardewModdingAPI;
using StardewModdingAPI.Framework;
using StardewModdingAPI.Framework.ModLoading;
using StardewModdingAPI.Toolkit;
using StardewModdingAPI.Toolkit.Framework.ModData;
using StardewModdingAPI.Toolkit.Serialization.Models;
using SemanticVersion = StardewModdingAPI.SemanticVersion;
namespace StardewModdingAPI.Tests.Core
namespace SMAPI.Tests.Core
{
/// <summary>Unit tests for <see cref="ModResolver"/>.</summary>
[TestFixture]

View File

@ -2,10 +2,11 @@ using System;
using System.Collections.Generic;
using System.Linq;
using NUnit.Framework;
using StardewModdingAPI;
using StardewModdingAPI.Framework.ModHelpers;
using StardewValley;
namespace StardewModdingAPI.Tests.Core
namespace SMAPI.Tests.Core
{
/// <summary>Unit tests for <see cref="TranslationHelper"/> and <see cref="Translation"/>.</summary>
[TestFixture]

View File

@ -1,4 +0,0 @@
using System.Reflection;
[assembly: AssemblyTitle("SMAPI.Tests")]
[assembly: AssemblyDescription("")]

View File

@ -1,8 +1,8 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<RootNamespace>SMAPI.Tests</RootNamespace>
<AssemblyName>SMAPI.Tests</AssemblyName>
<RootNamespace>SMAPI.Tests</RootNamespace>
<TargetFramework>net45</TargetFramework>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
<LangVersion>latest</LangVersion>
@ -28,12 +28,6 @@
</Reference>
</ItemGroup>
<ItemGroup>
<Compile Include="..\..\build\GlobalAssemblyInfo.cs">
<Link>Properties\GlobalAssemblyInfo.cs</Link>
</Compile>
</ItemGroup>
<ItemGroup>
<Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
</ItemGroup>

View File

@ -1,6 +1,6 @@
using System;
namespace StardewModdingAPI.Tests
namespace SMAPI.Tests
{
/// <summary>Provides sample values for unit testing.</summary>
internal static class Sample

View File

@ -1,7 +1,7 @@
using NUnit.Framework;
using StardewModdingAPI.Toolkit.Utilities;
namespace StardewModdingAPI.Tests.Toolkit
namespace SMAPI.Tests.Toolkit
{
/// <summary>Unit tests for <see cref="PathUtilities"/>.</summary>
[TestFixture]

View File

@ -6,7 +6,7 @@ using System.Text.RegularExpressions;
using NUnit.Framework;
using StardewModdingAPI.Utilities;
namespace StardewModdingAPI.Tests.Utilities
namespace SMAPI.Tests.Utilities
{
/// <summary>Unit tests for <see cref="SDate"/>.</summary>
[TestFixture]

View File

@ -2,9 +2,10 @@ using System;
using System.Diagnostics.CodeAnalysis;
using Newtonsoft.Json;
using NUnit.Framework;
using StardewModdingAPI;
using StardewModdingAPI.Framework;
namespace StardewModdingAPI.Tests.Utilities
namespace SMAPI.Tests.Utilities
{
/// <summary>Unit tests for <see cref="SemanticVersion"/>.</summary>
[TestFixture]

View File

@ -1,4 +0,0 @@
using System.Reflection;
[assembly: AssemblyTitle("SMAPI.Toolkit.CoreInterfaces")]
[assembly: AssemblyDescription("Provides toolkit interfaces which are available to SMAPI mods.")]

View File

@ -1,18 +1,15 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<AssemblyName>SMAPI.Toolkit.CoreInterfaces</AssemblyName>
<RootNamespace>StardewModdingAPI</RootNamespace>
<Description>Provides toolkit interfaces which are available to SMAPI mods.</Description>
<TargetFrameworks>net4.5;netstandard2.0</TargetFrameworks>
<RootNamespace>SMAPI</RootNamespace>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
<OutputPath>..\..\bin\$(Configuration)\SMAPI.Toolkit.CoreInterfaces</OutputPath>
<DocumentationFile>..\..\bin\$(Configuration)\SMAPI.Toolkit.CoreInterfaces\$(TargetFramework)\SMAPI.Toolkit.CoreInterfaces.xml</DocumentationFile>
<LangVersion>latest</LangVersion>
</PropertyGroup>
<ItemGroup>
<Compile Include="..\..\build\GlobalAssemblyInfo.cs" Link="Properties\GlobalAssemblyInfo.cs" />
</ItemGroup>
<Import Project="..\..\build\common.targets" />
</Project>

View File

@ -2,6 +2,7 @@ using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Runtime.CompilerServices;
using System.Threading.Tasks;
using Newtonsoft.Json;
using StardewModdingAPI.Toolkit.Framework.Clients.Wiki;
@ -10,6 +11,8 @@ using StardewModdingAPI.Toolkit.Framework.ModData;
using StardewModdingAPI.Toolkit.Framework.ModScanning;
using StardewModdingAPI.Toolkit.Serialization;
[assembly: InternalsVisibleTo("StardewModdingAPI")]
[assembly: InternalsVisibleTo("SMAPI.Web")]
namespace StardewModdingAPI.Toolkit
{
/// <summary>A convenience wrapper for the various tools.</summary>

View File

@ -1,7 +0,0 @@
using System.Reflection;
using System.Runtime.CompilerServices;
[assembly: AssemblyTitle("SMAPI.Toolkit")]
[assembly: AssemblyDescription("A library which encapsulates mod-handling logic for mod managers and tools. Not intended for use by mods.")]
[assembly: InternalsVisibleTo("StardewModdingAPI")]
[assembly: InternalsVisibleTo("SMAPI.Web")]

View File

@ -1,8 +1,10 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<AssemblyName>SMAPI.Toolkit</AssemblyName>
<RootNamespace>StardewModdingAPI.Toolkit</RootNamespace>
<Description>A library which encapsulates mod-handling logic for mod managers and tools. Not intended for use by mods.</Description>
<TargetFrameworks>net4.5;netstandard2.0</TargetFrameworks>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
<OutputPath>..\..\bin\$(Configuration)\SMAPI.Toolkit</OutputPath>
<DocumentationFile>..\..\bin\$(Configuration)\SMAPI.Toolkit\$(TargetFramework)\SMAPI.Toolkit.xml</DocumentationFile>
<LangVersion>latest</LangVersion>
@ -10,10 +12,6 @@
<RootNamespace>StardewModdingAPI.Toolkit</RootNamespace>
</PropertyGroup>
<ItemGroup>
<Compile Include="..\..\build\GlobalAssemblyInfo.cs" Link="Properties\GlobalAssemblyInfo.cs" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="HtmlAgilityPack" Version="1.11.9" />
<PackageReference Include="Newtonsoft.Json" Version="12.0.2" />

View File

@ -1,4 +0,0 @@
using System.Reflection;
[assembly: AssemblyTitle("SMAPI.Web")]
[assembly: AssemblyDescription("")]

View File

@ -1,9 +1,9 @@
<Project Sdk="Microsoft.NET.Sdk.Web">
<PropertyGroup>
<AssemblyName>SMAPI.Web</AssemblyName>
<RootNamespace>StardewModdingAPI.Web</RootNamespace>
<TargetFramework>netcoreapp2.0</TargetFramework>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
<LangVersion>latest</LangVersion>
</PropertyGroup>
@ -11,10 +11,6 @@
<Content Remove="aws-beanstalk-tools-defaults.json" />
</ItemGroup>
<ItemGroup>
<Compile Include="..\..\build\GlobalAssemblyInfo.cs" Link="Properties\GlobalAssemblyInfo.cs" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Hangfire.AspNetCore" Version="1.7.5" />
<PackageReference Include="Hangfire.Mongo" Version="0.6.1" />
@ -52,4 +48,6 @@
</Content>
</ItemGroup>
<Import Project="..\..\build\common.targets" />
</Project>

View File

@ -3,12 +3,15 @@ using System.Diagnostics.CodeAnalysis;
using System.IO;
using System.Linq;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Threading;
#if SMAPI_FOR_WINDOWS
#endif
using StardewModdingAPI.Framework;
using StardewModdingAPI.Toolkit.Utilities;
[assembly: InternalsVisibleTo("SMAPI.Tests")]
[assembly: InternalsVisibleTo("DynamicProxyGenAssembly2")] // Moq for unit testing
namespace StardewModdingAPI
{
/// <summary>The main entry point for SMAPI, responsible for hooking into and launching the game.</summary>

View File

@ -1,7 +0,0 @@
using System.Reflection;
using System.Runtime.CompilerServices;
[assembly: AssemblyTitle("SMAPI")]
[assembly: AssemblyDescription("A modding API for Stardew Valley.")]
[assembly: InternalsVisibleTo("StardewModdingAPI.Tests")]
[assembly: InternalsVisibleTo("DynamicProxyGenAssembly2")] // Moq for unit testing

View File

@ -1,10 +1,10 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<RootNamespace>StardewModdingAPI</RootNamespace>
<AssemblyName>StardewModdingAPI</AssemblyName>
<RootNamespace>StardewModdingAPI</RootNamespace>
<Description>The modding API for Stardew Valley.</Description>
<TargetFramework>net45</TargetFramework>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
<LangVersion>latest</LangVersion>
<PlatformTarget>x86</PlatformTarget>
<OutputType>Exe</OutputType>
@ -91,10 +91,6 @@
<ProjectReference Include="..\SMAPI.Toolkit\SMAPI.Toolkit.csproj" />
</ItemGroup>
<ItemGroup>
<Compile Include="..\..\build\GlobalAssemblyInfo.cs" Link="Properties\GlobalAssemblyInfo.cs" />
</ItemGroup>
<ItemGroup>
<Content Include="SMAPI.config.json">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>