Skip to content

Modernize and reorganize projects and solutions #479

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 6 commits into from
Apr 5, 2025
Merged

Conversation

eldritchconundrum
Copy link
Collaborator

net8.0, one fsproj per dir, with same name as dir, works on my machine

@therontarigo
Copy link
Contributor

$ dotnet build --os windows-x86 --self-contained true -c Release shader-minifier.sln 
/usr/local/share/dotnet/sdk/9.0.103/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.Sdk.FrameworkReferenceResolution.targets(90,5): error NETSDK1083: The specified RuntimeIdentifier 'windows-x86-x64' is not recognized. See https://aka.ms/netsdk1083 for more information.
/usr/local/share/dotnet/sdk/9.0.103/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.Sdk.FrameworkReferenceResolution.targets(90,5): error NETSDK1083: The specified RuntimeIdentifier 'windows-x86-x64' is not recognized. See https://aka.ms/netsdk1083 for more information.
/usr/local/share/dotnet/sdk/9.0.103/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.Sdk.FrameworkReferenceResolution.targets(90,5): error NETSDK1083: The specified RuntimeIdentifier 'windows-x86-x64' is not recognized. See https://aka.ms/netsdk1083 for more information.
/usr/local/share/dotnet/sdk/9.0.103/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.Sdk.FrameworkReferenceResolution.targets(90,5): error NETSDK1083: The specified RuntimeIdentifier 'windows-x86-x64' is not recognized. See https://aka.ms/netsdk1083 for more information.

Restore failed with 4 error(s) in 0.6s

Note that this did not work with the old Shader Minifier.fsproj either, but for a different reason (error MSB4057: The target "Build" does not exist in the project.)
It would be good to be able to cross-build the windows exe from dotnet command line.

For what it's worth, this was possible already using another fsproj, which I believe is adapted from shader-minifier-linux.fsproj in some way:
https://gist.github.com/therontarigo/3dde5c9451896a2cea3d0ea28ee36cb5

@eldritchconundrum
Copy link
Collaborator Author

Hmm... I'm trying to read Microsoft documentation on RuntimeIdentifiers...
There's a change introduced in dotnet 8 ( https://learn.microsoft.com/en-us/dotnet/core/compatibility/sdk/8.0/rid-graph ).
Seems like --os windows-x86 has been replaced by --runtime win-x86

@eldritchconundrum eldritchconundrum marked this pull request as ready for review April 5, 2025 17:57
Copy link
Owner

@laurentlb laurentlb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@eldritchconundrum eldritchconundrum merged commit 5604686 into master Apr 5, 2025
1 check passed
@eldritchconundrum eldritchconundrum deleted the modern branch April 5, 2025 20:10
@eldritchconundrum eldritchconundrum restored the modern branch April 5, 2025 20:10
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.

3 participants