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

MsBuild Extended support for net.sdk project type system (targeting desktop framework, not core) #1223

Merged
merged 13 commits into from
Aug 7, 2018
Merged
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
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -380,3 +380,4 @@ Features.Generated/
GitExtensions.settings.backup
/Installer/NuGetPackages/SpecFlow.Tools.MsBuild.Generation/build/SpecFlow.Tools.MsBuild.Generation.targets
/Installer/NuGetPackages/SpecFlow.Tools.MsBuild.Generation/build/SpecFlow.Tools.MsBuild.Generation.props
/Tests/TechTalk.SpecFlow.MsBuildNetSdk.IntegrationTests/Features/dummy.feature.cs
4 changes: 3 additions & 1 deletion Installer/NuGetPackages/.build/build.targets
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@
<Target Name="Publish"/>
<Target Name="GetNativeManifest" />
<Target Name="GetCopyToOutputDirectoryItems" />

<Target Name="BuiltProjectOutputGroup" />
<Target Name="BuiltProjectOutputGroupDependencies" />
<Target Name="DebugSymbolsProjectOutputGroup" />

<Target Name="AfterBuild" AfterTargets="Build" />

Expand Down
8 changes: 0 additions & 8 deletions Installer/NuGetPackages/NuGetPackages.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -35,14 +35,6 @@
<WarningLevel>4</WarningLevel>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="System.Data" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<None Include=".build\build.props" />
<None Include=".build\build.targets" />
Expand Down
3 changes: 2 additions & 1 deletion TechTalk.SpecFlow.Generator/Project/MsBuildProjectReader.cs
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,8 @@ private SpecFlowProject LoadFeatureFiles(SpecFlowProject specFlowProject, XDocum

private bool IsNewProjectSystem(XDocument xDocument)
{
return xDocument.Root.Attribute("Sdk") != null;
// net.sdk way of detection based on: https://stackoverflow.com/questions/45943939/how-do-i-override-the-beforebuild-msbuild-task-in-a-vs-2017-net-standard-c-sh
return xDocument.Root.Attribute("Sdk") != null || xDocument.Root.Elements("Import").Where(e => e.HasAttributes).Attributes("Sdk").Any();
}

public static SpecFlowProject LoadSpecFlowProjectFromMsBuild(string projectFilePath)
Expand Down
19 changes: 17 additions & 2 deletions TechTalk.SpecFlow.Tools/MsBuild/TechTalk.SpecFlow.props
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,30 @@
<OverwriteReadOnlyFiles Condition="'$(OverwriteReadOnlyFiles)'==''">false</OverwriteReadOnlyFiles>
<ForceGeneration Condition="'$(ForceGeneration)'==''">false</ForceGeneration>

<SpecFlow_DeleteCodeBehindFilesOnCleanRebuild Condition="'$(SpecFlow_DeleteCodeBehindFilesOnCleanRebuild)'==''">false</SpecFlow_DeleteCodeBehindFilesOnCleanRebuild>

<ShowTrace Condition="'$(ShowTrace)'==''">false</ShowTrace>
<VerboseOutput Condition="'$(VerboseOutput)'==''">false</VerboseOutput>
<SpecFlow_DebugMSBuildTask Condition="'$(SpecFlow_DebugMSBuildTask)' == ''">false</SpecFlow_DebugMSBuildTask>

<_SpecFlowPropsImported Condition="'$(_SpecFlowPropsImported)'==''">true</_SpecFlowPropsImported>
</PropertyGroup>

<!--
property group for feature flags
-->
<PropertyGroup>

<!--
feature flag to enable experimental support for cleaning up generated code-behind files during rebuild and clean scenarios
-->
<SpecFlow_DeleteCodeBehindFilesOnCleanRebuild Condition="'$(SpecFlow_DeleteCodeBehindFilesOnCleanRebuild)'==''">false</SpecFlow_DeleteCodeBehindFilesOnCleanRebuild>

<!--
net.sdk support: feature flag to enable experimental support for net.sdk project system
-->
<SpecFlow_EnableDefaultCompileItems Condition="'$(SpecFlow_EnableDefaultCompileItems)'==''">false</SpecFlow_EnableDefaultCompileItems>
<SpecFlow_EnableWarnForFeatureCodeBehindFilesWithoutCorrespondingFeatureFile Condition="'$(SpecFlow_EnableWarnForFeatureCodeBehindFilesWithoutCorrespondingFeatureFile)'==''">$(SpecFlow_EnableDefaultCompileItems)</SpecFlow_EnableWarnForFeatureCodeBehindFilesWithoutCorrespondingFeatureFile>
</PropertyGroup>

<ItemGroup>
<SpecFlowFeatureFiles Include="**\*.feature">
<CodeBehindFile>%(RelativeDir)%(Filename).feature.cs</CodeBehindFile>
Expand Down
68 changes: 67 additions & 1 deletion TechTalk.SpecFlow.Tools/MsBuild/TechTalk.SpecFlow.targets
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,15 @@
<PropertyGroup Condition="'$(BuildServerMode)' == ''">
<BuildServerMode Condition="'$(BuildingInsideVisualStudio)'=='true'">false</BuildServerMode>
<BuildServerMode Condition="'$(BuildingInsideVisualStudio)'!='true'">true</BuildServerMode>

<!--
net.sdk experimental support:
- currently we only want to support either classic project system or netsdk project system.
- currently we don't want to support globbing with classic project system => ensure globbing only get enabled with 'UsingMicrosoftNETSdk'
- currently we are supporting $(EnableDefaultCompileItems) for disabling globbing support for codebehind files
-->
<_SpecFlow_EnableDefaultCompileItems Condition="'$(SpecFlow_EnableDefaultCompileItems)' == '' And '$(UsingMicrosoftNETSdk)' == 'true'">true</_SpecFlow_EnableDefaultCompileItems>
<_SpecFlow_EnableDefaultCompileItems Condition="'$(SpecFlow_EnableDefaultCompileItems)' == 'true' And '$(UsingMicrosoftNETSdk)' == 'true'">true</_SpecFlow_EnableDefaultCompileItems>
</PropertyGroup>

<PropertyGroup>
Expand All @@ -25,17 +34,41 @@
</RebuildDependsOn>
</PropertyGroup>


<!--
net.sdk support: update default compile items to show generated files as nested items
-->
<ItemGroup Condition="'$(_SpecFlow_EnableDefaultCompileItems)' == 'true' and '$(EnableDefaultItems)' == 'true' ">
<Compile Update="@(SpecFlowFeatureFiles->'%(CodeBehindFile)')"
DependentUpon="%(Filename)"
AutoGen="true"
DesignTime="true"
Visible="true"
Condition="'$(EnableDefaultCompileItems)' == 'true'"
/>
</ItemGroup>


<Target Name="WarnForFeatureCodeBehindFilesWithoutCorrespondingFeatureFile" AfterTargets="CoreCompile"
Condition="'$(SpecFlow_EnableWarnForFeatureCodeBehindFilesWithoutCorrespondingFeatureFile)' == 'true'">
<Warning Text="For codebehind file '@(SpecFlowObsoleteCodeBehindFiles)', no feature file was found." File="@(SpecFlowObsoleteCodeBehindFiles)" Condition="'@(SpecFlowObsoleteCodeBehindFiles)' != ''" />
</Target>


<Target Name="SwitchToForceGenerate">
<PropertyGroup>
<ForceGeneration>true</ForceGeneration>
</PropertyGroup>
</Target>


<Target Name="UpdateFeatureFilesInProject"
DependsOnTargets="BeforeUpdateFeatureFilesInProject"
Inputs="@(SpecFlowFeatureFiles)"
Outputs="@(SpecFlowFeatureFiles->'%(CodeBehindFile)')">

<Message Text="SpecFlowFeatureFiles: @(SpecFlowFeatureFiles)" Importance="high" Condition="'$(VerboseOutput)' == 'true'" />

<GenerateAll ProjectPath="$(MSBuildProjectFullPath)"

BuildServerMode="$(BuildServerMode)"
Expand All @@ -49,15 +82,47 @@
<Output TaskParameter="GeneratedFiles" ItemName="SpecFlowGeneratedFiles" />
</GenerateAll>

<Message Text="%(SpecFlowGeneratedFiles.Identity)" Importance="high" Condition="'$(VerboseOutput)'=='true'" />
<Message Text="SpecFlowGeneratedFiles: %(SpecFlowGeneratedFiles.Identity)" Importance="high" Condition="'$(VerboseOutput)' == 'true'" />


<!--
net.sdk support: globbing does not support including files which are dynamically generated inside targets, we have to manually update compile items
-->
<ItemGroup Condition="'$(_SpecFlow_EnableDefaultCompileItems)' == 'true' and '$(EnableDefaultItems)' == 'true' and '$(EnableDefaultCompileItems)' == 'true'">

<!-- if this is the first time generation of codebehind files, we have to manually add them as compile items -->
<Compile Include="@(SpecFlowFeatureFiles->'%(CodeBehindFile)')"
Exclude="@(Compile)"/>

<!--
eather if codebehind files are added manually to compile item group or are added by net.sdk globbing support,
ensure they are nested under feature files like in previous specflow versions
currently, we cannot use itemgroup update attribute inside a target because of some bugs in MSBuild (all items will be updated)
- https://github.com/Microsoft/msbuild/issues/1618
- https://github.com/Microsoft/msbuild/issues/2835
- https://github.com/Microsoft/msbuild/issues/1124
-->
<Compile DependentUpon="@(SpecFlowFeatureFiles)"
AutoGen="true"
DesignTime="true"
Visible="true"
Condition="'%(Compile.Identity)' == '@(SpecFlowFeatureFiles->'%(CodeBehindFile)')'" />

<!-- remove files which got obsolete, typically after rename operation, or getting changes from source control -->
<Compile Remove="@(SpecFlowObsoleteCodeBehindFiles)" />
</ItemGroup>

</Target>


<Target Name="BeforeUpdateFeatureFilesInProject">
</Target>


<Target Name="AfterUpdateFeatureFilesInProject" DependsOnTargets="UpdateFeatureFilesInProject">
</Target>


<Target Name="CleanFeatureFilesInProject" Condition="'$(SpecFlow_DeleteCodeBehindFilesOnCleanRebuild)' == 'true'">
<!-- remove known codebehind files for existing feature files -->
<Delete Files="%(SpecFlowFeatureFiles.CodeBehindFile)" ContinueOnError="true" />
Expand All @@ -70,4 +135,5 @@
<Delete Files="@(SpecFlowObsoleteCodeBehindFiles)" ContinueOnError="true" />
</Target>


</Project>
6 changes: 3 additions & 3 deletions TechTalk.SpecFlow.Tools/MsBuild/TechTalk.SpecFlow.tasks
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<?xml version="1.0" encoding="utf-8" ?>
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">

<PropertyGroup>
<SpecFlowTasksPath Condition="'$(SpecFlowTasksPath)'==''">specflow.exe</SpecFlowTasksPath>
</PropertyGroup>
Expand All @@ -8,10 +9,9 @@
<!-- handle absolute / targets-relative tasks path -->
<__SpecFlowTasksFullPath>$(SpecFlowTasksPath)</__SpecFlowTasksFullPath>
<!-- handle relative tasks path -->
<__SpecFlowTasksFullPath Condition="Exists('$(MSBuildProjectDirectory)\$(SpecFlowTasksPath)')"
>$(MSBuildProjectDirectory)\$(SpecFlowTasksPath)</__SpecFlowTasksFullPath>
<__SpecFlowTasksFullPath Condition="Exists('$(MSBuildProjectDirectory)\$(SpecFlowTasksPath)')">$(MSBuildProjectDirectory)\$(SpecFlowTasksPath)</__SpecFlowTasksFullPath>
</PropertyGroup>

<UsingTask TaskName="TechTalk.SpecFlow.Tools.MsBuild.GenerateAll" AssemblyFile="$(__SpecFlowTasksFullPath)" />

</Project>
9 changes: 9 additions & 0 deletions TechTalk.SpecFlow.sln
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,8 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Licenses", "Licenses", "{D7
Licenses\System.ValueTuple-LICENSE-MIT.txt = Licenses\System.ValueTuple-LICENSE-MIT.txt
EndProjectSection
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "TechTalk.SpecFlow.MsBuildNetSdk.IntegrationTests", "Tests\TechTalk.SpecFlow.MsBuildNetSdk.IntegrationTests\TechTalk.SpecFlow.MsBuildNetSdk.IntegrationTests.csproj", "{02A08F81-B90F-4EB3-9C30-CE7447DE2012}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand Down Expand Up @@ -173,6 +175,12 @@ Global
{FA04B445-D04C-4075-9EB0-4D0A70E47FC4}.Release|Any CPU.Build.0 = Release|Any CPU
{FA04B445-D04C-4075-9EB0-4D0A70E47FC4}.VS2010IntegrationTest|Any CPU.ActiveCfg = Debug|Any CPU
{FA04B445-D04C-4075-9EB0-4D0A70E47FC4}.VS2010IntegrationTest|Any CPU.Build.0 = Debug|Any CPU
{02A08F81-B90F-4EB3-9C30-CE7447DE2012}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{02A08F81-B90F-4EB3-9C30-CE7447DE2012}.Debug|Any CPU.Build.0 = Debug|Any CPU
{02A08F81-B90F-4EB3-9C30-CE7447DE2012}.Release|Any CPU.ActiveCfg = Release|Any CPU
{02A08F81-B90F-4EB3-9C30-CE7447DE2012}.Release|Any CPU.Build.0 = Release|Any CPU
{02A08F81-B90F-4EB3-9C30-CE7447DE2012}.VS2010IntegrationTest|Any CPU.ActiveCfg = Debug|Any CPU
{02A08F81-B90F-4EB3-9C30-CE7447DE2012}.VS2010IntegrationTest|Any CPU.Build.0 = Debug|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand All @@ -189,6 +197,7 @@ Global
{D87E7021-4926-4F5A-AC81-92AFC575FB7E} = {577A0375-1436-446C-802B-3C75C8CEF94F}
{DBEEB615-5991-46BC-B274-1516BD0F3D91} = {A10B5CD6-38EC-4D7E-9D1C-2EBA8017E437}
{FA04B445-D04C-4075-9EB0-4D0A70E47FC4} = {A10B5CD6-38EC-4D7E-9D1C-2EBA8017E437}
{02A08F81-B90F-4EB3-9C30-CE7447DE2012} = {A10B5CD6-38EC-4D7E-9D1C-2EBA8017E437}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {6C32F919-B9E8-48E8-BD8D-566E54B9A27D}
Expand Down
12 changes: 8 additions & 4 deletions Tests/TechTalk.SpecFlow.IntegrationTests/App.config
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,23 @@
<configSections>
<section name="specFlow" type="TechTalk.SpecFlow.Configuration.ConfigurationSectionHandler, TechTalk.SpecFlow"/>
</configSections>

<appSettings>
<add key="testProjectFolder" value="SpecFlowTestProject"/>
</appSettings>
<specFlow>
<!-- For additional details on SpecFlow configuration options see http://go.specflow.org/doc-config -->
<generator allowRowTests="false" markFeaturesParallelizable="true">
<skipParallelizableMarkerForTags>
<tag value="NotParallel"/>
<tag value="NotParallel"/>
</skipParallelizableMarkerForTags>
</generator>
<stepAssemblies>
<stepAssembly assembly="TechTalk.SpecFlow.Specs"/>
</stepAssemblies>
<!-- For additional details on SpecFlow configuration options see http://go.specflow.org/doc-config --></specFlow>
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6"/></startup></configuration>
<!-- For additional details on SpecFlow configuration options see http://go.specflow.org/doc-config -->
</specFlow>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6"/>
</startup>
</configuration>
Original file line number Diff line number Diff line change
Expand Up @@ -46,16 +46,32 @@
<HintPath>..\..\packages\FluentAssertions.4.19.0\lib\net45\FluentAssertions.Core.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Microsoft.Build" />
<Reference Include="Microsoft.Build, Version=15.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\..\packages\Microsoft.Build.15.3.409\lib\net46\Microsoft.Build.dll</HintPath>
</Reference>
<Reference Include="Microsoft.Build.Framework, Version=15.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\..\packages\Microsoft.Build.Framework.15.3.409\lib\net46\Microsoft.Build.Framework.dll</HintPath>
</Reference>
<Reference Include="Microsoft.Build.Utilities.Core, Version=15.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\..\packages\Microsoft.Build.Utilities.Core.15.3.409\lib\net46\Microsoft.Build.Utilities.Core.dll</HintPath>
</Reference>
<Reference Include="nunit.framework, Version=3.2.1.0, Culture=neutral, PublicKeyToken=2638cd05610744eb, processorArchitecture=MSIL">
<HintPath>..\..\packages\NUnit.3.2.1\lib\net45\nunit.framework.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="System" />
<Reference Include="System.Collections.Immutable, Version=1.2.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\..\packages\System.Collections.Immutable.1.3.1\lib\portable-net45+win8+wp8+wpa81\System.Collections.Immutable.dll</HintPath>
</Reference>
<Reference Include="System.ComponentModel.Composition" />
<Reference Include="System.Core" />
<Reference Include="System.Runtime.InteropServices.RuntimeInformation, Version=4.0.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\..\packages\System.Runtime.InteropServices.RuntimeInformation.4.3.0\lib\net45\System.Runtime.InteropServices.RuntimeInformation.dll</HintPath>
</Reference>
<Reference Include="System.Threading.Thread, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\..\packages\System.Threading.Thread.4.0.0\lib\net46\System.Threading.Thread.dll</HintPath>
</Reference>
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Data" />
<Reference Include="System.Xml" />
<Reference Include="xunit, Version=1.9.2.1705, Culture=neutral, PublicKeyToken=8d05b1bb7a6fdb6c, processorArchitecture=MSIL">
Expand Down
14 changes: 14 additions & 0 deletions Tests/TechTalk.SpecFlow.IntegrationTests/packages.config
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,23 @@
<packages>
<package id="FluentAssertions" version="4.19.0" targetFramework="net45" />
<package id="GitVersionTask" version="4.0.0-beta0012" targetFramework="net46" developmentDependency="true" />
<package id="Microsoft.Build" version="15.3.409" targetFramework="net46" />
<package id="Microsoft.Build.Framework" version="15.3.409" targetFramework="net46" />
<package id="Microsoft.Build.Utilities.Core" version="15.3.409" targetFramework="net46" />
<package id="NUnit" version="3.2.1" targetFramework="net45" />
<package id="NUnit3TestAdapter" version="3.9.0" targetFramework="net46" />
<package id="SpecFlow" version="2.1.0" targetFramework="net45" />
<package id="System.Collections" version="4.0.11" targetFramework="net46" />
<package id="System.Collections.Immutable" version="1.3.1" targetFramework="net46" />
<package id="System.Diagnostics.Debug" version="4.0.11" targetFramework="net46" />
<package id="System.Globalization" version="4.0.11" targetFramework="net46" />
<package id="System.Linq" version="4.1.0" targetFramework="net46" />
<package id="System.Resources.ResourceManager" version="4.0.1" targetFramework="net46" />
<package id="System.Runtime" version="4.1.0" targetFramework="net46" />
<package id="System.Runtime.InteropServices" version="4.1.0" targetFramework="net46" />
<package id="System.Runtime.InteropServices.RuntimeInformation" version="4.3.0" targetFramework="net46" />
<package id="System.Threading" version="4.0.11" targetFramework="net46" />
<package id="System.Threading.Thread" version="4.0.0" targetFramework="net46" />
<package id="xunit" version="1.9.2" targetFramework="net45" />
<package id="xunit.extensions" version="1.9.2" targetFramework="net45" />
</packages>
15 changes: 15 additions & 0 deletions Tests/TechTalk.SpecFlow.MsBuildNetSdk.IntegrationTests/App.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<configSections>
<section name="specFlow" type="TechTalk.SpecFlow.Configuration.ConfigurationSectionHandler, TechTalk.SpecFlow"/>
</configSections>
<appSettings>
<add key="testProjectFolder" value="SpecFlowTestProject"/>
</appSettings>
<specFlow>
<unitTestProvider name="NUnit"/>
</specFlow>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6"/>
</startup>
</configuration>
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
namespace TechTalk.SpecFlow.MsBuildNetSdk.IntegrationTests.Features
{
[Binding]
public class DoNothingBinding
{
[Given(".*"), When(".*"), Then(".*")]
public void EmptyStep()
{
}

[Given(".*"), When(".*"), Then(".*")]
public void EmptyStep(string multiLineStringParam)
{
}

[Given(".*"), When(".*"), Then(".*")]
public void EmptyStep(Table tableParam)
{
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
using System.Reflection;
using NUnit.Framework;
using TechTalk.SpecFlow.MsBuildNetSdk.IntegrationTests.Features;

namespace TechTalk.SpecFlow.MsBuildNetSdk.IntegrationTests
{
[TestFixture]
public class CodeBehindFileGenerationTests
{
[Test]
public void TestIfCodeBehindFilesWasGeneratedAndCompiled()
{
var assemblyHoldingThisClass = Assembly.GetExecutingAssembly();
var typeOfGeneratedFeatureFile = assemblyHoldingThisClass.GetType(nameof(DummyFeatureFileToTestMSBuildNetsdkCodebehindFileGenerationFeature));
Assert.IsNotNull(typeOfGeneratedFeatureFile);
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
Feature: Dummy feature file to test MSBuild netsdk codebehind file generation

Scenario: Dummy scenario
Given I have a net.sdk style project
When the project is build
Then msbuild integration will generate code behind files
And nest generated codebehind files under corresponding feature file
Loading