Skip to content

Commit e03613a

Browse files
authored
Merge pull request #6 from postsharp/topic/upd-2025-1
Update to PostSharp 2025.1
2 parents bd23392 + 7f06c48 commit e03613a

File tree

17 files changed

+1580
-309
lines changed

17 files changed

+1580
-309
lines changed

.gitignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,6 @@
33
bin
44
obj
55
/.build
6-
/.vs
6+
**/.vs
7+
*.slnLaunch.user
8+
*.csproj.user

.idea/.idea.PostSharp.LicenseServer/.idea/.gitignore

Lines changed: 13 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/.idea.PostSharp.LicenseServer/.idea/encodings.xml

Lines changed: 4 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/.idea.PostSharp.LicenseServer/.idea/indexLayout.xml

Lines changed: 8 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/.idea.PostSharp.LicenseServer/.idea/vcs.xml

Lines changed: 6 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/config/applicationhost.config

Lines changed: 972 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
<wpf:ResourceDictionary xml:space="preserve" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:s="clr-namespace:System;assembly=mscorlib" xmlns:ss="urn:shemas-jetbrains-com:settings-storage-xaml" xmlns:wpf="http://schemas.microsoft.com/winfx/2006/xaml/presentation">
2+
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003ACoreLicense_002Ecs_002Fl_003A_002E_002E_003F_002E_002E_003FUsers_003FGaelFraiteur_002EAzureAD_003FAppData_003FRoaming_003FJetBrains_003FRider2025_002E1_003Fresharper_002Dhost_003FDecompilerCache_003Fdecompiler_003F44ece18ee0e347199a69ab2e08b17d7326528_003F33_003Ffe58c998_003FCoreLicense_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
3+
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003ADbConnectionInternal_002Ecs_002Fl_003A_002E_002E_003F_002E_002E_003FUsers_003FGaelFraiteur_002EAzureAD_003FAppData_003FRoaming_003FJetBrains_003FRider2025_002E1_003Fresharper_002Dhost_003FDecompilerCache_003Fdecompiler_003Fde6c0f4d9ba048da951d38ac0a5d2f03355db8_003Fa7_003F49976553_003FDbConnectionInternal_002Ecs/@EntryIndexedValue">ForceIncluded</s:String></wpf:ResourceDictionary>

src/PostSharp.LicenseServer/ParsedLicenseManager.cs

Lines changed: 26 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@
99
#endregion
1010

1111
using System.Collections.Generic;
12+
using PostSharp.Platform.NetFramework;
13+
using PostSharp.Platform.Neutral;
1214
using PostSharp.Sdk.Extensibility.Licensing;
1315
using ParsedLicense = PostSharp.Sdk.Extensibility.Licensing.License;
1416

@@ -18,24 +20,36 @@ public static class ParsedLicenseManager
1820
{
1921
private static readonly Dictionary<string, ParsedLicense> parsedLicenses = new Dictionary<string, ParsedLicense>();
2022

23+
static ParsedLicenseManager()
24+
{
25+
CommonDefaultSystemServices.Initialize();
26+
NetFrameworkDefaultSystemServices.Initialize();
27+
}
28+
29+
2130

2231
public static ParsedLicense GetParsedLicense( string licenseKey )
2332
{
2433
ParsedLicense parsedLicense;
25-
if ( !parsedLicenses.TryGetValue( licenseKey, out parsedLicense ) )
26-
{
27-
parsedLicense = ParsedLicense.Deserialize( licenseKey );
2834

29-
string errorDescription;
30-
if ( parsedLicense == null || !parsedLicense.Validate( null, out errorDescription ) )
31-
{
32-
return null;
33-
}
34-
35-
parsedLicenses.Add( licenseKey, parsedLicense );
35+
lock (parsedLicenses)
36+
{
37+
if (!parsedLicenses.TryGetValue(licenseKey, out parsedLicense))
38+
{
39+
parsedLicense = ParsedLicense.Deserialize(licenseKey);
40+
41+
string errorDescription;
42+
if (parsedLicense == null || !parsedLicense.Validate(null, out errorDescription))
43+
{
44+
return null;
45+
}
46+
47+
parsedLicenses.Add(licenseKey, parsedLicense);
48+
}
49+
50+
return parsedLicense;
3651
}
37-
38-
return parsedLicense;
3952
}
4053
}
54+
4155
}

