Skip to content

Commit baeb86b

Browse files
authored
Merge pull request #10 from NetOfficeFw/nuspec
Build tasks package `NetOfficeFw.Build` to help with development of NetOffice add-ins.
2 parents 73e43f5 + 89145a7 commit baeb86b

27 files changed

+399
-54
lines changed

.github/workflows/build.yml

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: build
22

33
on:
44
push:
5-
branches: [ main, build ]
5+
branches: [ main, nuspec ]
66
pull_request:
77
branches: [ main ]
88

@@ -17,6 +17,7 @@ jobs:
1717

1818
env:
1919
Configuration: ${{ matrix.configuration }}
20+
VersionSuffix: 'preview-${{ github.run_number }}'
2021

2122
steps:
2223
- name: checkout
@@ -33,4 +34,17 @@ jobs:
3334
uses: microsoft/setup-msbuild@v1
3435

3536
- name: build
36-
run: dotnet build
37+
run: dotnet build -c ${{ env.Configuration }}
38+
39+
- name: test
40+
run: dotnet test --no-build --no-restore -c ${{ env.Configuration }}
41+
42+
- name: pack
43+
run: dotnet pack --no-build --no-restore src/NetOfficeFw.Build.csproj -c ${{ env.Configuration }} -o dist
44+
45+
- name: archive
46+
if: always()
47+
uses: actions/upload-artifact@v3
48+
with:
49+
name: NetOfficeFw.Build-${{ env.VersionSuffix }}.nupkg
50+
path: dist/NetOfficeFw.Build.*.nupkg
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@ Microsoft Visual Studio Solution File, Format Version 12.00
33
# Visual Studio Version 16
44
VisualStudioVersion = 16.0.31112.23
55
MinimumVisualStudioVersion = 10.0.40219.1
6-
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "NetOfficeBuildTasks", "src\NetOfficeBuildTasks.csproj", "{096477F4-FB4B-48B8-9434-D6BB431BD804}"
6+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "NetOfficeFw.Build", "src\NetOfficeFw.Build.csproj", "{096477F4-FB4B-48B8-9434-D6BB431BD804}"
77
EndProject
88
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tests", "tests", "{D882D57B-25C0-4F58-BFD5-3333A225330D}"
99
EndProject
10-
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "NetOfficeBuildTasksTests", "tests\NetOfficeBuildTasksTests\NetOfficeBuildTasksTests.csproj", "{6752B240-B879-4475-8CFF-05E245ECA8CB}"
10+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "NetOfficeFw.Build.Tests", "tests\NetOfficeFw.Build.Tests\NetOfficeFw.Build.Tests.csproj", "{6752B240-B879-4475-8CFF-05E245ECA8CB}"
1111
EndProject
1212
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AcmeCorpAddinNet46", "tests\AcmeCorpAddinNet46\AcmeCorpAddinNet46.csproj", "{AF3BE9D3-6DF1-4DB9-8C5B-4E8EDA88481A}"
1313
EndProject

src/.markdownlint.json

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
{
2+
"default": true,
3+
"first-line-heading": false,
4+
"no-multiple-blanks": {
5+
"maximum": 2
6+
},
7+
"line-length": {
8+
"line_length": 120,
9+
"strict": false
10+
},
11+
"blanks-around-fences": {
12+
"list_items": false
13+
}
14+
}

src/AssemblyEx.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
using System.Linq;
44
using System.Reflection;
55

