Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
122 commits
Select commit Hold shift + click to select a range
4b76b85
ignored all these dumb macos-generated files.
mamift Sep 15, 2026
4ba91e8
added dublinecore and xhtml xsd files under generatedschemaslibries/
mamift Sep 15, 2026
bc0ddf7
created powershell equivalent of linqpad scripts.
mamift Sep 15, 2026
e8e7aff
deleted for testing.
mamift Sep 15, 2026
03e4448
Revert "deleted for testing."
mamift Sep 15, 2026
2ec5bf7
more origins.
mamift Sep 16, 2026
f3b21a7
fixed incomplete schemas.
mamift Sep 16, 2026
5fdfcf0
no more ternary operators.
mamift Sep 16, 2026
abdd2a1
added test that exposes a bug with determining which XSD to generate …
mamift Sep 16, 2026
0c1defe
nullables; no more ternary.
mamift Sep 16, 2026
29bf70f
test
mamift Sep 16, 2026
da99643
the -a flag in the gen verb is now always applied and is redundant; b…
mamift Sep 16, 2026
d8c6d4f
fixed a bug with getting the actual XML Schema version, the xs:schema…
mamift Sep 16, 2026
ab18f8e
regenerated code; now properly generates code for mzML schemas.
mamift Sep 16, 2026
a9c33dd
will eventually replace SchemaFiles.
mamift Sep 16, 2026
50975cb
cvss xsd.
mamift Sep 17, 2026
4db6025
origins for previous commit.
mamift Sep 17, 2026
da35848
Added Schema.ToFullFilePath and tests.
mamift Sep 17, 2026
d5520bf
disabled these failling tests.
mamift Sep 17, 2026
c3baef0
renamed.
mamift Sep 17, 2026
f806a79
updated with ignorable test cases.
mamift Sep 17, 2026
19d8f2c
updated to support regenerating schemas in linqtoxsd.schemas project.
mamift Sep 19, 2026
2906cc5
the -a flag will now delete existing files with the .xsd.cs extension…
mamift Sep 19, 2026
bf69bfe
Merge branch 'master' into testing/dublincore-xhtml
mamift Sep 22, 2026
5d8961c
releasenotes for v3.4.24 WIP.
mamift Sep 22, 2026
33fa8e2
Added CONTRIBUTING.md file.
mamift Sep 22, 2026
65b3f5c
Fixed up the release notes; added text for upcoming v3.4.24. added im…
mamift Sep 22, 2026
9c5b232
Fix test flakiness: avoid mutating global XmlReaderSettings and make …
mamift Sep 22, 2026
942b208
Does not work.
mamift Sep 22, 2026
e057fb3
Proper fix for test flakiness for the `TestGenerateCodeFromSingleDire…
mamift Sep 22, 2026
4d1bd67
Added ORM-ML (object role modelling markup lang) schema.
mamift Sep 25, 2026
bacdbd1
added XTCE.
mamift Sep 26, 2026
5223c2a
xtce spec.
mamift Sep 28, 2026
9f19766
Added LEXS (logical entity exchange spec)
mamift Sep 29, 2026
9d1b83b
origins for lexs.
mamift Sep 29, 2026
ef702a4
packed a skills.md in the nuget package.
mamift Oct 2, 2026
a4a2d33
prototype implementation of new summarise functionality.
mamift Oct 2, 2026
c585f00
summarise type validator.
mamift Oct 2, 2026
be97835
release notes.
mamift Oct 2, 2026
4de11f5
generated ORMML code.
mamift Oct 2, 2026
90df5e6
`global::` is now prefixed to the generated method `GetRootType()` wh…
mamift Oct 2, 2026
8e2536c
Added xml.xsd as a preloaded schema embedded in the XObjectsCode dll.
mamift Oct 2, 2026
a2120fe
Implemented preloading the xml.xsd based on remote URL checking - wor…
mamift Oct 2, 2026
89483a1
Added XTCE schema project and code.
mamift Oct 2, 2026
f7c6c98
minor refactor.
mamift Oct 2, 2026
24d0cef
When a schema references a common xml.xsd schema using the W3c.org ht…
mamift Oct 3, 2026
a558237
Expand symbol-only XSD enum values to full-word C# member names
mamift Oct 3, 2026
ab53609
Guarantee unique enum member names across an enumeration
mamift Oct 3, 2026
70be018
Split enum value:member mappings on the last colon at runtime
mamift Oct 3, 2026
014c4c1
Regenerate XTCE generated code with unique operator enum members
mamift Oct 3, 2026
830df73
Extend EnumsTest schema with operator, colon and collision enums
mamift Oct 3, 2026
9c7c99c
Add tests for symbol-only, colon-containing and colliding enum values
mamift Oct 3, 2026
bc0df93
regenerated existing code (trivial changes).
mamift Oct 3, 2026
38ee109
regenerated existing code (file rename)
mamift Oct 3, 2026
ca73998
regenerated with AlwaysPrefixGlobal="true"
mamift Oct 3, 2026
a968634
Fix global:: prefixing for cross-namespace using directives
mamift Oct 3, 2026
c29934f
Add regression tests for global:: using directive prefixing
mamift Oct 3, 2026
0ebf32f
Regenerate fixtures with global::-prefixed cross-namespace imports
mamift Oct 3, 2026
81bbfc6
regenerating removed a duplicate line not noticed before; chalking it…
mamift Oct 3, 2026
8213fdc
unexpected regenerated-code change; this seems to be another inadvert…
mamift Oct 3, 2026
3142acd
another unexpected change to regenerated code; does not result in bui…
mamift Oct 3, 2026
feb4262
Merge branch 'master' into testing/dublincore-xhtml
mamift Oct 5, 2026
3093f96
Now this branch is v3.4.25
mamift Oct 5, 2026
e1ac52a
updated gitignore.
mamift Oct 11, 2026
3ad93b5
Fix duplicated shared-schema types across multiple XSDs (fixes #14)
mamift Oct 11, 2026
bde2eb0
Fix macOS-only test failures across the test suite
mamift Oct 12, 2026
e9feff8
Updated contributing.md and releasenotes.md
mamift Oct 13, 2026
851071b
Updated nugets: ExtendedXmlSerializer (3.10.0), morelinq (4.4.0), and…
mamift Oct 14, 2026
0df8e3b
Consolidated nuget: Portable.System.DateTimeOnly (v9.0.1).
mamift Oct 14, 2026
0e647a2
Consolidated nuget: Polysharp (v1.16)
mamift Oct 14, 2026
5d56ce5
Updated Microsoft.CodeAnalysis.CSharp to latest (5.9.0).
mamift Oct 14, 2026
a77589b
Added PS1 script to generate nuget dependencies report CSV.
mamift Oct 14, 2026
ce4870a
updated Generate-NugetDependencyReport.ps1.
mamift Oct 14, 2026
856b68c
Removed `Microsoft.CodeAnalysis.CSharp` from XObjectstests - it is br…
mamift Oct 14, 2026
88d036c
Updated MSTest to 4.5.1.
mamift Oct 15, 2026
7335556
Updated nunit to `v5.0.0` and NUnit3TestAdapter to `v6.3.1`.
mamift Oct 15, 2026
957e048
Updated `OneOf` to `v3.0.271`
mamift Oct 15, 2026
5d225c3
Updated System.CodeDom to `10.0.13`.
mamift Oct 15, 2026
5c1061c
release notes.
mamift Oct 15, 2026
44df97e
Updated System.Text.Json to `v10.0.13`
mamift Oct 16, 2026
10cac78
Updated System.IO.Abstractions and TestingHelpers to `v22.3.0`.
mamift Oct 16, 2026
16f8ac1
Release notes.
mamift Oct 16, 2026
1d3ad36
changed my mind - this is now release v3.5.0
mamift Oct 16, 2026
a8170f9
replaced .net8 with .net10.
mamift Oct 16, 2026
09a1b36
Fix net10.0 project references after framework rename
mamift Oct 16, 2026
4c0b700
fixed silently non-executing test; see test run id: runId=1000695
mamift Oct 18, 2026
0a31cfa
more stringent test check.
mamift Oct 19, 2026
7fb9251
Fixed error in NestedChoiceCodeGenTests test code.
mamift Oct 19, 2026
0ad4627
used types everywhere in this file. trying to fix silently broken test.
mamift Oct 19, 2026
c5c184c
Extracted to extension method (`CheckForZeroDiagnosticsAndErrorsOrThr…
mamift Oct 19, 2026
e35c626
Fixed warnings being emitted for EnumsCodeGenTest class methods.
mamift Oct 19, 2026
0ca5fc2
expanded this for debugging.
mamift Oct 19, 2026
e1de149
Fixed warnings being emitted for BsaePropsCodeGenTests; used explicit…
mamift Oct 19, 2026
95cc217
converted to use explicit types.
mamift Oct 19, 2026
dfaa3a3
Re-using the CheckForZeroDiagnosticsAndErrorsOrThrow() method in more…
mamift Oct 19, 2026
76483a5
removed unused var.
mamift Oct 19, 2026
bda012a
Replaced Assert.Warn with Assert.Fail to prevent silently ignored tes…
mamift Oct 19, 2026
ac5e69b
ok this is too strict - some warnings are acceptable.
mamift Oct 19, 2026
95e353a
explicit types.
mamift Oct 19, 2026
66ae338
ignore these acceptable warnings.
mamift Oct 19, 2026
a53e685
Updated expected value in TypesThatInheritFromXTypedElementTestAndThe…
mamift Oct 19, 2026
9923f5b
regenerated testing code.
mamift Oct 19, 2026
a0dff9f
turned assertWatcher back on.
mamift Oct 19, 2026
dbca157
added param for filtering folders.
mamift Oct 19, 2026
6e54c6d
excluded project 2007 due to massive complexity blow out.
mamift Oct 19, 2026
3851c4c
Deleted the AkomaNtoso30-CSD13-D2f folder and project - all this time…
mamift Oct 19, 2026
95e7a55
dont know why this jumped places after previous commit...
mamift Oct 19, 2026
fb92c2c
AkomaNtoso - Updated to 2025 version
mamift Oct 19, 2026
9095372
Fixes a build-server run issue. Default --framework for tests is net1…
mamift Oct 19, 2026
575b572
Enabled nullables.
mamift Oct 19, 2026
980ebc5
disabled CS0108: warning CS0108: '...' hides inherited member '...'. …
mamift Oct 19, 2026
e609791
holy crap - all codegen for OPC Ua builds without error now! A first!
mamift Oct 19, 2026
58c337b
Revert "AkomaNtoso - Updated to 2025 version" - breaks tests - will r…
mamift Oct 19, 2026
8282c98
removed ref to now deleted project.
mamift Oct 19, 2026
870827b
Fix NETSDK1005 when building/testing with -f after net10.0 rename
mamift Oct 19, 2026
7d94b47
Disabled these warnings for GeneratedSchemaLibraries.
mamift Oct 19, 2026
dbb6eab
Change string fields to constants in GeneralExtensionMethods
mamift Oct 20, 2026
551c1d9
copilot suggestion - fixed wrong console output message saying which …
mamift Oct 20, 2026
5d17ba7
This check for an un-namespace `version` attribute was wrong. that is…
mamift Oct 20, 2026
e7f0427
release notes.
mamift Oct 20, 2026
9471539
Finally I think I understand how vc:minVersion and vc:maxVersion works.
mamift Oct 20, 2026
a21f79d
Hand edited the W3C XSD for Xml Schema 1.1 to get it to pass the test…
mamift Oct 20, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
5 changes: 4 additions & 1 deletion .claude/settings.local.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,10 @@
"Bash(dotnet run *)",
"Bash(DOTNET_MULTILEVEL_LOOKUP=0 dotnet exec \"LinqToXsd/bin/Debug/net7.0/LinqToXsd.dll\" gen \"LinqToXsd.Schemas/XInclude/xinclude.xsd\" -c \"LinqToXsd.Schemas/XInclude/xinclude.xsd.config\" -o \"LinqToXsd.Schemas/XInclude/xinclude.xsd-g.cs\")",
"Bash(echo \"EXIT: $?\")",
"Bash(git stash *)"
"Bash(git stash *)",
"mcp__fuse__fuse_workspace",
"mcp__code-review-graph__get_minimal_context_tool",
"Bash(dotnet test *)"
]
},
"enableAllProjectMcpServers": true,
Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -263,3 +263,6 @@ Samples/
*.diff
LinqToXsd.Schemas/_temp/
.fuse/
*.DS_Store
.github-issues/
.scratch/
41 changes: 41 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# Contributing to LinqToXsdCore

