0
votes

I have a .Net Core 2.0 solution that has been working great for a few months now. I am ready to make another push and let people look at it. Builds and runs great locally, however, I am unable to publish it (to Azure or even Locally - so it is not an Azure issue) anymore. The only real significant change was upgrading to Visual Studio 15.4.3 since my last push.

This is the error:

Severity Code Description Project File Line Suppression State Error The command ""dotnet" exec --runtimeconfig "C:\Avantia Projects\Time Card\avantia-timesheet\Solution\Almanac\bin\Release\netcoreapp2.0\Avantia.Almanac.runtimeconfig.json" --depsfile "C:\Avantia Projects\Time Card\avantia-timesheet\Solution\Almanac\bin\Release\netcoreapp2.0\Avantia.Almanac.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. Almanac C:\Program Files\dotnet\sdk\NuGetFallbackFolder\microsoft.aspnetcore.mvc.razor.viewcompilation\2.0.0\build\netstandard2.0\Microsoft.AspNetCore.Mvc.Razor.ViewCompilation.targets 60

I have read many articles out there, mostly saying to delete the bin and obj folders. Which I have in all three projects within the solution. I then did a dotnet restore and again, everything builds and runs locally but will not Publish successfully.

This was originally written in 1.x and converted to 2.0 but that conversion took place when 2.0 RTM came out many publishes ago.

2

2 Answers

1
votes

It might be similar to what happened to me. I eventually found the answer but it was not straightforward at all.

dotnet core Method 'ValidateOptions' ... does not have an implementation

0
votes

This does not make sense to me (seeing that the error above talks about Razor) but in my opinion Microsoft needs to figure something out for this based on their suggestions.

So, the MS docs suggest Twilio for 2 factor authentication. Fine. Then Twilio suggests another package called Authy which is over 2 years old and clearly not .Net core.

I removed Authy from my solution at this point seeing that it is only something I want to get to and do not Need at this time. That took care of the problem in publishing.

I assume perhaps because it is not .Net core? Either way, things can now progress forward.