Skip to content

Commit

Permalink
Added Readme file to NuGet package. This fixes #661.
Browse files Browse the repository at this point in the history
  • Loading branch information
ravibpatel committed Feb 14, 2024
1 parent 119693c commit b15a8fb
Show file tree
Hide file tree
Showing 9 changed files with 49 additions and 4 deletions.
1 change: 1 addition & 0 deletions AutoUpdater.NET.sln
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution
appveyor.yml = appveyor.yml
LICENSE = LICENSE
README.md = README.md
build.bat = build.bat
EndProjectSection
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ZipExtractor", "ZipExtractor\ZipExtractor.csproj", "{EDB311FC-50D3-468B-AC36-4CDFE04D29A3}"
Expand Down
2 changes: 1 addition & 1 deletion AutoUpdater.NET/AutoUpdater.NET.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
<PackageTags>autoupdate updater c# vb wpf winforms</PackageTags>
<PackageReleaseNotes>https://github.com/ravibpatel/AutoUpdater.NET/releases</PackageReleaseNotes>
<PackageOutputPath>build</PackageOutputPath>
<DocumentationFile>$(OutputPath)\$(Configuration)\AutoUpdater.NET.xml</DocumentationFile>
<DocumentationFile>$(OutDir)\AutoUpdater.NET.xml</DocumentationFile>
<LangVersion>latest</LangVersion>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)' == 'Release' ">
Expand Down
4 changes: 4 additions & 0 deletions AutoUpdater.NET/build/Autoupdater.NET.Official.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
<authors>rbsoft</authors>
<requireLicenseAcceptance>false</requireLicenseAcceptance>
<license type="expression">MIT</license>
<readme>docs\README.md</readme>
<licenseUrl>https://licenses.nuget.org/MIT</licenseUrl>
<projectUrl>https://github.com/ravibpatel/AutoUpdater.NET</projectUrl>
<description>AutoUpdater.NET is a class library that allows .NET developers to easily add auto update
Expand Down Expand Up @@ -65,4 +66,7 @@
<frameworkAssembly assemblyName="WindowsBase" targetFramework=".NETFramework4.5"/>
</frameworkAssemblies>
</metadata>
<files>
<file src="..\..\README.md" target="docs\"/>
</files>
</package>
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -574,7 +574,10 @@ You can follow below steps to build the project on your local development enviro
<TargetFramework>net5.0-windows</TargetFramework>
```

* Build ZipExtractor project in "Release" configuration to create the executable in Resources folder. While compiling it for .NET Core 3.1 or above, you have to use publish command instead of build as shown [here](https://learn.microsoft.com/en-us/dotnet/core/tutorials/publishing-with-visual-studio?pivots=dotnet-7-0) and copy the resulting executable to "AutoUpdater.NET/Resources" folder.
* Build ZipExtractor project in "Release" configuration to create the executable in Resources folder. While compiling it
for .NET Core 3.1 or above, you have to use publish command instead of build as
shown [here](https://learn.microsoft.com/en-us/dotnet/core/tutorials/publishing-with-visual-studio?pivots=dotnet-7-0)
and copy the resulting executable to "AutoUpdater.NET/Resources" folder.
* VS2022 doesn't allow building .NET Framework 4.5 by default, so if you are using it then you can just change it to any
supported .NET version, or you have to follow steps from [here](https://stackoverflow.com/a/70109092/1273550) to use
.NET Framework 4.5.
2 changes: 1 addition & 1 deletion ZipExtractor/FormMain.cs
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ private void FormMain_Shown(object sender, EventArgs e)
{
_logBuilder.AppendLine("Waiting for application process to exit...");
_backgroundWorker.ReportProgress(0, "Waiting for application to exit...");
_backgroundWorker.ReportProgress(0, Resources.WaitingForAppToExitMessage);
process.WaitForExit();
}
}
Expand Down
9 changes: 9 additions & 0 deletions ZipExtractor/Properties/Resources.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions ZipExtractor/Properties/Resources.resx
Original file line number Diff line number Diff line change
Expand Up @@ -142,4 +142,7 @@
<data name="Removing" xml:space="preserve">
<value>Removing {0}</value>
</data>
<data name="WaitingForAppToExitMessage" xml:space="preserve">
<value>Waiting for application to exit…</value>
</data>
</root>
2 changes: 1 addition & 1 deletion appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ install:
- secure-file\tools\secure-file -decrypt "c:\projects\AutoUpdater.NET\ZipExtractor\ZipExtractor.snk.enc" -secret %my_secret%
- secure-file\tools\secure-file -decrypt "c:\projects\AutoUpdater.NET\AutoUpdater.NET\AutoUpdater.NET.snk.enc" -secret %my_secret%
- msbuild "c:\projects\AutoUpdater.NET\ZipExtractor\ZipExtractor.csproj" /p:TargetFramework=net45;Configuration=Release /verbosity:minimal /logger:"C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll"
- msbuild "c:\projects\AutoUpdater.NET\AutoUpdater.NET\AutoUpdater.NET.csproj" /p:TargetFramework=net45;Configuration=Release /verbosity:minimal /logger:"C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll"
- msbuild "c:\projects\AutoUpdater.NET\AutoUpdater.NET\AutoUpdater.NET.csproj" /p:OutputPath=build\lib\net45;TargetFramework=net45;Configuration=Release /verbosity:minimal /logger:"C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll"
- dotnet publish --configuration Release --framework netcoreapp3.1 "c:\projects\AutoUpdater.NET\ZipExtractor\ZipExtractor.csproj" --output "c:\projects\AutoUpdater.NET\AutoUpdater.NET\Resources"
- dotnet publish --configuration Release --framework netcoreapp3.1 "c:\projects\AutoUpdater.NET\AutoUpdater.NET\AutoUpdater.NET.csproj" --output "c:\projects\AutoUpdater.NET\AutoUpdater.NET\build\lib\netcoreapp3.1"
- dotnet publish --configuration Release --framework net5.0-windows "c:\projects\AutoUpdater.NET\ZipExtractor\ZipExtractor.csproj" --output "c:\projects\AutoUpdater.NET\AutoUpdater.NET\Resources"
Expand Down
25 changes: 25 additions & 0 deletions build.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
:: .NET Framework 4.5
msbuild "ZipExtractor\ZipExtractor.csproj" /p:TargetFramework=net45;Configuration=Release /verbosity:minimal
msbuild "AutoUpdater.NET\AutoUpdater.NET.csproj" /p:OutputPath=build\lib\net45;TargetFramework=net45;Configuration=Release /verbosity:minimal

:: .NET Core 3.1
dotnet publish --configuration Release --framework netcoreapp3.1 "ZipExtractor\ZipExtractor.csproj" --output "AutoUpdater.NET\Resources"
dotnet publish --configuration Release --framework netcoreapp3.1 "AutoUpdater.NET\AutoUpdater.NET.csproj" --output "AutoUpdater.NET\build\lib\netcoreapp3.1"

:: .NET 5.0
dotnet publish --configuration Release --framework net5.0-windows "ZipExtractor\ZipExtractor.csproj" --output "AutoUpdater.NET\Resources"
dotnet publish --configuration Release --framework net5.0-windows "AutoUpdater.NET\AutoUpdater.NET.csproj" --output "AutoUpdater.NET\build\lib\net5.0-windows7.0"

:: .NET 6.0
dotnet publish --configuration Release --framework net6.0-windows "ZipExtractor\ZipExtractor.csproj" --output "AutoUpdater.NET\Resources"
dotnet publish --configuration Release --framework net6.0-windows "AutoUpdater.NET\AutoUpdater.NET.csproj" --output "AutoUpdater.NET\build\lib\net6.0-windows7.0"

:: .NET 7.0
dotnet publish --configuration Release --framework net7.0-windows "ZipExtractor\ZipExtractor.csproj" --output "AutoUpdater.NET\Resources"
dotnet publish --configuration Release --framework net7.0-windows "AutoUpdater.NET\AutoUpdater.NET.csproj" --output "AutoUpdater.NET\build\lib\net7.0-windows7.0"

:: .NET 8.0
dotnet publish --configuration Release --framework net8.0-windows "ZipExtractor\ZipExtractor.csproj" --output "AutoUpdater.NET\Resources"
dotnet publish --configuration Release --framework net8.0-windows "AutoUpdater.NET\AutoUpdater.NET.csproj" --output "AutoUpdater.NET\build\lib\net8.0-windows7.0"

pause

0 comments on commit b15a8fb

Please sign in to comment.