Please report any issues you find with 3.1.200, either responding to this issue, creating a new issue or creating a new issue in one of the following repos:
Status of availability of 3.1.200 SDK on Linux feeds:
| Distro | 3.1.200 SDK |
|--|--|
| Ubuntu 16.04 | :heavy_check_mark: |
| Ubuntu 18.04 | :heavy_check_mark: |
| Ubuntu 19.10 | :heavy_check_mark: |
| Centos 7 | :heavy_check_mark: |
| Debian 9 | :heavy_check_mark: |
| Debian 10 | :heavy_check_mark: |
| Fedora 30 | :heavy_check_mark: |
| Fedora 31 | :heavy_check_mark: |
| OpenSUSE 15 | :heavy_check_mark: |
| SLES 12 | :heavy_check_mark: |
| SLES15 | :heavy_check_mark: |
Trying to run dotnet test in mcr.microsoft.com/dotnet/core/sdk:3.1 or mcr.microsoft.com/dotnet/core/sdk:3.1-alpine fails with the following:
/root/.nuget/packages/specflow.tools.msbuild.generation/3.1.80/build/SpecFlow.Tools.MsBuild.Generation.targets(93,5): error MSB4018: The "GenerateFeatureFileCodeBehindTask" task failed unexpectedly. [/builds/....csproj]
/root/.nuget/packages/specflow.tools.msbuild.generation/3.1.80/build/SpecFlow.Tools.MsBuild.Generation.targets(93,5): error MSB4018: System.IO.FileNotFoundException: Could not load file or assembly 'TechTalk.SpecFlow, Version=3.1.0.0, Culture=neutral, PublicKeyToken=0778194805d6db41'. The system cannot find the file specified. [/builds/ ... .csproj]`
I pinned my config back to mcr.microsoft.com/dotnet/core/sdk:3.1.102 as a workaround.
Adding @mthalman
cc: @leecow
@jrabbitb I removed all the specflow packages, and reinstalled the lastest:
dotnet add package SpecFlow
similar to the accepted answer here: https://stackoverflow.com/questions/39316353/techtalk-specflow-error-could-not-load-assembly-file-or-assembly
Trying to run
dotnet testinmcr.microsoft.com/dotnet/core/sdk:3.1ormcr.microsoft.com/dotnet/core/sdk:3.1-alpinefails with the following:
/root/.nuget/packages/specflow.tools.msbuild.generation/3.1.80/build/SpecFlow.Tools.MsBuild.Generation.targets(93,5):error MSB4018: The "GenerateFeatureFileCodeBehindTask" task failed unexpectedly. [/builds/....csproj]
/root/.nuget/packages/specflow.tools.msbuild.generation/3.1.80/build/SpecFlow.Tools.MsBuild.Generation.targets(93,5): error MSB4018: System.IO.FileNotFoundException: Could not load file or assembly 'TechTalk.SpecFlow, Version=3.1.0.0, Culture=neutral, PublicKeyToken=0778194805d6db41'. The system cannot find the file specified. [/builds/ ... .csproj]`I pinned my config back to mcr.microsoft.com/dotnet/core/sdk:3.1.102 as a workaround.
Seeing this same issue, but not locally (windows) only in our CI build system (Gitlab - Linux runners)
Pinning to 3.1.102 immediately fixed the problem.
We're running SpecFlow 3.1.86 with xUnit everything else, and MsBuild.
The SpecFlow issue doesn't seem related to Docker but rather to the underlying product. I see a new issue had been created to track this at https://github.com/SpecFlowOSS/SpecFlow/issues/1912.
cc @rainersigwald
Upgrading from .NET Core SDK 3.1.101 to 3.1.200, one of our ASP .NET Core projects now fails to build with the following:
Controllers\HttpController.cs(87,43): error CS0012: The type 'PipeReader' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.IO.Pipelines, Version=4.0.2.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51'. [E:\...\SampleServer.csproj]
The line of code where the error comes from:
var bodyReader = this.Request.BodyReader;
The csproj is straighforward:
<Project Sdk="Microsoft.NET.Sdk.Web">
<PropertyGroup>
<TargetFramework>netcoreapp3.1</TargetFramework>
<OutputType>Exe</OutputType>
<RootNamespace>SampleServer</RootNamespace>
<Platform Condition=" '$(Platform)' == '' ">x64</Platform>
<Platforms>x64</Platforms>
</PropertyGroup>
</Project>
Adding Nuget package System.IO.Pipelines 4.7.0 gets rid of the error.
This may be related to https://github.com/dotnet/aspnetcore/issues/19548, which was closed as a dupe of https://github.com/dotnet/aspnetcore/issues/19133.
Similar to @davidni, after the upgrade from .NET SDK Core 3.1.101 to 3.1.200, project fails to build with the error:
The type name 'FileIOPermission' could not be found in the namespace 'System.Security.Permissions'. This type has been forwarded to assembly 'System.Security.Permissions, Version=4.0.3.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51' Consider adding a reference to that assembly.
Similar to the guys above. One of my projects which uses msbumb package (https://github.com/BalassaMarton/MSBump) fails to build with 3.1.200:
C:\Users\user\.nuget\packages\msbump\2.3.2\build\MSBump.targets(6,5): error : Method not found: 'System.Xml.Linq.XElement System.Xml.XPath.Extensions.XPathSelectElement(System.Xml.Linq.XNode, System.String, System.Xml.IXmlNamespaceResolver)'. [C:\dev\repos\Mementi_prod\Mementi_prod.csproj]
The build failed. Fix the build errors and run again.
It only fails when using command line tools. It works perfectly when building from Visual Studio 2019.
I found some thread where guys described similar behaviour for different packages: https://github.com/SpecFlowOSS/SpecFlow/issues/1912
Setting this as environment variable fix the issue as a workaround:
MSBUILDSINGLELOADCONTEXT=1
@gp2-gp2 I'll add MSBump to the list of failing tasks: microsoft/msbuild#5202
MSBUILDSINGLELOADCONTEXT
@gp2-gp2 Must I set this environment variable in project or for Operation System?
Hi @dborovsky at Operation System level, at least that's what works for me both in Windows and Ubuntu.
having similar issue with .net 3.1.300 (windows)
@smartpcr with what NuGet package or build task?
I am also experiencing the same with MSBump when targeting a docker-compose project.
20>/root/.nuget/packages/msbump/2.3.2/build/MSBump.targets(6,5): error : Method not found: 'System.Xml.Linq.XElement System.Xml.XPath.Extensions.XPathSelectElement(System.Xml.Linq.XNode, System.String, System.Xml.IXmlNamespaceResolver)'. [/src/src/MyProject/MyProject.csproj]
The project builds fine when i unload docker-compose from the project and re-build.
If anyone is interested, there is an updated and maintained project forked from msbump.
https://github.com/0xF6/Ivy.Versioning
Everything works off the bat, even docker
Closing in favor of https://github.com/dotnet/core/issues/2555
Most helpful comment
Trying to run
dotnet testinmcr.microsoft.com/dotnet/core/sdk:3.1ormcr.microsoft.com/dotnet/core/sdk:3.1-alpinefails with the following:/root/.nuget/packages/specflow.tools.msbuild.generation/3.1.80/build/SpecFlow.Tools.MsBuild.Generation.targets(93,5):error MSB4018: The "GenerateFeatureFileCodeBehindTask" task failed unexpectedly. [/builds/....csproj]/root/.nuget/packages/specflow.tools.msbuild.generation/3.1.80/build/SpecFlow.Tools.MsBuild.Generation.targets(93,5): error MSB4018: System.IO.FileNotFoundException: Could not load file or assembly 'TechTalk.SpecFlow, Version=3.1.0.0, Culture=neutral, PublicKeyToken=0778194805d6db41'. The system cannot find the file specified. [/builds/ ... .csproj]`
I pinned my config back to mcr.microsoft.com/dotnet/core/sdk:3.1.102 as a workaround.