Skip to content

Commit acd0d42

Browse files
CopilotSoar360
andcommitted
Address code review feedback - improve example project
Co-authored-by: Soar360 <[email protected]>
1 parent 945e5c7 commit acd0d42

File tree

3 files changed

+5
-2
lines changed

3 files changed

+5
-2
lines changed

examples/NuGetReferenceExample/NuGetReferenceExample.csproj

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
<TargetFramework>net8.0</TargetFramework>
66
<ImplicitUsings>enable</ImplicitUsings>
77
<Nullable>enable</Nullable>
8-
<ResourcePackerEnabled>true</ResourcePackerEnabled>
98
<IsPackable>false</IsPackable>
109
</PropertyGroup>
1110

examples/NuGetReferenceExample/Program.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
1+
using System.Reflection;
12
using LuYao.ResourcePacker;
23

34
// This example demonstrates using LuYao.ResourcePacker.MSBuild via NuGet package reference
45
// The .dat file is automatically generated during build
56

6-
var datFile = Path.Combine(AppContext.BaseDirectory, "NuGetReferenceExample.dat");
7+
var assemblyName = Assembly.GetExecutingAssembly().GetName().Name ?? "NuGetReferenceExample";
8+
var datFile = Path.Combine(AppContext.BaseDirectory, $"{assemblyName}.dat");
79

810
if (!File.Exists(datFile))
911
{

examples/NuGetReferenceExample/README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,3 +71,5 @@ The main `ExampleProject` uses **project references** to LuYao.ResourcePacker.MS
7171

7272
When using NuGet packages, the MSBuild props and targets files must be named exactly as `<PackageId>.props` and `<PackageId>.targets` to be automatically imported. This example validates that the naming is correct.
7373

74+
For more information about NuGet MSBuild conventions, see the [official documentation on creating MSBuild props/targets packages](https://learn.microsoft.com/en-us/nuget/create-packages/creating-a-package#include-msbuild-props-and-targets-in-a-package).
75+

0 commit comments

Comments
 (0)