Skip to content

Scaffolding output doesn't contain the compilation errors if the project compilation fails during scaffolding #260

Closed
@prafullbhosale

Description

@prafullbhosale

Try to run
dotnet aspnet-codegenerator -p <pathtoproject> controller --controllerName DefaultController --noViews
on a project that has compilation errors.
It doesn't show what the compilation error was.

Expected:

Build Failed
Project WebApplication8 (.NETCoreApp,Version=v1.0) will be compiled because project is not safe for incremental compilation. Use --build-profile flag for more information.
Compiling WebApplication8 for .NETCoreApp,Version=v1.0
Running with configuration from C:\Users\fwtlaba\Documents\Visual Studio 2015\Projects\WebApplication8\src\WebApplication8\bundleconfig.json
Processing wwwroot/css/site.min.css
  Bundled
  Minified
Processing wwwroot/js/site.min.js
C:\Program Files\dotnet\dotnet.exe compile-csc @C:\Users\fwtlaba\Documents\Visual Studio 2015\Projects\WebApplication8\src\WebApplication8\obj\Debug\netcoreapp1.0\dotnet-compile.rsp returned Exit Code 1
C:\Users\fwtlaba\Documents\Visual Studio 2015\Projects\WebApplication8\src\WebApplication8\Program.cs(21,23): error CS1002: ; expected

Compilation failed.
    0 Warning(s)
    1 Error(s)

Time elapsed 00:00:09.4108500

Actual:

Build Failed
Project WebApplication8 (.NETCoreApp,Version=v1.0) will be compiled because project is not safe for incremental compilation. Use --build-profile flag for more information.
Compiling WebApplication8 for .NETCoreApp,Version=v1.0
RunTime 00:00:08.53
Running with configuration from C:\Users\fwtlaba\Documents\Visual Studio 2015\Projects\WebApplication8\src\WebApplication8\bundleconfig.json
Processing wwwroot/css/site.min.css
  Bundled
  Minified
Processing wwwroot/js/site.min.js
Compilation failed.
    0 Warning(s)
    1 Error(s)
Time elapsed 00:00:06.6119118

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions