PS C:\Source\cli-samples\HelloMvc> dotnet run -f net452
2. The project does not support the desired framework: net452
dunno, either no numbered list at all or the missing part of the message (if one exists)?
2. The project does not support the desired framework: net452
dotnet --info output:
PS C:\Source\cli-samples\HelloMvc> dotnet --info
.NET Command Line Tools (1.0.0-rc2-002655)
Product Information:
Version: 1.0.0-rc2-002655
Commit Sha: 3e96a05f9c
Runtime Environment:
OS Name: Windows
OS Version: 10.0.10586
OS Platform: Windows
RID: win10-x64
It would be nice if build, publish and run produced the same error message.
Currently their output is:
$ dotnet run -f net452
2. The project does not support the desired framework: net452
$ dotnet build -f net452
Project '/Users/…/BuildRepository/project.json' does not support framework: .NETFramework,Version=v4.5.2.
$ dotnet publish -f net452
'/Users/…/BuildRepository' cannot be published for 'net452' '<no runtime provided>'
My preference would be towards the current output of build (Project '…' does not support framework: .NETFramework,Version=v4.5.2.)
Agree with @dasMulli, but I think keeping the explicit TFM in there is helpful (parenthetically adding it to the end of the spelled-out framework name?).
The root issue of the missing 1. … line is quite simple.. classic operator precedence and associativity surprise 🎉
a set of parenthesis is needed here
"a" + null == null ? "b" : "c" is always "c" :wink:
I'm holding off submitting a PR because there is still dotnet/sdk#5919 and i'm afraid it might break some tooling.
Well, the good news is that this specific issue is not reproing on the latest tools. The bad news is that we need some better messages because the current ones are not that great. I've filed dotnet/sdk#648 to track that. Will close this one.
I am facing the same issue, and I have all the latest downloads.
It was a project that was apparently created with some other version and I was trying to run it in mine.
That being resolved, I have another problem with the Streamreader in C#. I dont know if this is the right platform for this question, but if there is any help, Streamreader doesnot accept string.
Error Messsage : error CS1503: Argument 1: cannot convert from 'string' to 'System.IO.Stream'
Most helpful comment
It would be nice if
build,publishandrunproduced the same error message.Currently their output is:
My preference would be towards the current output of
build(Project '…' does not support framework: .NETFramework,Version=v4.5.2.)