Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compiler error while scaffolding an MVC controller #258

Closed
Tratcher opened this issue Jun 21, 2016 · 5 comments
Closed

Compiler error while scaffolding an MVC controller #258

Tratcher opened this issue Jun 21, 2016 · 5 comments

Comments

@Tratcher
Copy link
Member

Tratcher commented Jun 21, 2016

I get this VS popup sporadically when trying to scaffold a new controller:

---------------------------
Microsoft Visual Studio
---------------------------
Error

There was an error running the selected code generator:

'Project WebApplication6 (.NETCoreApp,Version=v1.0) will be compiled because project is not safe for incremental compilation. Use --build-profile flag for more information.
Compiling WebApplication6 for .NETCoreApp,Version=v1.0
Running with configuration from C:\temp\WebApplication6\src\WebApplication6\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:05.9348301'
---------------------------
OK   
---------------------------

Repro:

  • Right-click on Controllers and Add -> Controller
  • Select MVC Controller - Empty
  • Set the controller name and click Add

Sometimes you get the above error and when pressing OK it goes back to the controller name window. Still not sure what triggers the error.

@Tratcher
Copy link
Member Author

I have also seen this error trying to add a view.

@Tratcher
Copy link
Member Author

And a new API controller. This seems to be a general issue.

@Tratcher
Copy link
Member Author

After the error you end up back at the controller name window. Clicking Add again succeeds.

@barrytang
Copy link

TFS Bug#233432

@prafullbhosale
Copy link
Contributor

Closing this.
Now if the compilation fails, it will display the reason for the compilation failure.
Will re-open this if the compilation error is caused due to scaffolding itself.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants