Roslyn: Error CS1902. How to solve it?

Created on 19 Mar 2018  路  4Comments  路  Source: dotnet/roslyn

Version Used:
.NET Framework 4.6
MsBuild Engine Version 15.4.0.0
ubuntu14.4
mono 5.10.0.140

Command: MSBuild MyApp.csproj

CSC : error CS1902: Invalid option 'portable' for /debug; must be full or pdbonly [/vsts/agent/_work/1/s/MajorHazard.MonitorWarning.WebApi/MajorHazard.MonitorWarning.WebApi.csproj]

Area-Compilers Question

Most helpful comment

Glad to hear this is resolved. I'll go ahead and close.
I suspect you encountered a bug which was fixed. No way for the old csc to know about that.

All 4 comments

Tagging @tmat

@jcouv Thanks a lot. I had solved the problem. Solution : Update the Microsoft.Net.Compilers. But why csc(or vs) don't suggest me updating the package?

Glad to hear this is resolved. I'll go ahead and close.
I suspect you encountered a bug which was fixed. No way for the old csc to know about that.

@NMSAzulX
Thanks. I also updated Microsoft.Net.Compliers. After that I build the project and then the error went away.

Was this page helpful?
0 / 5 - 0 ratings