Skip to content

Commit b6c86fe

Browse files
jasonleenaylorjohnml1135
authored andcommitted
Migrate all the .csproj files to SDK format
- Created convertToSDK script in Build folder - Updated mkall.targets RestoreNuGet to use dotnet restore - Update mkall.targets to use dotnet restore instead of old NuGet restore - Update build scripts to use RestorePackages target Implement and execute improved convertToSDK.py * Use mkall.targets-based NuGet detection * Fix test package references causing build failures * Add PrivateAssets to test packages to exclude transitive deps SDK-style PackageReferences automatically include transitive dependencies. The SIL.LCModel.*.Tests packages depend on TestHelper, which causes NU1102 errors. Adding PrivateAssets="All" prevents transitive dependencies from flowing to consuming projects Co-authored-by: jasonleenaylor <2295227+jasonleenaylor@users.noreply.github.com> Convert DesktopAnalytics and IPCFramework to PackageReferences Converted regular References to PackageReferences for NuGet packages: - SIL.DesktopAnalytics (version 4.0.0) in 6 projects - SIL.FLExBridge.IPCFramework (version 1.1.1-beta0001) in FwUtils - Updated package versions to resolve NU1605 downgrade errors: - Moq: 4.17.2 → 4.20.70 in XMLViewsTests.csproj - TagLibSharp: 2.2.0 → 2.3.0 in xWorks.csproj Co-authored-by: jasonleenaylor <2295227+jasonleenaylor@users.noreply.github.com> Fix bare References and update convertToSDK.py script * Fixed bare Reference elements in FieldWorks.csproj and XMLViews.csproj that should have been PackageReferences: - Geckofx60.32/64 packages (provide Geckofx-Core, Geckofx-Winforms) - SharpZipLib (provides ICSharpCode.SharpZipLib) - SIL.ParatextShared (provides ParatextShared) - FwControls.csproj: ParatextShared → SIL.ParatextShared - ITextDll.csproj: Geckofx, SharpZipLib, ParatextShared → packages - FwParatextLexiconPlugin.csproj: Paratext.LexicalContracts → ParatextData - ScriptureUtilsTests.csproj: ParatextShared → SIL.ParatextShared - Paratext8Plugin.csproj: Paratext.LexicalContracts → removed (provided by ParatextData) - FwParatextLexiconPluginTests.csproj: Paratext.LexicalContracts* → ParatextData - ParatextImportTests.csproj: ParatextShared → SIL.ParatextShared Co-authored-by: jasonleenaylor <2295227+jasonleenaylor@users.noreply.github.com> Fix Geckofx version and DotNetZip warnings Updated Geckofx60.32/64 from 60.0.50/51 to 60.0.52 (only version available on NuGet). This resolves NU1603 warnings about missing package version 60.0.51. Updated SharpZipLib in ITextDll.csproj from 1.3.3 to 1.4.0 to avoid downgrade warning (SIL.LCModel requires >= 1.4.0). Suppressed DotNetZip NU1903 security warning in xWorks.csproj and xWorksTests.csproj (already suppressed globally in Directory.Build.props, but some projects need local suppression). All 115 projects now restore successfully without errors. Co-authored-by: jasonleenaylor <2295227+jasonleenaylor@users.noreply.github.com> Fix post .csproj conversion build issues * Add excludes for test subdirectories * Fix several references that should have been PackageReferences * Fix Resource ambiguity * Add c++ projects to the solution Delete some obsolete files and clean-up converted .csproj * Fix more encoding converter and geckofx refs * Delete obsolete projects * Delete obsoleted test fixture Copilot assisted NUnit3 to NUnit4 migration * Also removed some obsolete tests and clean up some incomplete reference conversions Update palaso dependencies and remove GeckoFx 32bit * The conditional 32/64 bit dependency was causing issues and wasn't necessary since we aren't shipping 32 bit anymore Fix broken test projects by adding needed external dependencies * Mark as test projects and include test adapter * Add .config file and DependencyModel package if needed * Add AssemblyInfoForTests.cs link if needed * Also fix issues caused by a stricter compiler in net48 Update FieldWorks.cs to use latest dependencies * Update L10nSharp calls * Specify the LCModel BackupProjectSettings * Add CommonAsssemblyInfo.cs link lost in conversion * Set Deterministic builds to false for now (evaluate later) Spec kit and AI docs, tasks and instructions Refine AI onboarding and workflows: * Update copilot-instructions.md with agentic workflow links and clearer pointers to src-catalog and per-folder guidance (COPILOT.md). * Tune native and installer instructions for mixed C++/CLI, WiX, and build nuances (interop, versioning, upgrade behavior, build gotchas). Spec kit improvements: * Refresh spec.md and plan.md to align with the feature-spec and bugfix agent workflows and FieldWorks conventions. Inner-loop productivity: * Extend tasks.json with quick checks for whitespace and commit message linting to mirror CI and shorten feedback loops. CI hardening for docs and future agent flows: * Add lint-docs.yml to verify COPILOT.md presence per Src/<Folder> and ensure folders are referenced in .github/src-catalog.md. * Add agent-analysis-stub.yml (disabled-by-default) to document how we will run prompts/test-failure analysis in CI later. Locally run CI checks in Powershell * Refactor scripts and add whitespace fixing algorithm * Add system to keep track of changes needed to be reflected in COPILOT.md files. Use FieldWorks.proj for main file Add local mulit-agent capability Remove LexTextExe.exe
1 parent 0f38c1a commit b6c86fe

