Error CS0115 '_Page_Views_Partials_Contact_Contact_cshtml.Execute()': no suitable method found to override Contact.cshtml Line 1
Error CS0246 The type or namespace name 'UmbracoViewPage<>' could not be found (are you missing a using directive or an assembly reference?) Contact.cshtml Line 1
Error CS0103 The name 'Context' does not exist in the current context Contact.cshtml Line 1
Error CS0246 The type or namespace name 'UmbracoViewPage<>' could not be found (are you missing a using directive or an assembly reference?) Contact.cshtml Line 1
Error CS0103 The name 'Html' does not exist in the current context Contact.cshtml Line 3
Error CS0103 The name 'FormMethod' does not exist in the current context Contact.cshtml Line 3
Error CS0103 The name 'Html' does not exist in the current context Contact.cshtml Line 5
Error CS0103 The name 'Html' does not exist in the current context Contact.cshtml Line 8
Error CS0103 The name 'Html' does not exist in the current context Contact.cshtml Line 13
Error CS0103 The name 'Html' does not exist in the current context Contact.cshtml Line 16
Error CS0103 The name 'Html' does not exist in the current context Contact.cshtml Line 22
Error CS0103 The name 'Html' does not exist in the current context Contact.cshtml Line 25
Error CS0103 The name 'Html' does not exist in the current context Contact.cshtml Line 31
Error CS0103 The name 'Html' does not exist in the current context Contact.cshtml Line 34
Warning AD0001 Analyzer 'Microsoft.CodeAnalysis.CSharp.Analyzers.FixAnalyzers.CSharpFixerWithFixAllAnalyzer' threw an exception of type 'System.TypeInitializationException' with message 'The type initializer for 'Microsoft.CodeAnalysis.Analyzers.FixAnalyzers.FixerWithFixAllAnalyzer`1' threw an exception.'. CSC 1
All the errors are in the Contact.cshtml partial view
Site is using Umbraco 7.10.4
Visual Studio 2017
I installed Umbraco 7.10.4 into Visual Studio via Nuget into an empty project.
I didn't use the starter kit Paul mentions in his video as the site
I've just ran the site locally in Visual Studio and completed the Umbraco setup.
I no longer get any errors, but am getting the following warning 19 times in the Contact.cshtml
Warning CS1702 Assuming assembly reference 'System.Web.Mvc, Version=5.2.3.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' used by 'umbraco' matches identity 'System.Web.Mvc, Version=5.2.4.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' of 'System.Web.Mvc', you may need to supply runtime policy
1- If the following lines of code give a warning:
Assuming assembly reference 'system.web.mvc version = 5.2.3.0 culture = neutral, publickeytoken = version = 5.2.4.0
Requirements:
If the Microsoft.AspNet.Mvc package is version 5.2.4 or higher
Remove the installed package from the Nuget Package Manager by selecting the dependency options,
Then, installing Install.Package Microsoft.AspNet.Mvc -Version 5.2.3 will eliminate the problem.
2- After doing this step, you will need to Clean Solution and then Build it.
3- In the build process, it can give an error message as follows.
Many partial view errors in Visual Studio
Hi,
I'm trying to create a simple contact form for a site by following the instructions here https://codeshare.co.uk/blog/how-to-create-a-contact-form-in-umbraco-using-mvc-and-c/
All goes fine until I create the contact.cshtml partial view and Visual Studio throws up lots of errors, most of them are the same.
Here is the model ContactModel.cs :
Here is the controller ContactSurfaceController.cs
And the code in Contact.cshtml in the View\Partials\Contact folder:
And finally the errors in Visual Studio:
All the errors are in the Contact.cshtml partial view
I hope I'm missing something simple.
I've just ran the site locally in Visual Studio and completed the Umbraco setup.
I no longer get any errors, but am getting the following warning 19 times in the Contact.cshtml
So something still not quite right?
After installation of Umraco with MVC selection
1- If the following lines of code give a warning: Assuming assembly reference 'system.web.mvc version = 5.2.3.0 culture = neutral, publickeytoken = version = 5.2.4.0
Requirements:
If the Microsoft.AspNet.Mvc package is version 5.2.4 or higher Remove the installed package from the Nuget Package Manager by selecting the dependency options, Then, installing Install.Package Microsoft.AspNet.Mvc -Version 5.2.3 will eliminate the problem.
2- After doing this step, you will need to Clean Solution and then Build it. 3- In the build process, it can give an error message as follows.
Analyzer 'Microsoft.CodeAnalysis.CSharp.Analyzers.FixAnalyzers.CSharpFixerWithFixAllAnalyzer' threw an exception of type Solution from Console From the following URL https://www.nuget.org/packages/microsoft.codeanalysis.analyzers
Microsoft.CodeAnalysis.Analyzers 2.6.3 The Nuget Package will be installed to correct the corresponding error.
Then you will need to Clean the project and then Clean again.
is working on a reply...