Hide Forgot
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
Tom, could you make an automated test case out of this that we could add to https://github.com/redhat-developer/s2i-dotnetcore ?
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" } } }
Patch posted for review: https://github.com/redhat-developer/s2i-dotnetcore/pull/11
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