6-
namespace NetOffice.Build
6+
namespace NetOfficeFw.Build
77
{
88
public static class AssemblyEx
99
{

src/CleanAddin.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
using Microsoft.Build.Framework;
44
using Microsoft.Build.Utilities;
55

6-
namespace NetOffice.Build
6+
namespace NetOfficeFw.Build
77
{
88
public class CleanAddin : Task
99
{
@@ -36,7 +36,7 @@ public override bool Execute()
3636

3737
var guidComClass = guid.ToRegistryString();
3838

39-
Log.LogMessage(MessageImportance.High, $@"Cleaning {progId} {guidComClass}");
39+
Log.LogMessage(MessageImportance.High, $@"Cleaning class {progId} with GUID {guidComClass}");
4040

4141
var comClass = new ComClassRegistry(this.Log);
4242
comClass.DeleteProgId(progId);
@@ -52,7 +52,7 @@ public override bool Execute()
5252
foreach (var officeAppItem in this.OfficeApps)
5353
{
5454
var officeApp = officeAppItem.ItemSpec;
55-
Log.LogMessage(MessageImportance.High, $@"Cleaning add-in {progId} from Microsoft Office application {officeApp}");
55+
Log.LogMessage(MessageImportance.High, $@"Cleaning add-in {progId} from Microsoft Office {officeApp}");
5656
comClass.DeleteOfficeAddin(officeApp, progId);
5757
}
5858
}

src/ComClassRegistry.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
using Microsoft.Build.Utilities;
44
using Microsoft.Win32;
55

6-
namespace NetOffice.Build
6+
namespace NetOfficeFw.Build
77
{
88
public class ComClassRegistry
99
{

src/GuidEx.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
using System;
22

3-
namespace NetOffice.Build
3+
namespace NetOfficeFw.Build
44
{
55
public static class GuidEx
66
{

src/Icon.png

3.07 KB
Loading

src/NetOfficeBuildTasks.csproj

Lines changed: 0 additions & 27 deletions
This file was deleted.

src/NetOfficeFw.Build.csproj

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
<Project Sdk="Microsoft.NET.Sdk">
2+
3+
<PropertyGroup>
4+
<PackageId>NetOfficeFw.Build</PackageId>
5+
<TargetFrameworks>net462</TargetFrameworks>
6+
<RootNamespace>NetOfficeFw.Build</RootNamespace>
7+
<LangVersion>8</LangVersion>
8+
<BuildOutputTargetFolder>tasks</BuildOutputTargetFolder>
9+
</PropertyGroup>
10+
11+
<PropertyGroup>
12+
<VersionPrefix>2.0.0</VersionPrefix>
13+
</PropertyGroup>
14+
15+
<PropertyGroup>
16+
<Product>NetOffice</Product>
17+
<AssemblyTitle>NetOffice Build Tasks</AssemblyTitle>
18+
<Description>NetOffice build extensions for developing Microsoft Office add-ins. Helps with registering and cleanup of NetOffice add-ins during development.</Description>
19+
<Copyright>Copyright © 2021 Jozef Izso</Copyright>
20+
<Company>NetOfficeFw</Company>
21+
<Authors>Jozef Izso</Authors>
22+
<RepositoryUrl>https://github.com/NetOfficeFw/BuildTasks.git</RepositoryUrl>
23+
<PackageProjectUrl>https://github.com/NetOfficeFw/BuildTasks</PackageProjectUrl>
24+
<PackageLicenseExpression>MIT</PackageLicenseExpression>
25+
<PackageReadmeFile>README.md</PackageReadmeFile>
26+
<PackageIcon>Icon.png</PackageIcon>
27+
</PropertyGroup>
28+
29+
<PropertyGroup>
30+
<IsPackable>true</IsPackable>
31+
32+
<PackageTags>MSBuild Tasks Office addin extensions NetOffice NetOfficeFw</PackageTags>
33+
<DevelopmentDependency>true</DevelopmentDependency>
34+
<SuppressDependenciesWhenPacking>true</SuppressDependenciesWhenPacking>
35+
36+
<!-- NU5100: this package is build tasks only and does not contain anyreferencable libraries -->
37+
<NoWarn>NU5100</NoWarn>
38+
</PropertyGroup>
39+
40+
<ItemGroup>
41+
<PackageReference Include="Microsoft.Build.Framework" Version="15.1.1012" PrivateAssets="All" />
42+
<PackageReference Include="Microsoft.Build.Utilities.Core" Version="15.1.1012" PrivateAssets="All" />
43+
</ItemGroup>
44+
45+
<ItemGroup>
46+
<None Include="README.md" Pack="true" PackagePath="\" />
47+
<None Include="Icon.png" Pack="true" PackagePath="\" />
48+
</ItemGroup>
49+
50+
<ItemGroup>
51+
<None Include="build/NetOfficeFw.Build.props" Pack="true" PackagePath="build\" />
52+
<None Include="build/NetOfficeFw.Build.targets" Pack="true" PackagePath="build\" />
53+
</ItemGroup>
54+
</Project>

0 commit comments

Comments
 (0)