File tree

999 files changed

+76122
-59795
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

999 files changed

+76122
-59795
lines changed

.dockerignore

Lines changed: 87 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,87 @@
1+
# Build outputs
2+
Output/
3+
Obj/
4+
bin/
5+
obj/
6+
*.user
7+
8+
# Test results
9+
TestResults/
10+
11+
# NuGet packages
12+
packages/
13+
.nuget/
14+
15+
# Git
16+
.git/
17+
.github/
18+
.gitignore
19+
.gitattributes
20+
21+
# Visual Studio
22+
.vs/
23+
*.suo
24+
*.sln.docstates
25+
26+
# Documentation and analysis files
27+
*.md
28+
!ReadMe.md
29+
COPILOT.md
30+
*.prompt.md
31+
BUILD_CHALLENGES_ANALYSIS.md
32+
CLARIFICATIONS-NEEDED.md
33+
COMPREHENSIVE_COMMIT_ANALYSIS.md
34+
CONVERGENCE-FRAMEWORK.md
35+
CONVERGENCE-STATUS.md
36+
DEEP_COMMIT_ANALYSIS.md
37+
DLL_MODERNIZATION_PLAN.md
38+
LEGACY_REMOVAL_SUMMARY.md
39+
MIGRATION_DOCS_INDEX.md
40+
MIGRATION_FIXES_SUMMARY.md
41+
MIGRATION_SUMMARY_BY_PHASE.md
42+
NON_SDK_ELIMINATION.md
43+
NUNIT4_CONVERSION_SUMMARY.md
44+
PACKAGE_MANAGEMENT_QUICKSTART.md
45+
RHINOMOCKS_TO_MOQ_MIGRATION.md
46+
SDK-MIGRATION.md
47+
TRAVERSAL_SDK_IMPLEMENTATION.md
48+
49+
# Test projects and data
50+
TestLangProj/
51+
specs/
52+
53+
# Vagrant
54+
vagrant/
55+
56+
# Python scripts (not needed in container)
57+
*.py
58+
59+
# Docs
60+
Docs/
61+
62+
# Resources (will copy specific ones if needed)
63+
resources/
64+
65+
# Scripts (not needed for Docker build)
66+
scripts/
67+
68+
# FLExInstaller (not building installer in container)
69+
FLExInstaller/
70+
71+
# Sample/test code
72+
Samples/
73+
74+
# Large binary files
75+
*.exe
76+
!DistFiles/**/*.exe
77+
*.dll
78+
!DistFiles/**/*.dll
79+
*.pdb
80+
*.lib
81+
*.exp
82+
83+
# Temporary files
84+
*.tmp
85+
*.log
86+
*.bak
87+
*~