src/PostSharp.LicenseServer/PostSharp.LicenseServer.csproj

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3-
<Import Project="..\..\packages\PostSharp.6.6.15\build\PostSharp.props" Condition="Exists('..\..\packages\PostSharp.6.6.15\build\PostSharp.props')" />
3+
<Import Project="..\..\packages\PostSharp.2025.1.5\build\PostSharp.props" Condition="Exists('..\..\packages\PostSharp.2025.1.5\build\PostSharp.props')" />
44
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
55
<PropertyGroup>
66
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
@@ -73,16 +73,17 @@
7373
<SkipPostSharp>True</SkipPostSharp>
7474
</PropertyGroup>
7575
<ItemGroup>
76-
<Reference Include="PostSharp, Version=6.6.15.0, Culture=neutral, PublicKeyToken=b13fd38b8f9c99d7, processorArchitecture=MSIL">
77-
<HintPath>..\..\packages\PostSharp.Redist.6.6.15\lib\net45\PostSharp.dll</HintPath>
76+
<Reference Include="PostSharp, Version=2025.1.5.0, Culture=neutral, PublicKeyToken=b13fd38b8f9c99d7, processorArchitecture=MSIL">
77+
<HintPath>..\..\packages\PostSharp.Redist.2025.1.5\lib\net45\PostSharp.dll</HintPath>
7878
</Reference>
79-
<Reference Include="PostSharp.Compiler.Common, Version=6.6.15.0, Culture=neutral, PublicKeyToken=b13fd38b8f9c99d7, processorArchitecture=MSIL">
80-
<HintPath>..\..\packages\PostSharp.Compiler.Common.6.6.15\lib\netstandard2.0\PostSharp.Compiler.Common.dll</HintPath>
81-
<Private>True</Private>
79+
<Reference Include="PostSharp.Compiler.Common, Version=2025.1.5.0, Culture=neutral, PublicKeyToken=b13fd38b8f9c99d7, processorArchitecture=MSIL">
80+
<HintPath>..\..\packages\PostSharp.Compiler.Common.2025.1.5\lib\netstandard2.0\PostSharp.Compiler.Common.dll</HintPath>
8281
</Reference>
83-
<Reference Include="PostSharp.Compiler.Settings, Version=6.6.15.0, Culture=neutral, PublicKeyToken=b13fd38b8f9c99d7, processorArchitecture=MSIL">
84-
<HintPath>..\..\packages\PostSharp.Compiler.Settings.6.6.15\lib\netstandard2.0\PostSharp.Compiler.Settings.dll</HintPath>
85-
<Private>True</Private>
82+
<Reference Include="PostSharp.Compiler.Platform.NetFramework, Version=2025.1.5.0, Culture=neutral, PublicKeyToken=b13fd38b8f9c99d7, processorArchitecture=MSIL">
83+
<HintPath>..\..\packages\PostSharp.Compiler.Platforms.2025.1.5\lib\net472\PostSharp.Compiler.Platform.NetFramework.dll</HintPath>
84+
</Reference>
85+
<Reference Include="PostSharp.Compiler.Settings, Version=2025.1.5.0, Culture=neutral, PublicKeyToken=b13fd38b8f9c99d7, processorArchitecture=MSIL">
86+
<HintPath>..\..\packages\PostSharp.Compiler.Settings.2025.1.5\lib\netstandard2.0\PostSharp.Compiler.Settings.dll</HintPath>
8687
</Reference>
8788
<Reference Include="System" />
8889
<Reference Include="System.Data" />
@@ -243,7 +244,7 @@
243244
</PropertyGroup>
244245
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
245246
<Import Project="$(VSToolsPath)\WebApplications\Microsoft.WebApplication.targets" />
246-
<Import Project="$(MSBuildCommunityTasksPath)\MSBuild.Community.Tasks.Targets" />
247+
<Import Project="$(MSBuildCommunityTasksPath)\MSBuild.Community.Tasks.Targets" Condition="Exists('$(MSBuildCommunityTasksPath)\MSBuild.Community.Tasks.Targets')" />
247248
<ProjectExtensions>
248249
<VisualStudio>
249250
<FlavorProperties GUID="{349c5851-65df-11da-9384-00065b846f21}">
@@ -277,11 +278,11 @@
277278
<ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
278279
</PropertyGroup>
279280
<Error Condition="!Exists('..\..\packages\MSBuildTasks.1.5.0.235\build\MSBuildTasks.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\MSBuildTasks.1.5.0.235\build\MSBuildTasks.targets'))" />
280-
<Error Condition="!Exists('..\..\packages\PostSharp.6.6.15\build\PostSharp.props')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\PostSharp.6.6.15\build\PostSharp.props'))" />
281-
<Error Condition="!Exists('..\..\packages\PostSharp.6.6.15\build\PostSharp.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\PostSharp.6.6.15\build\PostSharp.targets'))" />
281+
<Error Condition="!Exists('..\..\packages\PostSharp.2025.1.5\build\PostSharp.props')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\PostSharp.2025.1.5\build\PostSharp.props'))" />
282+
<Error Condition="!Exists('..\..\packages\PostSharp.2025.1.5\build\PostSharp.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\PostSharp.2025.1.5\build\PostSharp.targets'))" />
282283
</Target>
283284
<Import Project="..\..\packages\MSBuildTasks.1.5.0.235\build\MSBuildTasks.targets" Condition="Exists('..\..\packages\MSBuildTasks.1.5.0.235\build\MSBuildTasks.targets')" />
284-
<Import Project="..\..\packages\PostSharp.6.6.15\build\PostSharp.targets" Condition="Exists('..\..\packages\PostSharp.6.6.15\build\PostSharp.targets')" />
285+
<Import Project="..\..\packages\PostSharp.2025.1.5\build\PostSharp.targets" Condition="Exists('..\..\packages\PostSharp.2025.1.5\build\PostSharp.targets')" />
285286
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
286287
Other similar extension points exist, see Microsoft.Common.targets.
287288
<Target Name="BeforeBuild">

0 commit comments

Comments
 (0)