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

Migrates to net core #114

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

AdamJamesNaylor
Copy link

No description provided.

@AdamJamesNaylor
Copy link
Author

The main issues were:

@@ -17,10 +17,10 @@ namespace NAppUpdate.Framework.Utils
/// Starts the cold update process by extracting the updater app from the library's resources,
/// passing it all the data it needs and terminating the current application
/// </summary>
internal static class NauIpc
public static class NauIpc
Copy link
Author

Choose a reason for hiding this comment

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

I had to elevate the access here so that the tests would build. Not sure how internal was possible before?

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace NAppUpdate.Tests.Conditions
{
using Xunit;
Copy link
Author

Choose a reason for hiding this comment

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

The only real change to the test project was moving it across to XUnit. I have no preference on net core test frameworks but I know XUnit works.

{
var rules = Directory.GetAccessControl(path).GetAccessRules(true, true, typeof(SecurityIdentifier));
public static bool HaveWritePermissionsForFileOrFolder(string path) {
var rules = new FileSecurity(path, AccessControlSections.All).GetAccessRules(true, true, typeof(SecurityIdentifier));
Copy link
Author

Choose a reason for hiding this comment

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

This functionality currently isn't covered by tests (I believe?), happy to fill this gap if needed.

<Compile Include="Utils\PermissionsCheck.cs" />
<Compile Include="Utils\ProcessStartFailedException.cs" />
<Compile Include="Utils\Reflection.cs" />
<PackageReference Include="Microsoft.Windows.Compatibility" Version="2.0.0-preview1-25914-04" />
Copy link
Author

Choose a reason for hiding this comment

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

If you didn't want this dependency you could consider making the RegistryTask more 'optional'.

@synhershko
Copy link
Owner

Thank you @AdamJamesNaylor for you work! can you please ping me when this is ready for review and testing?

Thanks!

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