Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compile Reqnroll.Tools.MsBuild.Generation only with netstandard2.0 #392

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,6 @@
</PropertyGroup>

<PropertyGroup>
<!-- for Reqnroll.Tools.MsBuild.Generation -->
<Reqnroll_FullFramework_Tools_TFM>net462</Reqnroll_FullFramework_Tools_TFM>
<Reqnroll_Core_Tools_TFM>netstandard2.0</Reqnroll_Core_Tools_TFM>

<Reqnroll_EnableStrongNameSigning>true</Reqnroll_EnableStrongNameSigning>
</PropertyGroup>

Expand Down
3 changes: 0 additions & 3 deletions Directory.Build.targets
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,6 @@
<NuspecProperties>$(NuspecProperties);CompatibilityVersionRange=[$(PackageVersion),$(CompatibilityVersionUpperRange))</NuspecProperties>
<NuspecProperties>$(NuspecProperties);branch=$(GitBranch)</NuspecProperties>
<NuspecProperties>$(NuspecProperties);commit=$(GitCommitSha)</NuspecProperties>

<NuspecProperties>$(NuspecProperties);Reqnroll_FullFramework_Tools_TFM=$(Reqnroll_FullFramework_Tools_TFM)</NuspecProperties>
<NuspecProperties>$(NuspecProperties);Reqnroll_Core_Tools_TFM=$(Reqnroll_Core_Tools_TFM)</NuspecProperties>
</PropertyGroup>
</Target>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
<Import Project="Sdk.targets" Sdk="Microsoft.NET.Sdk" />

<Target Name="PreBuild">
<MSBuild Projects="..\..\..\Reqnroll.Tools.MsBuild.Generation\Reqnroll.Tools.MsBuild.Generation.csproj" ContinueOnError="false" Properties="TargetFramework=$(_Reqnroll_Needed_MSBuildGenerator)" />
<MSBuild Projects="..\..\..\Reqnroll.Tools.MsBuild.Generation\Reqnroll.Tools.MsBuild.Generation.csproj" ContinueOnError="false" Properties="TargetFramework=netstandard2.0" />
<MSBuild Projects="..\Reqnroll.ExternalData.ReqnrollPlugin\Reqnroll.ExternalData.ReqnrollPlugin.csproj" ContinueOnError="false" Properties="TargetFramework=netstandard2.0" />
</Target>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
<Import Project="Sdk.targets" Sdk="Microsoft.NET.Sdk" />

<Target Name="PreBuild">
<MSBuild Projects="..\..\..\Reqnroll.Tools.MsBuild.Generation\Reqnroll.Tools.MsBuild.Generation.csproj" ContinueOnError="false" Properties="TargetFramework=$(_Reqnroll_Needed_MSBuildGenerator)" />
<MSBuild Projects="..\..\..\Reqnroll.Tools.MsBuild.Generation\Reqnroll.Tools.MsBuild.Generation.csproj" ContinueOnError="false" Properties="TargetFramework=netstandard2.0" />
<MSBuild Projects="..\..\..\Plugins\Reqnroll.xUnit.Generator.ReqnrollPlugin\Reqnroll.xUnit.Generator.ReqnrollPlugin.csproj" ContinueOnError="false" Properties="TargetFramework=netstandard2.0" />
</Target>

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>$(Reqnroll_FullFramework_Tools_TFM);$(Reqnroll_Core_Tools_TFM)</TargetFrameworks>
<TargetFrameworks>netstandard2.0</TargetFrameworks>
<AssemblyOriginatorKeyFile>$(Reqnroll_KeyFile)</AssemblyOriginatorKeyFile>
<SignAssembly>$(Reqnroll_EnableStrongNameSigning)</SignAssembly>
<PublicSign>$(Reqnroll_PublicSign)</PublicSign>
Expand Down Expand Up @@ -62,11 +62,8 @@
This is needed only for the Reqnroll projects within the solution (Specs, *.IntegrationTest),
and not used for producing the NuGet package.
-->
<ItemGroup Condition="'$(TargetFramework)' == '$(Reqnroll_FullFramework_Tools_TFM)'">
<TaskFiles Include="$(OutDir)\*.dll" />
</ItemGroup>
<ItemGroup Condition="'$(TargetFramework)' == '$(Reqnroll_Core_Tools_TFM)'">
<TaskFiles Include="$(OutDir)\*.dll;$(OutDir)\*.deps.json" Exclude="$(OutDir)\System.*;$(OutDir)\Microsoft.*" />
<ItemGroup>
<TaskFiles Include="$(OutDir)\*.dll;$(OutDir)\*.deps.json" />
</ItemGroup>
<Copy SourceFiles="@(TaskFiles)" DestinationFolder="$(OutDir)\tasks" />
</Target>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,8 @@
<file src="build\**\*" target="build" />
<file src="buildMultiTargeting\**\*" target="buildMultiTargeting" />

<file src="bin\$config$\net462\*.dll" target="tasks\$Reqnroll_FullFramework_Tools_TFM$" />
<file src="bin\$config$\netstandard2.0\*.dll" target="tasks\$Reqnroll_Core_Tools_TFM$" />
<file src="bin\$config$\netstandard2.0\*.deps.json" target="tasks\$Reqnroll_Core_Tools_TFM$" />
<file src="bin\$config$\netstandard2.0\*.dll" target="tasks\netstandard2.0" />
<file src="bin\$config$\netstandard2.0\*.deps.json" target="tasks\netstandard2.0" />

<file src="$SolutionDir$\Licenses\**\*" target="licenses" />
<file src="$SolutionDir$LICENSE" target="LICENSE" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,9 +70,7 @@


<PropertyGroup>
<_Reqnroll_TaskFolder Condition=" '$(MSBuildRuntimeType)' == 'Core' And '$(_Reqnroll_TaskFolder)' == ''">netstandard2.0</_Reqnroll_TaskFolder>
<_Reqnroll_TaskFolder Condition=" '$(MSBuildRuntimeType)' != 'Core' And '$(_Reqnroll_TaskFolder)' == ''">net462</_Reqnroll_TaskFolder>
<_Reqnroll_TaskAssembly Condition=" '$(_Reqnroll_TaskAssembly)' == '' ">..\tasks\$(_Reqnroll_TaskFolder)\Reqnroll.Tools.MsBuild.Generation.dll</_Reqnroll_TaskAssembly>
<_Reqnroll_TaskAssembly Condition=" '$(_Reqnroll_TaskAssembly)' == '' ">..\tasks\netstandard2.0\Reqnroll.Tools.MsBuild.Generation.dll</_Reqnroll_TaskAssembly>

<!-- Using `TaskHostFactory` ensures that the task assembly will not be locked by Visual Studio on Windows. See: https://learn.microsoft.com/en-us/visualstudio/msbuild/how-to-configure-targets-and-tasks?view=vs-2022#task-factories -->
<!-- Note: `TaskHostFactory` is not compatible with some macOS versions. https://github.com/reqnroll/Reqnroll/issues/152 -->
Expand Down
2 changes: 1 addition & 1 deletion Tests/Reqnroll.Specs/Reqnroll.Specs.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@
</Target>

<Target Name="PreBuild">
<MSBuild Projects="..\..\Reqnroll.Tools.MsBuild.Generation\Reqnroll.Tools.MsBuild.Generation.csproj" ContinueOnError="false" Properties="TargetFramework=$(_Reqnroll_Needed_MSBuildGenerator)" />
<MSBuild Projects="..\..\Reqnroll.Tools.MsBuild.Generation\Reqnroll.Tools.MsBuild.Generation.csproj" ContinueOnError="false" Properties="TargetFramework=netstandard2.0" />
<MSBuild Projects="..\..\Plugins\Reqnroll.xUnit.Generator.ReqnrollPlugin\Reqnroll.xUnit.Generator.ReqnrollPlugin.csproj" ContinueOnError="false" Properties="TargetFramework=netstandard2.0" />
</Target>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<_Reqnroll_Needed_MSBuildGenerator Condition=" '$(MSBuildRuntimeType)' != 'Core'">$(Reqnroll_FullFramework_Tools_TFM)</_Reqnroll_Needed_MSBuildGenerator>
</PropertyGroup>
<PropertyGroup>
<_Reqnroll_TaskAssembly>$(MSBuildThisFileDirectory)../../../Reqnroll.Tools.MsBuild.Generation/bin/$(Configuration)/$(_Reqnroll_Needed_MSBuildGenerator)/tasks/Reqnroll.Tools.MsBuild.Generation.dll</_Reqnroll_TaskAssembly>
<_Reqnroll_TaskAssembly>$(MSBuildThisFileDirectory)../../../Reqnroll.Tools.MsBuild.Generation/bin/$(Configuration)/netstandard2.0/tasks/Reqnroll.Tools.MsBuild.Generation.dll</_Reqnroll_TaskAssembly>
</PropertyGroup>
<Import Project="Reqnroll.Tools.MsBuild.Generation.OwnTests.tasks" Condition="'$(_ReqnrollTasksOwnTestImported)' =='' " />

Expand Down
Loading