내 응용 프로그램의 업데이트 프레임 워크로 Squirrel.Windows를 사용하고 있고 1.4.4에서 최신 버전 1.5.2로 업그레이드했으며 NuGet을 통해 업그레이드 한 후 UpdateManager 클래스가 액세스 할 수 없게되었습니다. 보호 수준입니다.보호 등급으로 인해 공용 클래스에 액세스 할 수 없음
샘플 프로젝트를 생성하고 NuGet을 통해 Squirrel.Windows Nuget 패키지를 가져 오면 문제없이 UpdateManager 클래스의 인스턴스를 인스턴스화 할 수있었습니다. Squirrel.Windows 프로젝트와 관련된 모든 NuGet 패키지를 제거하고 패키지를 가져온 후에 csproj에 남아있는 정보를 정리했습니다. 패키지를 다시 가져온 후에도 여전히 클래스에 액세스 할 수 없었습니다.
namespace Our.Core
{
public class Launcher
{
public static void Main(string[] args)
{
new Launcher(args);
}
public async Task<bool> TryUpdate(string[] args)
{
try
{
using (var mgr = new UpdateManager(UpdatePath, null, null, null))
{
Log.Information("Checking for updates");
var updateInfo = await mgr.CheckForUpdate();
if (updateInfo.ReleasesToApply.Any())
{
Log.Information("Downloading updates");
await mgr.DownloadReleases(updateInfo.ReleasesToApply);
Log.Information("Applying updates");
await mgr.ApplyReleases(updateInfo);
return true;
}
Log.Information("No updates found.");
return false;
}
}
catch (Exception e)
{
Log.Error(e, "Error while updating");
return false;
}
}
}
}