Skip to content

Commit

Permalink
Fixed compilation.
Browse files Browse the repository at this point in the history
  • Loading branch information
lextm committed Oct 16, 2024
1 parent 74395d5 commit 8bfa0e2
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion SharpSnmpLib/Messaging/Discoverer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ public void Discover(VersionCode version, IPEndPoint broadcastAddress, OctetStri
using var udp = new UdpClient(addressFamily);
if (addressFamily == AddressFamily.InterNetworkV6)
{
udp.JoinMulticastGroup((IPAddress?)broadcastAddress.Address);
udp.JoinMulticastGroup(broadcastAddress.Address);
}
else if (addressFamily == AddressFamily.InterNetwork)
{
Expand Down
4 changes: 2 additions & 2 deletions SharpSnmpLib/SharpSnmpLib.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@
<ItemGroup Condition="'$(TargetFramework)'=='net471'">
<Reference Include="System.Configuration" />
</ItemGroup>
<Target Name="PostBuild" AfterTargets="PostBuildEvent" Condition=" '$(OS)' == 'Windows_NT' ">
<Exec Command="powershell -ExecutionPolicy Bypass -file ..\sign.assembly.ps1 &quot;$(TargetPath)&quot;" />
<Target Name="PostBuild" AfterTargets="PostBuildEvent" Condition=" '$(OS)' == 'Windows_NT' AND '$(Configuration)' == 'Release' ">
<Exec Command="pwsh -ExecutionPolicy Bypass -file ..\sign.assembly.ps1 &quot;$(TargetPath)&quot;" />
</Target>
</Project>
2 changes: 1 addition & 1 deletion build.release.bat
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
rmdir /S /Q bin
powershell -ExecutionPolicy Bypass -file release.ps1
pwsh -ExecutionPolicy Bypass -file release.ps1
IF %ERRORLEVEL% NEQ 0 goto failed

echo succeeded.
Expand Down
4 changes: 2 additions & 2 deletions dist.nuget.bat
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ del *.nupkg
del *.snupkg
call build.release.bat
IF %ERRORLEVEL% NEQ 0 exit /b 1
powershell -ExecutionPolicy Bypass -file sign3.ps1
pwsh -ExecutionPolicy Bypass -file sign3.ps1
IF %ERRORLEVEL% NEQ 0 exit /b 1
copy SharpSnmpLib\bin\Release\*.nupkg .
copy SharpSnmpLib\bin\Release\*.snupkg .

powershell -ExecutionPolicy Bypass -file sign.nuget.ps1
pwsh -ExecutionPolicy Bypass -file sign.nuget.ps1
@IF %ERRORLEVEL% NEQ 0 exit /b 1
2 changes: 1 addition & 1 deletion sign.assembly.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ if ($env:CI -eq "true") {
$cert = Get-ChildItem -Path Cert:\CurrentUser\My -CodeSigningCert | Select-Object -First 1
if ($null -eq $cert) {
Write-Host "No code signing certificate found in MY store. Exit."
exit 1
exit 0
}

$signtool = Get-ChildItem -Path "${env:ProgramFiles(x86)}\Windows Kits" -Recurse -Filter "signtool.exe" | Select-Object -First 1 -ExpandProperty FullName
Expand Down

0 comments on commit 8bfa0e2

Please sign in to comment.