Skip to content

Commit

Permalink
Fix for #224 #223 and hopefuly for #220
Browse files Browse the repository at this point in the history
  • Loading branch information
pamidur committed Oct 6, 2023
1 parent 8d6b5fd commit f32c163
Show file tree
Hide file tree
Showing 11 changed files with 39 additions and 22 deletions.
6 changes: 6 additions & 0 deletions global.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"sdk": {
"version": "6.0.0",
"rollForward": "latestMinor"
}
}
26 changes: 17 additions & 9 deletions nuget/AspectInjector.Package.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -54,23 +54,25 @@
<Target Name="ConfigurePublish">
<ItemGroup>
<PublishRids Include="$(PublishForRuntimes)" />
</ItemGroup>
</ItemGroup>

<PropertyGroup>
<PublishMain>$(TargetDir)../publish_main/</PublishMain>
<PublishAnalyzer>$(TargetDir)../publish_analyzer/</PublishAnalyzer>
<PublishBroker>$(MSBuildThisFileDirectory)../src/AspectInjector.Broker/bin/$(Configuration)/$(TargetFramework)</PublishBroker>
<PublishBrokerLegacy>$(MSBuildThisFileDirectory)../src/AspectInjector.Broker/bin/$(Configuration)/net2.0</PublishBrokerLegacy>
<PublishBroker>$(MSBuildThisFileDirectory)../src/AspectInjector.Broker/bin/$(Configuration)/netstandard2.0</PublishBroker>
</PropertyGroup>
</Target>

<Target Name="PublishBinaries" DependsOnTargets="ConfigurePublish">
<Target Name="PublishBinaries" DependsOnTargets="ConfigurePublish">

<PropertyGroup>
<BuildCommandArgs> --self-contained -c $(Configuration) -p:Version=&quot;$(Version)&quot; -p:InformationalVersion=&quot;$(Version):$(CommitSHA)&quot; ../src/AspectInjector/</BuildCommandArgs>
</PropertyGroup>
</PropertyGroup>

<!--<Exec Command="dotnet build ../src/AspectInjector.Broker/ -c $(Configuration)" />-->
<Exec Command="dotnet publish -r %(PublishRids.Identity) -o $(PublishMain)%(PublishRids.Identity)/ $(BuildCommandArgs)" />
<Exec Command="dotnet publish ../src/AspectInjector.Analyzer/ -o $(PublishAnalyzer) -c $(Configuration) --no-build" />
<Exec Command="dotnet publish ../src/AspectInjector.Analyzer/ -o $(PublishAnalyzer) -c $(Configuration) --no-build" />

<ItemGroup>
<TfmSpecificPackageFile Include="$(PublishMain)/**/*.*">
Expand All @@ -80,10 +82,16 @@

<ItemGroup>
<TfmSpecificPackageFile Include="$(PublishBroker)/AspectInjector.Broker.dll">
<PackagePath>lib/$(TargetFramework)</PackagePath>
<PackagePath>lib/netstandard2.0</PackagePath>
</TfmSpecificPackageFile>
<TfmSpecificPackageFile Include="$(PublishBroker)/AspectInjector.Broker.xml">
<PackagePath>lib/$(TargetFramework)</PackagePath>
<PackagePath>lib/netstandard2.0</PackagePath>
</TfmSpecificPackageFile>
<TfmSpecificPackageFile Include="$(PublishBrokerLegacy)/AspectInjector.Broker.dll">
<PackagePath>lib/net2.0</PackagePath>
</TfmSpecificPackageFile>
<TfmSpecificPackageFile Include="$(PublishBrokerLegacy)/AspectInjector.Broker.xml">
<PackagePath>lib/net2.0</PackagePath>
</TfmSpecificPackageFile>
</ItemGroup>

Expand All @@ -97,10 +105,10 @@
</ItemGroup>
</Target>

<Target Name="SignOSXBinaries" DependsOnTargets="ConfigurePublish" Condition=" '$(Configuration)' == 'Release' AND '$(OSXCertPath)' != '' ">
<Target Name="SignOSXBinaries" DependsOnTargets="ConfigurePublish" Condition=" '$(Configuration)' == 'Release' AND '$(OSXCertPath)' != '' ">

<ItemGroup>
<PublishOSXRids Include="@(PublishRids)" Condition="$([System.String]::Copy(%(Identity)).StartsWith('osx-arm'))"/>
<PublishOSXRids Include="@(PublishRids)" Condition="$([System.String]::Copy(%(Identity)).StartsWith('nouse'))"/>
</ItemGroup>

