I'm using Microsoft Visual Studio Community 2017. I have created a project with multiple classes to be compiled. The primary class I want the application to run first has public static void Main(string[] args)
in it already. In the library, I've set properties to the following:
Still, the error persists with all the forums I have visited. If you have encountered this problem, please guide me through so I can compile my program. Thank you :)
I was facing this issue in my Visual Studio 2017 15.7.2
version. The cause for this issue in my case was, unknowingly I had changed my Asp.Net Core 2.1
Web API project output type to Class Library
. Changing it back to Windows Application
fixed my issue. Just sharing the same for the users who does silly mistakes like me.
Try changing from netstandard2.0 to netcoreapp2.0 for Target Framework.
Unfortunately, Microsoft has this issue open (https://github.com/dotnet/sdk/issues/833) for a long time, but has provided no answer.
From here
Try adding the following to you <PropertyGroup>
:
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
<RunCommand>$(MSBuildExtensionsPath64)\..\IIS Express\iisexpress</RunCommand>
<RunArguments>/path:"$(MSBuildProjectDirectory)" /port:18082</RunArguments>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With