peachpiecompiler / peachpie

PeachPie - the PHP compiler and runtime for .NET and .NET Core
https://www.peachpie.io
Apache License 2.0
2.31k stars 202 forks source link

Why in Visual Studio WebProject Still Uses 1.0.6 version & Different Targateframework version on csproj and msbuildproj #1008

Closed BKSoftCraft closed 2 years ago

BKSoftCraft commented 2 years ago
//   Server.csproj  //
<Project Sdk="Microsoft.NET.Sdk.Web">

  <PropertyGroup>
    <OutputType>Exe</OutputType>
    <TargetFramework>net5.0</TargetFramework>                                        <--- Framework 5.0
  </PropertyGroup>

  <ItemGroup>
    <Folder Include="wwwroot\" />
  </ItemGroup>

  <ItemGroup>
    <PackageReference Include="Peachpie.AspNetCore.Web" Version="1.0.6" />           <---Old Version
  </ItemGroup>

  <ItemGroup>
    <ProjectReference Include="..\Test55\Test55.msbuildproj">
      <PrivateAssets>None</PrivateAssets>
    </ProjectReference>
  </ItemGroup>

</Project>

//  msbuildproj //
<Project Sdk="Peachpie.NET.Sdk/1.0.6">                                               <---Old Version

  <PropertyGroup>
    <OutputType>Library</OutputType>
    <TargetFramework>netstandard2.1</TargetFramework>                                <---Framework 2.1
  </PropertyGroup>

  <ItemGroup>
    <Compile Include="**/*.php;**/*.phar;" Exclude="$(DefaultExcludeItems)" />
  </ItemGroup>

</Project>
BKSoftCraft commented 2 years ago
avriltank commented 2 years ago

You can change the latest version!I use the latest version

BKSoftCraft commented 2 years ago

You can change the latest version!I use the latest version

And What About TargetFramework, Do I use net5.0 at both place

avriltank commented 2 years ago

yes,you can

avriltank commented 2 years ago

I use net6 and peachpie 1.0.9,they work well

BKSoftCraft commented 2 years ago

Ok, Thanks For Reply

jakubmisek commented 2 years ago

The .msbuildproj is a library assembly, hence it targets .netstandard which makes it usable as a reference to .NET Core 3 and 5 and 6 project, and also .NET Framework 4.7.2 projects.

The server project is an executable, hence it targets net5, and can be safely changed to net6 as well.

The version 1.0.6 can be updated, it's just that the extension for Visual Studio has not yet been updated.


ref https://github.com/iolevel/peachpie-vs ref https://docs.microsoft.com/en-us/dotnet/standard/net-standard

jakubmisek commented 2 years ago

we have updated the extension to create projects with peachpie v1.0.9 by default (https://marketplace.visualstudio.com/items?itemName=iolevel.peachpie-vs)

thanks!

BKSoftCraft commented 2 years ago

Thanks.