Skip to content
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

Fails when bundling a package if using self-contained #1363

Open
TheJoeFin opened this issue Feb 11, 2025 · 2 comments
Open

Fails when bundling a package if using self-contained #1363

TheJoeFin opened this issue Feb 11, 2025 · 2 comments
Labels
bug Something isn't working

Comments

@TheJoeFin
Copy link

TheJoeFin commented Feb 11, 2025

Actual behavior

When enabling self-contained for the publish profile the build fails with the following error:

The type or namespace name 'Windows' could not be found (are you missing a using directive or an assembly reference?)

Expected behavior

CsWin32 should be able to publish and bundle apps which are self-contained

Repro steps

Attempt to make this bundle:
https://github.com/TheJoeFin/Screenshot-Stager/tree/package-with-cswin32

This repo cannot be published self-contained or not, but I suspect that is another issue:
https://github.com/TheJoeFin/CSWin32-SelfContained

This branch shows the issue with a packaged app
https://github.com/TheJoeFin/CSWin32-SelfContained/tree/Packaged

Context

  • CsWin32 version: 0.3.106
  • Target Framework: net8.0-windows10.0.19041.0
@TheJoeFin TheJoeFin added the bug Something isn't working label Feb 11, 2025
@AArnott
Copy link
Member

AArnott commented Feb 11, 2025

Possibly related to #1188 and #560, and a workaround exists to at last some forms of the problem. Please try them out.

@TheJoeFin
Copy link
Author

I have confirmed those two workarounds do not solve the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants