Skip to content

Conversation

@bernd5
Copy link
Contributor

@bernd5 bernd5 commented Jan 8, 2026

replace ugly sln files with the modern slnx format (and add filters via slnf)

@bernd5 bernd5 changed the title replace ugly sln files with the modern slnx format (and add xml resolver to XmlResolverData that it works in VisualStudio without restore) replace ugly sln files with the modern slnx format (and add filters via slnf) Jan 9, 2026
@ndw
Copy link
Contributor

ndw commented Jan 9, 2026

I did not know about .slnx files and I am delighted beyond all rational measure.

Unfortunately, they seem to be a .NET 9 feature and I'm still building with .NET 8.

Does the other PR, to add netstandard2.0, make it possible to build with .NET 9 but retain compatibility with .NET 8?

@bernd5
Copy link
Contributor Author

bernd5 commented Jan 9, 2026

Yes, you can use a higher version sdk (e.g. net 10 which is a long term release like net 8.0) to build an assembly which targets a lower framework version like net8.0.

The slnx file is actually a msbuild feature not a core dotnet feature – but msbuild is integrated into the dotnet sdk.

It works with Visual studio 2022/2026.

@ndw
Copy link
Contributor

ndw commented Jan 9, 2026

Another possibly stupid question. You've moved the pointer to XmlResolverData.csproj into XmlResolver.slnx (instead of having a XmlResolverData.slnx file, I guess). What's the incantation equivalent to

dotnet restore XmlResolverData.slnx

in this configuration?

@bernd5
Copy link
Contributor Author

bernd5 commented Jan 9, 2026

The problem is that visual studio requires dependent projects to be part of a solution – in the previous configuration it was not possible to run / compile the data tests without building the xmlresolver explicitly before.

To build or restore just parts of the solution you can use the solution filter files (slnf) so it would be "dotnet restore XmlResolverData.slnf"

@ndw ndw closed this in #91 Jan 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants