Skip to content

Commit 60c0e4f

Browse files
committed
ignore reference assemblies and *.deps.json when building a mod
These aren't useful for mods since they aren't the entry app.
1 parent 32dcdfe commit 60c0e4f

2 files changed

Lines changed: 6 additions & 0 deletions

File tree

src/SMAPI.ModBuildConfig/Framework/ModFileManager.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -164,6 +164,9 @@ bool IsAssemblyFile(string baseName)
164164
// release zips
165165
this.EqualsInvariant(file.Extension, ".zip")
166166

167+
// unneeded *.deps.json (only SMAPI's top-level one is used)
168+
|| file.Name.EndsWith(".deps.json")
169+
167170
// dependencies bundled with SMAPI
168171
|| IsAssemblyFile("0Harmony")
169172
|| IsAssemblyFile("Newtonsoft.Json")

src/SMAPI.ModBuildConfig/build/smapi.targets

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,9 @@
1515
<!-- recognise XNA Framework DLLs in the GAC (only affects mods using new csproj format) -->
1616
<AssemblySearchPaths>$(AssemblySearchPaths);{GAC}</AssemblySearchPaths>
1717

18+
<!-- don't create the 'refs' folder (which isn't useful for mods) -->
19+
<ProduceReferenceAssembly>false</ProduceReferenceAssembly>
20+
1821
<!-- suppress processor architecture mismatch warning (mods should be compiled in 'Any CPU' so they work in both 32-bit and 64-bit mode) -->
1922
<ResolveAssemblyWarnOrErrorOnTargetArchitectureMismatch>None</ResolveAssemblyWarnOrErrorOnTargetArchitectureMismatch>
2023

0 commit comments

Comments
 (0)