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

Can't compile project on Linux (non-Windows) with this library added. #32

Open
RokeJulianLockhart opened this issue Jul 7, 2023 · 4 comments
Labels
help wanted Extra attention is needed

Comments

@RokeJulianLockhart
Copy link

RokeJulianLockhart commented Jul 7, 2023

From the terminal:

Executing task: dotnet build /home/rokejulianlockhart/git_repositories/RTBJK9/20230616T120719+0000 entities/20230616T115744+0000 Beedell.RokeJulianLockhart/20230616T115630+0000 technical/20230626T122241+0000 code/projects/clipboard_manager/clipboard_manager.csproj /property:GenerateFullPaths=true /consoleloggerparameters:NoSummary 

MSBuild version 17.6.3+07e294721 for .NET
  Determining projects to restore...
  All projects are up-to-date for restore.
/usr/share/dotnet/sdk/7.0.305/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.Sdk.DefaultItems.Shared.targets(250,5): error NETSDK1136: The target platform must be set to Windows (usually by including '-windows' in the TargetFramework property) when using Windows Forms or WPF, or referencing projects or packages that do so. [/home/rokejulianlockhart/git_repositories/RTBJK9/20230616T120719+0000 entities/20230616T115744+0000 Beedell.RokeJulianLockhart/20230616T115630+0000 technical/20230626T122241+0000 code/projects/clipboard_manager/clipboard_manager.csproj]

 *  The terminal process "dotnet 'build', '/home/rokejulianlockhart/git_repositories/RTBJK9/20230616T120719+0000 entities/20230616T115744+0000 Beedell.RokeJulianLockhart/20230616T115630+0000 technical/20230626T122241+0000 code/projects/clipboard_manager/clipboard_manager.csproj', '/property:GenerateFullPaths=true', '/consoleloggerparameters:NoSummary'" terminated with exit code: 1. 
 *  Terminal will be reused by tasks, press any key to close it.

This is the project (for reproduction).

@Willy-Kimura
Copy link
Owner

A large part of the library depends on the Windows SDK therefore porting it to Linux this would be natively impossible. You can however try out porting the project to Mono and switch across the different OSes (Mac, Win, Linux) implementing a wrapper class that replicates the standard clipboard watch behavior as observed on Windows. Could be a possible future add.

@Willy-Kimura Willy-Kimura added the help wanted Extra attention is needed label Sep 7, 2023
@RokeJulianLockhart
Copy link
Author

RokeJulianLockhart commented Sep 8, 2023

#32 (comment)

@Willy-Kimura, I didn't realize Mono still had any use – I thought that when .NET Core was released, it was entirely cross-platform. Am I totally wrong?

@Willy-Kimura
Copy link
Owner

Apparently not. Microsoft appears to have had an entirely different strategy from what we had in mind. WinForms support in other OS platforms won't be happening anytime now or in future. Migration for WinForms to dotnetcore and now .Net 6/7/8 was predicated along the lines of providing long term support for WinForms apps, performance improvements, better tooling support and other niceties. Our best bet would be finding other alternatives outside of WinForms/WPF if we need to tailor the library to work on Linux and Mac.

@Salmakis
Copy link

just as info: eto got a working cross plattform clipboard

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

3 participants