.NET Core SDK 3.1.300-preview-015048 breaks build with multi targeting
See original GitHub issueWith .NET Core SDK 3.1.200 installed the AWS .NET Core Lambda libraries fail for projects doing multi targeting. For example I have a project that is doing multi targeting with <TargetFrameworks>netstandard2.0;netcoreapp3.1</TargetFrameworks>
and I’m getting following errors with 3.1.200
Internal\InvokeFeatures.cs(6,17): error CS0234: The type or namespace name 'Pipelines' does not exist in the namespace 'System.IO' (are you missing an assembly reference?) [C:\temp\aws-lambda-dotnet\Libraries\src\Amazon.Lambda.AspNetCoreServer\Amazon.Lambda.AspNetCoreServer.csproj]
Internal\InvokeFeatures.cs(232,9): error CS0246: The type or namespace name 'PipeWriter' could not be found (are you missing a using directive or an assembly reference?) [C:\temp\aws-lambda-dotnet\Libraries\src\Amazon.Lambda.AspNetCoreServer\Amazon.Lambda.AspNetCoreServer.csproj]
Internal\InvokeFeatures.cs(232,45): error CS0539: 'InvokeFeatures.Writer' in explicit interface declaration is not found among members of the interface that can be implemented [C:\temp\aws-lambda-dotnet\Libraries\src\Amazon.Lambda.AspNetCoreServer\Amazon.Lambda.AspNetCoreServer.csproj]
Internal\InvokeFeatures.cs(30,31): error CS0012: The type 'PipeWriter' 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'. [C:\temp\aws-lambda-dotnet\Libraries\src\Amazon.Lambda.AspNetCoreServer\
Amazon.Lambda.AspNetCoreServer.csproj]
Internal\InvokeFeatures.cs(230,17): error CS0246: The type or namespace name 'PipeWriter' could not be found (are you missing a using directive or an assembly reference?) [C:\temp\aws-lambda-dotnet\Libraries\src\Amazon.Lambda.AspNetCoreServer\Amazon.Lambda.AspNetCoreServer.csproj]
To reproduce the failure you can use the following steps.
git clone https://github.com/aws/aws-lambda-dotnet.git
cd ./aws-lambda-dotnet/Libraries/src/Amazon.Lambda.AspNetCoreServer
git checkout dev-netcore31
dotnet build
but if I use the following steps which setup a global.json file to use 3.1.101 the project builds correctly.
git clone https://github.com/aws/aws-lambda-dotnet.git
cd ./aws-lambda-dotnet/Libraries/src/Amazon.Lambda.AspNetCoreServer
dotnet new globaljson --sdk-version 3.1.101
git checkout dev-netcore31
dotnet build
This might be related to https://github.com/dotnet/sdk/issues/10878 but since that one was talking about AssemblyLoadContext issues as part of the build I wasn’t sure this should be tagged onto the same issue.
Not sure if this is related but in Visual Studio it is skipping the build for all of the projects even though there is no bin
or obj
folder on 3.1.200 but when I add the global.json for 3.1.101 Visual Studio builds the solution correctly.
Issue Analytics
- State:
- Created 4 years ago
- Reactions:2
- Comments:5 (3 by maintainers)
Top GitHub Comments
Looks like they split this package out. Running
dotnet add package System.IO.Pipelines --version 4.7.2
in your project that uses pipelines fixed it for us.Closing as this was in a 3.1.3xx preview and sounds like solutions were found. Reactivate if it’s still something you want investigated.