3.3 KiB
3.3 KiB
NFOGuard Emby Plugin - WSL Development Setup
This guide helps you build the NFOGuard Emby plugin on Windows using WSL (Windows Subsystem for Linux).
Prerequisites
1. Install .NET SDK in WSL
# Update package list
sudo apt update
# Install .NET SDK 6.0 (supports .NET Framework 4.8 development)
sudo apt install -y dotnet-sdk-6.0
# Verify installation
dotnet --version
2. Get Emby SDK Files
You need to obtain the Emby SDK DLLs from an Emby Server installation:
Option A: From existing Emby Server
-
Locate your Emby Server installation directory:
- Windows:
C:\Program Files\Emby-Server\System - Or wherever you installed Emby Server
- Windows:
-
Copy these files to
NFOguard/EmbySDK/:MediaBrowser.Common.dllMediaBrowser.Controller.dllMediaBrowser.Model.dll
Option B: Download from official sources
- Check the Emby Plugin Development docs
3. Prepare EmbySDK Directory
# From the NFOguard directory
mkdir -p EmbySDK
# Copy the DLL files here (use Windows Explorer or copy commands)
# You should have:
# EmbySDK/MediaBrowser.Common.dll
# EmbySDK/MediaBrowser.Controller.dll
# EmbySDK/MediaBrowser.Model.dll
Building the Plugin
Option 1: Using Build Script (Recommended)
cd NFOGuard.Emby.Plugin
./build.sh
Option 2: Manual Build
cd NFOGuard.Emby.Plugin
# Clean previous builds
rm -rf bin obj
# Build the project
dotnet build NFOGuard.Emby.Plugin.csproj -c Release -f net48
Troubleshooting
Common Issues
1. "MediaBrowser. not found" errors:*
- Ensure SDK DLLs are in
../EmbySDK/relative to the .csproj file - Check DLL file names match exactly (case-sensitive on Linux)
2. ".NET Framework 4.8 targeting pack" errors:
# Install Mono for .NET Framework support
sudo apt install mono-complete
3. Permission errors:
# Make build script executable
chmod +x build.sh
4. WSL file system issues:
- Make sure you're working in the Linux filesystem (
/home/...) not Windows mounts (/mnt/c/...) for better performance - If files are on Windows side, they may have permission/line ending issues
Verifying Build Success
After successful build:
# Check if DLL was created
ls -la bin/Release/net48/NFOGuard.Emby.Plugin.dll
# Check file size (should be > 0 bytes)
file bin/Release/net48/NFOGuard.Emby.Plugin.dll
Deployment to Windows Emby Server
-
Locate Emby plugins directory:
C:\ProgramData\Emby-Server\plugins
-
Copy from WSL to Windows:
# From WSL, copy to Windows (adjust path as needed) cp bin/Release/net48/NFOGuard.Emby.Plugin.dll /mnt/c/ProgramData/Emby-Server/plugins/ -
Restart Emby Server
-
Verify in Emby Dashboard:
- Go to Dashboard → Plugins
- Look for "NFOGuard" in installed plugins
Development Tips
- Use VS Code in WSL for editing:
code . - Keep source files in WSL filesystem for best performance
- Only copy final DLL to Windows Emby server
- Use
tail -f /var/log/emby.log(or wherever Emby logs are) to monitor plugin activity
Next Steps
Once built and deployed:
- Test with a new TV episode import
- Check Emby logs for NFOGuard messages
- Verify DateCreated syncs to PremiereDate in database
- Configure licensing when ready for production use