diff --git a/.github/workflows/on-push-run-build.yml b/.github/workflows/on-push-run-build.yml new file mode 100644 index 00000000..229ae324 --- /dev/null +++ b/.github/workflows/on-push-run-build.yml @@ -0,0 +1,42 @@ +name: on-push-run-build +on: [push, pull_request] + +env: + # Opt out of telemetry + DOTNET_CLI_TELEMETRY_OPTOUT: 1 + DOTNET_NOLOGO: 1 + +jobs: + build_linux: + + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + + - name: Setup .NET Core 3.1 + uses: actions/setup-dotnet@v1 + with: + dotnet-version: '3.1.x' + + - name: Build with dotnet + run: dotnet build --configuration Debug + + - name: Run unit tests + run: dotnet test --no-build -c Debug + + build_windows: + + runs-on: windows-latest + steps: + - uses: actions/checkout@v2 + + - name: Setup .NET Core 3.1 + uses: actions/setup-dotnet@v1 + with: + dotnet-version: '3.1.x' + + - name: Build with dotnet + run: dotnet build --configuration Debug + + - name: Run unit tests + run: dotnet test --no-build -c Debug diff --git a/.gitignore b/.gitignore index c1643193..e1801ea3 100644 --- a/.gitignore +++ b/.gitignore @@ -11,6 +11,7 @@ *.sln.docstates *.pidb *.userprefs +*.idea # Build results [Dd]ebug/ diff --git a/MethodDecorator.Fody.PnP.Tests/AssemblyExtensions.cs b/MethodDecorator.Fody.PnP.Tests/AssemblyExtensions.cs deleted file mode 100644 index 6ead6cae..00000000 --- a/MethodDecorator.Fody.PnP.Tests/AssemblyExtensions.cs +++ /dev/null @@ -1,21 +0,0 @@ -using System; -using System.Reflection; - -namespace MethodDecorator.Fody.Tests -{ - public static class AssemblyExtensions - { - public static dynamic GetInstance(this Assembly assembly, string className) - { - var type = assembly.GetType(className, true); - //dynamic instance = FormatterServices.GetUninitializedObject(type); - return Activator.CreateInstance(type); - } - - public static dynamic GetStaticInstance(this Assembly assembly, string className) - { - var type = assembly.GetType(className, true); - return new StaticMembersDynamicWrapper(type); - } - } -} \ No newline at end of file diff --git a/MethodDecorator.Fody.PnP.Tests/MethodDecorator.Fody.PnP.Tests.csproj b/MethodDecorator.Fody.PnP.Tests/MethodDecorator.Fody.PnP.Tests.csproj index 5ea328a2..d8e8e3b0 100644 --- a/MethodDecorator.Fody.PnP.Tests/MethodDecorator.Fody.PnP.Tests.csproj +++ b/MethodDecorator.Fody.PnP.Tests/MethodDecorator.Fody.PnP.Tests.csproj @@ -1,7 +1,7 @@  - net472;netcoreapp2.2 + netcoreapp3.1 true @@ -9,7 +9,6 @@ - diff --git a/MethodDecorator.Fody.Tests/MethodDecorator.Fody.Tests.csproj b/MethodDecorator.Fody.Tests/MethodDecorator.Fody.Tests.csproj index a162cc32..58a8b0b2 100644 --- a/MethodDecorator.Fody.Tests/MethodDecorator.Fody.Tests.csproj +++ b/MethodDecorator.Fody.Tests/MethodDecorator.Fody.Tests.csproj @@ -1,7 +1,7 @@  - net472;netcoreapp2.2 + netcoreapp3.1 true diff --git a/MethodDecorator.Fody.sln b/MethodDecorator.Fody.sln index 2623bf3f..5f4e1720 100644 --- a/MethodDecorator.Fody.sln +++ b/MethodDecorator.Fody.sln @@ -20,7 +20,7 @@ EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{40A4C9F0-C6C6-467D-B076-E9F0EBB4A7B4}" ProjectSection(SolutionItems) = preProject Directory.Build.props = Directory.Build.props - README.md = README.md + readme.md = readme.md EndProjectSection EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MethodDecorator.Fody.PnP.Tests", "MethodDecorator.Fody.PnP.Tests\MethodDecorator.Fody.PnP.Tests.csproj", "{8B02CB9B-FBF7-4D55-AB6E-12122472122C}" diff --git a/MethodDecorator/MethodDecorator.csproj b/MethodDecorator/MethodDecorator.csproj index a5e039fd..9cfaf80a 100644 --- a/MethodDecorator/MethodDecorator.csproj +++ b/MethodDecorator/MethodDecorator.csproj @@ -7,7 +7,7 @@ Simon Cropp, Matt Ellis, Alexey Suvorov, Andy Hoyle, Tony (@megafinz), and contributors Fody add-in to decorate arbitrary methods to run code before and after invocation. ILWeaving Fody AOP - CS1591;NU5228 + CS1591;NU5228;NU5118 $(SolutionDir)nugets https://raw.githubusercontent.com/Fody/MethodDecorator/master/package_icon.png https://github.com/Fody/MethodDecorator @@ -16,4 +16,8 @@ + + + + \ No newline at end of file diff --git a/TestAssemblies/AnotherAssemblyAttributeContainer/AnotherAssemblyAttributeContainer.csproj b/TestAssemblies/AnotherAssemblyAttributeContainer/AnotherAssemblyAttributeContainer.csproj index 688f3a41..a6411412 100644 --- a/TestAssemblies/AnotherAssemblyAttributeContainer/AnotherAssemblyAttributeContainer.csproj +++ b/TestAssemblies/AnotherAssemblyAttributeContainer/AnotherAssemblyAttributeContainer.csproj @@ -1,7 +1,11 @@  - net472;netstandard2.0 + net452;netstandard2.0 true + + + + \ No newline at end of file diff --git a/TestAssemblies/SimpleTest.PnP/SimpleTest.PnP.csproj b/TestAssemblies/SimpleTest.PnP/SimpleTest.PnP.csproj index 3d2f1095..f410faa5 100644 --- a/TestAssemblies/SimpleTest.PnP/SimpleTest.PnP.csproj +++ b/TestAssemblies/SimpleTest.PnP/SimpleTest.PnP.csproj @@ -1,10 +1,14 @@  - net472;netstandard2.0 + net452;netstandard2.0 true + + + + \ No newline at end of file diff --git a/TestAssemblies/SimpleTest/SimpleTest.csproj b/TestAssemblies/SimpleTest/SimpleTest.csproj index 691b424e..1c19550b 100644 --- a/TestAssemblies/SimpleTest/SimpleTest.csproj +++ b/TestAssemblies/SimpleTest/SimpleTest.csproj @@ -1,11 +1,15 @@  - net472;netstandard2.0 + net452;netstandard2.0 true + + + + \ No newline at end of file