Skip to content

Commit

Permalink
Adding multitargeting
Browse files Browse the repository at this point in the history
  • Loading branch information
mattchenderson committed May 3, 2024
1 parent 661de19 commit 0528a84
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net6.0</TargetFramework>
<TargetFrameworks>net6.0;net8.0</TargetFrameworks>
<CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
</PropertyGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ WARNING: DO NOT MODIFY this file unless you are knowledgeable about MSBuild and
xmlns="http://schemas.microsoft.com/developer/msbuild/2003">

<PropertyGroup>
<_FunctionsTaskFramework>net6.0</_FunctionsTaskFramework>
<_FunctionsTaskFramework>$(TargetFramework)</_FunctionsTaskFramework>
<_FunctionsTasksDir Condition=" '$(_FunctionsTasksDir)'=='' ">$(MSBuildThisFileDirectory)..\tools\$(_FunctionsTaskFramework)\</_FunctionsTasksDir>
<_FunctionsTaskAssemblyFullPath Condition=" '$(_FunctionsTaskAssemblyFullPath)'=='' ">$(_FunctionsTasksDir)\Microsoft.NET.Sdk.Functions.MSBuild.dll</_FunctionsTaskAssemblyFullPath>
<DebugSymbols Condition="'$(DebugSymbols)' == ''">true</DebugSymbols>
Expand All @@ -22,11 +22,11 @@ WARNING: DO NOT MODIFY this file unless you are knowledgeable about MSBuild and
<IsZipDeploySupported>true</IsZipDeploySupported>
<MSBuildFunctionsTargetsPath>$(MSBuildExtensionsPath)\Microsoft\VisualStudio\Managed.Functions\</MSBuildFunctionsTargetsPath>

<_ToolingSuffix></_ToolingSuffix>
<_ToolingSuffix Condition="'$(TargetFrameworkIdentifier)' == '.NETCoreApp' And '$(TargetFrameworkVersion)' == 'v8.0'">net8-in-process</_ToolingSuffix>
<AzureFunctionsVersion Condition="'$(TargetFrameworkIdentifier)' == '.NETCoreApp' And '$(TargetFrameworkVersion)' == 'v8.0'">v0</AzureFunctionsVersion>
<_ToolingSuffix></_ToolingSuffix>
<_ToolingSuffix Condition="'$(TargetFrameworkIdentifier)' == '.NETCoreApp' And '$(TargetFrameworkVersion)' == 'v8.0'">net8-in-process</_ToolingSuffix>
<AzureFunctionsVersion Condition="'$(TargetFrameworkIdentifier)' == '.NETCoreApp' And '$(TargetFrameworkVersion)' == 'v8.0'">v0</AzureFunctionsVersion>
<FunctionsToolingSuffix Condition="'$(FunctionsToolingSuffix)' == ''">$(_ToolingSuffix)</FunctionsToolingSuffix>

<FunctionsToolingSuffix Condition="'$(FunctionsToolingSuffix)' == ''">$(_ToolingSuffix)</FunctionsToolingSuffix>
</PropertyGroup>

<UsingTask TaskName="GenerateFunctions"
Expand Down
31 changes: 28 additions & 3 deletions src/Microsoft.NET.Sdk.Functions/Microsoft.NET.Sdk.Functions.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<Import Project="..\..\common.props"/>

<PropertyGroup>
<TargetFrameworks>net6.0</TargetFrameworks>
<TargetFrameworks>net6.0;net8.0</TargetFrameworks>
<PackageName>Microsoft.NET.Sdk.Functions</PackageName>
<Authors>Microsoft</Authors>
<ProjectUrl>https://github.com/Azure/azure-functions-vs-build-sdk</ProjectUrl>
Expand Down Expand Up @@ -36,8 +36,13 @@
<PackagePath>tools\net6.0\</PackagePath>
<Visible>false</Visible>
</None>

<!-- Generator and dependent assemblies-->
<None Include="$(FunctionsBuildTaskOutputPath)\netstandard2.0\Microsoft.NET.Sdk.Functions.MSBuild.dll">
<Pack>true</Pack>
<PackagePath>tools\net8.0\</PackagePath>
<Visible>false</Visible>
</None>

<!-- Generator and dependent assemblies-->
<None Include="$(FunctionsGeneratorOutputPath)\net6.0\Newtonsoft.Json.dll">
<Pack>true</Pack>
<PackagePath>tools\net6.0\</PackagePath>
Expand All @@ -58,6 +63,26 @@
<PackagePath>tools\net6.0\</PackagePath>
<Visible>false</Visible>
</None>
<None Include="$(FunctionsGeneratorOutputPath)\net8.0\Newtonsoft.Json.dll">
<Pack>true</Pack>
<PackagePath>tools\net8.0\</PackagePath>
<Visible>false</Visible>
</None>
<None Include="$(FunctionsGeneratorOutputPath)\net8.0\Mono.Cecil.dll">
<Pack>true</Pack>
<PackagePath>tools\net8.0\</PackagePath>
<Visible>false</Visible>
</None>
<None Include="$(FunctionsGeneratorOutputPath)\net8.0\Microsoft.NET.Sdk.Functions.Generator.dll">
<Pack>true</Pack>
<PackagePath>tools\net8.0\</PackagePath>
<Visible>false</Visible>
</None>
<None Include="$(FunctionsGeneratorOutputPath)\net8.0\Microsoft.NET.Sdk.Functions.Generator.runtimeconfig.json">
<Pack>true</Pack>
<PackagePath>tools\net8.0\</PackagePath>
<Visible>false</Visible>
</None>
</ItemGroup>

<ItemGroup>
Expand Down

0 comments on commit 0528a84

Please sign in to comment.