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

Remove build dependency on .NET 3.5 tools #3

Closed

Conversation

rdipardo
Copy link
Contributor

Fixes the community-reported issue at https://community.notepad-plus-plus.org/post/93058

Note that the package taking the place of Rob Giesecke's original UnmanagedExports is newish at best, judging by the project's amount of activity: https://github.com/stevenengland/UnmanagedExports.Repack.Upgrade

This one's transitive dependencies are pulled from NuGet, so your dev environment doesn't get polluted by vintage assemblies.

Eliminates a lingering build dependency on an ancient version of
Microsoft.Build.Utilities (v2.0.0.0), which won't be available in
environments where .NET Framework 3.5 build tools have not been
installed [^1]

See https://www.nuget.org/packages/UnmanagedExports.Repack.Upgrade

Caveats
........

* initial builds must now run a 'Restore' task first [^2]

* this adds package references with the 'GeneratePathProperty' attribute,
  so at least VS 2019 (i.e. MSBuild 16), or NuGet 5.0, is required [^3]

[^1] https://community.notepad-plus-plus.org/post/93058
[^2] https://learn.microsoft.com/nuget/reference/msbuild-targets#restore-target
[^3] https://learn.microsoft.com/nuget/consume-packages/package-references-in-project-files#generatepathproperty
@molsonkiko
Copy link
Owner

I'm inclined to use PR #4 instead. Could you test it out?

@rdipardo
Copy link
Contributor Author

I'm inclined to use PR #4 instead. Could you test it out?

I will next time I'm at a Windows box. Your .gitattributes needs an explicit rule for PNG's with capitalized extensions; Linux file systems are case-sensitive, and thus Linux git clients:

$ git ls-files --eol | grep \.PNG
i/-text w/-text attr/text eol=crlf      NppCSharpPluginPack/Resources/about form icon.PNG
i/-text w/-text attr/text eol=crlf      NppCSharpPluginPack/Resources/about form toolbar darkmode.PNG
i/-text w/-text attr/text eol=crlf      NppCSharpPluginPack/Resources/close html tag icon darkmode.PNG
i/-text w/-text attr/text eol=crlf      NppCSharpPluginPack/Resources/close html tag icon.PNG
i/-text w/-text attr/text eol=crlf      NppCSharpPluginPack/Resources/selection remembering form icon darkmode.PNG
i/-text w/-text attr/text eol=crlf      NppCSharpPluginPack/Resources/selection remembering form icon.PNG
i/-text w/-text attr/text eol=crlf      docs/about form.PNG
i/-text w/-text attr/text eol=crlf      docs/all forms MossyLawn.PNG
i/-text w/-text attr/text eol=crlf      docs/all forms dark mode.PNG
i/-text w/-text attr/text eol=crlf      docs/all forms default style.PNG
i/-text w/-text attr/text eol=crlf      docs/popup dialog.PNG
i/-text w/-text attr/text eol=crlf      docs/selections remembering form.PNG
i/-text w/-text attr/text eol=crlf      docs/settings form.PNG

For someone used to cross-platform .NET SDK projects, I've never had a situation where I could not even check out a branch, but here we are:

error: Your local changes to the following files would be overwritten by checkout:
        NppCSharpPluginPack/Resources/about form icon.PNG
        NppCSharpPluginPack/Resources/about form toolbar darkmode.PNG
        NppCSharpPluginPack/Resources/close html tag icon darkmode.PNG
        NppCSharpPluginPack/Resources/close html tag icon.PNG
        NppCSharpPluginPack/Resources/selection remembering form icon darkmode.PNG
        NppCSharpPluginPack/Resources/selection remembering form icon.PNG
        docs/about form.PNG
        docs/all forms MossyLawn.PNG
        docs/all forms dark mode.PNG
        docs/all forms default style.PNG
        docs/popup dialog.PNG
        docs/selections remembering form.PNG
        docs/settings form.PNG
Please commit your changes or stash them before you switch branches.

A .gitignore would be nice to have, too. Just type "Csharp" into the one-click generator at https://www.toptal.com/developers/gitignore

@rdipardo
Copy link
Contributor Author

Superseded by #4

@rdipardo rdipardo closed this Feb 27, 2024
@rdipardo rdipardo deleted the refactor/unmanaged-exports branch February 27, 2024 00:48
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.

None yet

2 participants