Bug 1400976 - s2i build fails when the project is also targeting net451
Summary: s2i build fails when the project is also targeting net451
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: dotNET
Classification: Red Hat
Component: rh-dotnetcore10-container
Version: 1.0
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ga
: 1.0
Assignee: Severin Gehwolf
QA Contact: jiri vanek
Les Williams
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-12-02 13:26 UTC by Tom Deseyn
Modified: 2017-03-20 08:24 UTC (History)
7 users (show)

Fixed In Version: rh-dotnetcore10-docker-1.0-13
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-03-20 08:24:51 UTC
Target Upstream Version:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github redhat-developer s2i-dotnetcore pull 11 0 None None None 2017-03-13 14:11:01 UTC
Red Hat Product Errata RHBA-2017:0560 0 normal SHIPPED_LIVE updated dotNET container images 2017-03-20 12:34:48 UTC

Description Tom Deseyn 2016-12-02 13:26:14 UTC
Description of problem:
s2i build fails when the project is also targeting net451
e.g.
  "frameworks": {
    "net451": {},
    "netcoreapp1.0": {
      "dependencies": {
        "Microsoft.NETCore.App": {
          "version": "1.0.1",
          "type": "platform"
        }
      }
    }

Actual results:
Project src (.NETFramework,Version=v4.5.1) will be compiled because expected outputs are missing
Compiling src for .NETFramework,Version=v4.5.1
/opt/app-root/src/project.json(56,15): error DOTNET1012: The reference assemblies directory was not specified. You can set the location using the DOTNET_REFERENCE_ASSEMBLIES_PATH environment variable.
/opt/app-root/src/project.json(36,35): error NU1001: The dependency mscorlib could not be resolved.
/opt/app-root/src/project.json(36,35): error NU1001: The dependency mscorlib could not be resolved.
/opt/app-root/src/project.json(45,39): error NU1001: The dependency System could not be resolved.
/opt/app-root/src/project.json(46,50): error NU1001: The dependency System could not be resolved.
/opt/app-root/src/project.json(36,35): error NU1001: The dependency System could not be resolved.
/opt/app-root/src/project.json(37,58): error NU1001: The dependency System could not be resolved.

Expected results:
Only perform operations for netcoreapp1.0 framework.
The framework can be specified explicitly on the command line.
dotnet build -f netcoreapp1.0

Comment 1 Omair Majid 2016-12-02 19:32:35 UTC
Tom, could you make an automated test case out of this that we could add to https://github.com/redhat-developer/s2i-dotnetcore ?

Comment 2 Omair Majid 2016-12-02 20:33:33 UTC
I created a sample project that targets netcoreapp1.0.

  "frameworks": {
    "netcoreapp1.0": {
      "dependencies": {
        "Microsoft.NETCore.App": {
          "version": "1.1.0",
          "type": "platform"
        }
      }
    }

This builds fine with .NET Core 1.1's `dotnet build` but fails to build with `dotnet build -f netcoreapp1.1`. Is this a bad side-effect of the proposed change or a PEBKAC?

The following builds fine under .NET Core 1.1 using both `dotnet build` and `dotnet build -f netcoreapp1.1`:

  "frameworks": {
    "netcoreapp1.1": {
      "dependencies": {
        "Microsoft.NETCore.App": {
          "version": "1.1.0",
          "type": "platform"
        }
      }
    }

Comment 3 Omair Majid 2016-12-02 22:47:24 UTC
Patch posted for review: https://github.com/redhat-developer/s2i-dotnetcore/pull/11

Comment 7 errata-xmlrpc 2017-03-20 08:24:51 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2017:0560


Note You need to log in before you can comment on or make changes to this bug.