Quantcast
Channel: ASP.NET Core
Viewing all articles
Browse latest Browse all 9386

Project Publish Error - CS1555 Program not found

$
0
0

Hello,

I've just finished an asp.net core 2.0 application and wanted to publish it to my local file system, but I got two diffferent errors depending on the value of the startup object.

So when I go to my website's properties in Visual Studio, under 'Application -> Startup Object', I have four options available: Not set,appName.Program, Program, and Program (yes, there are two options named the same 'Program', I don't know what the difference might be). So in case I choose one of the first two, I get an error something like this: "The command ""dotnet" exec --runtimeconfig"..path\appName\netcoreapp2.0\appName.runtimeconfig.json" --depsfile "path\appName\netcoreapp2.0\appName.deps.json" "C:\Program Files\dotnet\sdk\NuGetFallbackFolder\microsoft.aspnetcore.mvc.razor.viewcompilation\2.0.0\build\netstandard2.0\Microsoft.AspNetCore.Mvc.Razor.ViewCompilation.dll" @"obj\Release\netcoreapp2.0\microsoft.aspnetcore.mvc.razor.viewcompilation.rsp"" exited with code 1"".

If I choose any of the 'Program' options, I get this error: "CS1555 - Could not find 'Program' specified for Main method". I don't know why that could be, since there clearly is a program class with a main method (I used VS's template which has it by default, of course).

Any suggestions why I get these errors?

Thank you

Spartai


Viewing all articles
Browse latest Browse all 9386

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>