0
votes

I have a mvc3 application in. net framework 4.7.2. This is a solution that was upgraded from mvc2 and build with out issue in visual studio 2019. I do not have any nuget package. My source code is in git azure devops. I try to create a asp.net build in azure devops and I receive the following errors

  1. List item Error CS0234: The type or namespace name 'Mvc' does not exist in the namespace 'System.Web' (are you missing an assembly reference?)

  2. Error CS0246: The type or namespace name 'HtmlHelper' could not be found (are you missing a using directive or an assembly reference?)

  3. Error CS0246: The type or namespace name 'UrlHelper' could not be found (are you missing a using directive or an assembly reference?)**

Please note I have system.web.mvc and system.web.webpages added to my references in MVC project and it complies ok in Visual Studio 2019.

here is content of my yml file:

enter image description here

2
Would you please mark your answer? This will make it easier for people who have the same question to find answers.Walter

2 Answers

1
votes

You need to first restore NuGet packages so please enable these steps:

- task: NuGetToolInstaller@1

- task: NuGetCommand@2
  inputs:
    restoreSolution: '$(solution)'
1
votes

I figured out the issue . I did not have any package.config in my solution . I added that and installed asp.net MVC package and it works now