Skip to content

Commit

Permalink
sdk needs to target netstandard2.0
Browse files Browse the repository at this point in the history
to be used as a built task in Visual Studio
  • Loading branch information
jakubmisek committed Oct 5, 2022
1 parent a0c1450 commit d3b975c
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 5 deletions.
2 changes: 1 addition & 1 deletion Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
<PeachpieLibraryRegularExpressionsVersion>1.6.0</PeachpieLibraryRegularExpressionsVersion>
<MySqlConnectorVersion>2.0.0</MySqlConnectorVersion>
<ParserVersion>8.1.8808</ParserVersion>
<PeachpieMicrosoftCodeAnalysisVersion>3.7.2</PeachpieMicrosoftCodeAnalysisVersion>
<PeachpieMicrosoftCodeAnalysisVersion>3.7.1</PeachpieMicrosoftCodeAnalysisVersion>

</PropertyGroup>

Expand Down
2 changes: 1 addition & 1 deletion src/Peachpie.CodeAnalysis/Peachpie.CodeAnalysis.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>net50</TargetFrameworks>
<TargetFrameworks>netstandard2.0</TargetFrameworks>
<NoWarn>$(NoWarn);1591</NoWarn>
<AssemblyName>Peachpie.CodeAnalysis</AssemblyName>
<PackageId>Peachpie.CodeAnalysis</PackageId>
Expand Down
11 changes: 11 additions & 0 deletions src/Peachpie.NET.Sdk/Directory.Build.props
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<Project>

<PropertyGroup>

<_TargetFramework>netstandard2.0</_TargetFramework>
<TargetFrameworks>$(_TargetFramework)</TargetFrameworks>
<LangVersion>latest</LangVersion>

</PropertyGroup>

</Project>
5 changes: 2 additions & 3 deletions src/Peachpie.NET.Sdk/Peachpie.NET.Sdk.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net50</TargetFramework>
<AssemblyName>Peachpie.NET.Sdk</AssemblyName>

<PackageOnlyBuild>true</PackageOnlyBuild>
Expand All @@ -18,7 +17,7 @@
<NoPackageAnalysis>true</NoPackageAnalysis>
<IncludeBuildOutput>false</IncludeBuildOutput>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
<PackToolsDir>$(MSBuildThisFileDirectory)bin\$(Configuration)\net50\publish</PackToolsDir>
<PackToolsDir>$(MSBuildThisFileDirectory)bin\$(Configuration)\$(_TargetFramework)\publish</PackToolsDir>
<NuspecFile>$(MSBuildThisFileDirectory)$(MSbuildProjectName).nuspec</NuspecFile>
</PropertyGroup>

Expand Down Expand Up @@ -88,7 +87,7 @@
</ItemGroup>

<Target Name="PublishAll">
<MSBuild Projects="$(MSBuildProjectFullPath)" Targets="publish" Properties="GeneratePackageOnBuild=false;Version=$(Version);TargetFramework=net50;" />
<MSBuild Projects="$(MSBuildProjectFullPath)" Targets="publish" Properties="GeneratePackageOnBuild=false;Version=$(Version);TargetFramework=$(_TargetFramework);" />
</Target>

<Target Name="SetPackageDependencies" BeforeTargets="GenerateNuspec" DependsOnTargets="PublishAll">
Expand Down

0 comments on commit d3b975c

Please sign in to comment.