IMPORTANT BEFORE DOING ANY WORK: Please use the [LinqToXsd-TestingSuite.slnf](https://github.com/mamift/LinqToXsdCore/blob/testing/dublincore-xhtml/LinqToXsd-TestingSuite.slnf) solution filter file when working with this repo in Visual Studio or Rider. The full `sln` file has projects that currently do not build.

Mandatory requirements before your PR is accepted or approved:

1. **When contributing, please summarise your pull request in such a manner that it is acceptable to be included in the `RELEASENOTES.md` file** that is packaged in every nuget release (look at the release notes for previous releases to get an idea - be short but descriptive enough to point someone in the right direction if they want to dig deeper - this includes referring to Github issues and PRs).
- You do not have to update the `RELEASENOTES.md` file yourself but write a summary that's sufficient to be included there. This means that you should NOT GET OVERLY TECHNICAL IN YOUR PR DESCRIPTION. Please use [Github issues](https://github.com/mamift/LinqToXsdCore/issues) for that and refer to the issue in your PR description.

2. **ENSURE THAT YOU WRITE A TEST FOR YOUR CHANGES.** Tests are incredibly helpful when collaborating with other developers - they help ensure that new contributions do not break existing functionality. Fixing a bug? Write a test to ensure the bug does not re-occur. Adding a feature? Add a test to cover the feature behavior or output.

3. **ENSURE THAT YOUR CHANGES DO NOT BREAK EXISTING FUNCTIONALITY.** All tests should pass (including test written by you).
- There are some existing tests that are broken when run as part of the full suite, *but work when run individually* (`TestGenerateCodeFromSingleDirectoryWithAutoConfig` for instance) - these are acceptable failures.
- For tests that are broken and need updating, please annotate them such that they still run *but are not counted as failures or ignored* (see `TestGetFullPathFromSchemaInGraph`),
- Or that they need to be explicitly run by the user (see `PrototypeSplitByNamespaceAndClass`), so wil not run during the CI/DevOps builds.
4. In the solution root there's a PowerShell script: `Regenerate-TestingSuite.ps1`. After all the tests in the testing project have been run (and pass), run this script to regenerate all C# code in the `GeneratedSchemaLibraries` folder. This is very helpful to catch regressions that are not covered in the test project. **Please try to fix any regressions found by this script alongside your PR! I WILL NOT APPROVE A PR THAT INTRODUCES A REGRESSION OR TEST FAILURE!** It is also helpful to have the changes in code generation captured in git from version to version to find and diagnose bugs, and to know which version may have changed ouptuts or behavior.
- Also: the script may generate new code files (i.e. not yet tracked in git) - if these new files cause build errors, THEN discard these files and their dependents.
- Ideally: *only commit code re-generated by the script for existing files that are tracked in git.*
- Finally: any code files that are changed by `Regenerate-TestingSuite.ps1` should be committed IN ITS OWN INDIVIDUAL COMMIT to make it easier to catch regressions. Ideally this commit should be the LAST commit in your PR branch and obviously, must build OK.

For points 2. and 3. the preferred type of test is an end to end code generation test; so this counts as an integration test. Unit tests should be preferred when testing extension methods or you are making changes to the runtime library in `XObjectsCore`.

## Use of AI

We welcome the use of AI in your pull requests, so long as you follow the above rules - remember NO TEST FAILURES. And if your PR brings in changes that results in test failures, then those failures need to be fixed before the PR can be approved. AI coding agents should help you with fixing these.

Much of the code base and indeed most of the test suite pre-dates AI coding agents (the original Microsoft code was written in 2008-2011 and was ported to .NET Core/.NET Standard in 2019), so as long as the existing test suite passes, then new code, even if AI generated is acceptable.

## Optional things

- Please consider contributing the full XSD file that exhibits any code generation bugs. In terms of cyclomatic complexity, the code base rates incredibly high, and as a result, LinqToXsd emits a very specific output, and is highly vulnerable to regressions in response to seemingly trivial code changes.

It also does not cover the entire W3C XML Schema v1.0 specification - so when a code gen bug is discovered, it is incredibly helpful to have the full XSD file as many parts of the XML Schema specification interact in quirky ways when transposing it to C#. Some things simply cannot be handled by LinqToXsd as there currently exists no idomatic way to model an XSD concept or construct in C#. Having the XSD on file helps when new C# language versions are released, and they can be evaluated for future implementation.
- In cases where bugs from specific XSD files are unfeasible to fix in a single PR, please:
- contribute the XSD file under it's own separate folder under the [GeneratedSchemaLibraries](https://github.com/mamift/LinqToXsdCore/tree/master/GeneratedSchemaLibraries) folder,
- then run the `create individual xsd libraries.ps1` PowerShell script to automatically create a `.CSPROJ` file and link it to the greater solution.
- This allows storing the XSD for future bug fixing and also segregating buggy code out in it's own project so that the other test projects can still build and run. Uncompilable code **should not be linked to the `XObjectsTests.csproj`** or the **`LinqToXsd.Schemas` projects**.

- If the full XSD file cannot be given, then a minimal extract of the schema that exhibits the code generation bug is also acceptable. Many **code generation** tests simply make no sense unless there's an accompanying XSD file.

Finally, the `AllEntCf.xsd-xml` schema is cursed; trying to run code gen on it will result in an out of memory error, even on systems with 32GB of RAM. I appreciate any efforts to get to the bottom of why this happens. But in the meantime, please refrain from using this file in any tests. You have been warned.
13 changes: 12 additions & 1 deletion Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,16 @@
<!-- Build and design defaults -->
<PropertyGroup>
<RootNamespace>Xml.Schema.Linq</RootNamespace>
<!--
`dotnet build/test -f <tfm>` passes TargetFramework as a global property. By default
NuGet restore treats that as a request to restore only that TFM for every project in
the graph, so multi-targeted projects (XObjectsCore, XObjectsCodeGen) end up with an
assets file containing just that TFM. They are still referenced via SetTargetFramework
for their other TFMs (e.g. netstandard2.0) from projects such as LinqToXsd and
LinqToXsd.Schemas, which then fails with NETSDK1005.
Disabling NuGet's TFM override makes restore always cover all TargetFrameworks.
-->
<_DisableNuGetRestoreTargetFrameworksOverride>true</_DisableNuGetRestoreTargetFrameworksOverride>
<!-- This is an opt-in feature of .NET SDK 10 that allows the LinqToXsd CLI tool to be packaged AOT; turned off for now as it triples the nupkg size -->
<!-- <RuntimeIdentifiers>win-x64;win-x86</RuntimeIdentifiers> -->
</PropertyGroup>
Expand Down Expand Up @@ -32,8 +42,9 @@
CS1574: XML comment has cref attribute 'xsdFilePath' that could not be resolved
CS1591: Missing XML comment for publicly visible type or member ...
CS1734: XML comment on ... has a paramref tag for ..., but there is no parameter by that name
CS0108: warning CS0108: '...' hides inherited member '...'. Use the new keyword if hiding was intended
-->
<NoWarn>$(NoWarn)1570;1574;1591;1734;NETSDK1138</NoWarn>
<NoWarn>$(NoWarn)1570;1574;1591;1734;0108;NETSDK1138</NoWarn>
</PropertyGroup>

<!-- Pack exisiting README file -->
Expand Down
Loading
Loading