.github/BUILD_REQUIREMENTS.md

Lines changed: 87 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,87 @@
1+
# Build Requirements
2+
3+
## Local Development
4+
5+
### Full Build (C# + Native C++)
6+
7+
To build the complete FieldWorks solution including native C++ components:
8+
9+
**PowerShell (Recommended - auto-initializes VS environment):**
10+
```powershell
11+
.\build.ps1
12+
```
13+
14+
**Bash (Git Bash - requires Developer Command Prompt):**
15+
```bash
16+
# 1. Open "Developer Command Prompt for VS 2022" from Start Menu
17+
# 2. Type: bash
18+
# 3. Navigate to repo: cd /c/path/to/FieldWorks
19+
# 4. Run: ./build.sh
20+
```
21+
22+
**Why?** Native components (DebugProcs, GenericLib, FwKernel, Views, graphite2) require:
23+
- `nmake.exe` (from Visual Studio C++ Build Tools)
24+
- C++ compiler toolchain
25+
- Environment variables set by VsDevCmd.bat (VCINSTALLDIR, INCLUDE, LIB, etc.)
26+
27+
**Note:** The PowerShell script (`build.ps1`) automatically initializes the Visual Studio environment using `vswhere.exe`. The Bash script requires you to run from a Developer Command Prompt because Git Bash has issues reliably calling VsDevCmd.bat.
28+
29+
### Managed-Only Build (C# projects)
30+
31+
If you only need to build C# projects and already have native artifacts from a previous build:
32+
33+
```powershell
34+
# Build only managed projects (skips native C++)
35+
msbuild FieldWorks.proj /p:Configuration=Debug /p:Platform=x64
36+
```
37+
38+
## CI Builds
39+
40+
GitHub Actions CI automatically configures the Developer environment using the `microsoft/setup-msbuild@v2` action. No manual setup is required.
41+
42+
From `.github/workflows/CI.yml`:
43+
```yaml
44+
- name: Setup MSBuild
45+
uses: microsoft/setup-msbuild@v2 # Configures VS environment automatically
46+
47+
- name: Build Debug and run tests
48+
run: ./build.ps1 -Configuration Debug -Platform x64
49+
```
50+
51+
## Troubleshooting
52+
53+
### Error: "nmake.exe could not be run" or "VCINSTALLDIR not set"
54+
55+
**Cause:** Build script was run from a regular PowerShell/bash session instead of a Developer Command Prompt.
56+
57+
**Solution:**
58+
1. Close your current terminal
59+
2. Open "Developer Command Prompt for VS 2022" or "Developer PowerShell for VS 2022" from the Start Menu
60+
3. Navigate to the repository
61+
4. Run the build script again
62+
63+
### Error: "Missing FieldWorks build tasks assembly"
64+
65+
**Cause:** FwBuildTasks.dll hasn't been built yet (typically on first build or after clean).
66+
67+
**Solution:** The build scripts now automatically bootstrap FwBuildTasks. If this fails, manually build it first:
68+
```powershell
69+
msbuild Build/Src/FwBuildTasks/FwBuildTasks.csproj /t:Restore;Build /p:Configuration=Debug
70+
```
71+
72+
## Build Script Features
73+
74+
Both `build.ps1` and `build.sh` now include:
75+
76+
1. **Automatic FwBuildTasks bootstrap**: Builds build infrastructure before main build
77+
2. **Environment validation**: Warns if Developer environment is not detected
78+
3. **Package restoration**: Restores NuGet packages before build
79+
4. **Traversal build**: Uses MSBuild Traversal SDK (FieldWorks.proj) for correct dependency ordering
80+
81+
## Visual Studio Requirements
82+
83+
- **Visual Studio 2022** (Community, Professional, or Enterprise)
84+
- **Required Workloads:**
85+
- .NET desktop development
86+
- Desktop development with C++
87+
- **Optional:** WiX Toolset 3.11.x (only for installer builds)

0 commit comments

Comments
 (0)