<Exec Command="$(MSBuildThisFileDirectory)/rcodesign sign --pem-source $(OSXCertPath) $(PublishMain)%(PublishOSXRids.Identity)/AspectInjector" />
Expand Down
1 change: 1 addition & 0 deletions nuget/build/AspectInjector.targets
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
<PropertyGroup Condition="'$(AspectInjector_Location)' == ''">
<AspectInjector_Location Condition="$([MSBuild]::IsOSPlatform('OSX')) AND '$([System.Runtime.InteropServices.RuntimeInformation]::OSArchitecture)' == 'X64'">$(MSBuildThisFileDirectory)../../build/_bin/osx-x64/AspectInjector</AspectInjector_Location>
<AspectInjector_Location Condition="$([MSBuild]::IsOSPlatform('OSX')) AND '$([System.Runtime.InteropServices.RuntimeInformation]::OSArchitecture)' == 'Arm64'">$(MSBuildThisFileDirectory)../../build/_bin/osx-arm64/AspectInjector</AspectInjector_Location>
<AspectInjector_Location Condition="$([MSBuild]::IsOSPlatform('OSX')) AND '$(AspectInjector_UseRosetta)' == 'true'">$(MSBuildThisFileDirectory)../../build/_bin/osx-x64/AspectInjector</AspectInjector_Location>
<AspectInjector_Location Condition="$([MSBuild]::IsOSPlatform('Windows')) AND '$([System.Runtime.InteropServices.RuntimeInformation]::OSArchitecture)' == 'X64'">$(MSBuildThisFileDirectory)../../build/_bin/win-x64/AspectInjector.exe</AspectInjector_Location>
<AspectInjector_Location Condition="$([MSBuild]::IsOSPlatform('Windows')) AND '$([System.Runtime.InteropServices.RuntimeInformation]::OSArchitecture)' == 'Arm64'">$(MSBuildThisFileDirectory)../../build/_bin/win-arm64/AspectInjector.exe</AspectInjector_Location>
<AspectInjector_Location Condition="$([MSBuild]::IsOSPlatform('Linux')) AND '$([System.Runtime.InteropServices.RuntimeInformation]::OSArchitecture)' == 'X64' AND !Exists('/lib/libc.musl-x86_64.so.1')">$(MSBuildThisFileDirectory)../../build/_bin/linux-x64/AspectInjector</AspectInjector_Location>
Expand Down
4 changes: 3 additions & 1 deletion samples/Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@
<Authors>Aspect Injector Contributors</Authors>
<Company>Aspect Injector Contributors</Company>
<PackageLicenseExpression>MIT</PackageLicenseExpression>
<PackageIcon>package.png</PackageIcon>
<PackageIcon>package.png</PackageIcon>
<SignAssembly>True</SignAssembly>
<AssemblyOriginatorKeyFile>$(MSBuildThisFileDirectory)../src/AspectInjector.Broker/_key.snk</AssemblyOriginatorKeyFile>
</PropertyGroup>
<ItemGroup>
<None Include="$(MSBuildThisFileDirectory)../package.png" Pack="true" PackagePath="\" />
Expand Down
2 changes: 1 addition & 1 deletion samples/src/Cache/Aspects.Cache.csproj
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<Version>2.0.3</Version>
<Version>2.0.4</Version>
<TargetFramework>netstandard2.0</TargetFramework>
<LangVersion>8.0</LangVersion>
<PackageTags>aspect cache memorycache method methodcache</PackageTags>
Expand Down
4 changes: 2 additions & 2 deletions samples/src/Freezable/Aspects.Freezable.csproj
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<Version>1.0.2</Version>
<Version>1.0.3</Version>
<TargetFramework>netstandard2.0</TargetFramework>
<PackageTags>aspect freezable pattern attribute</PackageTags>
<Description>This package provides simple freezable pattern implementation. Put [Freezable] attribure on your properties or a whole class. Then cast your objects to IFreezable when needed.
Expand Down
2 changes: 1 addition & 1 deletion samples/src/Lazy/Aspects.Lazy.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<Version>1.0.0</Version>
<Version>1.0.1</Version>
<TargetFramework>netstandard2.0</TargetFramework>
<PackageTags>aspect lazy attribute</PackageTags>
<Description>
Expand Down
4 changes: 2 additions & 2 deletions samples/src/Logging/Aspects.Logging.csproj
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<Version>1.0.0</Version>
<Version>1.0.1</Version>
<LangVersion>8.0</LangVersion>
<TargetFramework>netstandard2.0</TargetFramework>
<PackageTags>aspect lazy attribute</PackageTags>
Expand Down
4 changes: 2 additions & 2 deletions samples/src/Notify/Aspects.Notify.csproj
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<Version>1.0.2</Version>
<Version>1.0.3</Version>
<TargetFramework>netstandard2.0</TargetFramework>
<PackageTags>aspect notify notifypropertychanged INPC pattern attribute</PackageTags>
<Description>This package provides simple INotifyPropertyChanged aspect. Put [Notify] attribure on your properties or a whole class. You can use [NotifyAlso] attributes to notify other dependant properties.
Expand Down
4 changes: 2 additions & 2 deletions samples/src/Universal/Aspects.Universal.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<Version>1.0.1</Version>
<Version>1.0.2</Version>
<TargetFramework>netstandard2.0</TargetFramework>
<PackageTags>aspect proxy wrapper universal</PackageTags>
<Description>
Expand Down
4 changes: 2 additions & 2 deletions src/AspectInjector.Broker/AspectInjector.Broker.csproj
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>netstandard2.0</TargetFrameworks>
<TargetFrameworks>netstandard2.0;net2.0</TargetFrameworks>
<SignAssembly>True</SignAssembly>
<AssemblyOriginatorKeyFile>_key.snk</AssemblyOriginatorKeyFile>
<Description>Broker for Aspect Injector operations.</Description>
Expand Down

0 comments on commit f32c163

Please sign in to comment.