Reputation: 159
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
List item Error CS0234: The type or namespace name 'Mvc' does not exist in the namespace 'System.Web' (are you missing an assembly reference?)
Error CS0246: The type or namespace name 'HtmlHelper' could not be found (are you missing a using directive or an assembly reference?)
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:
Upvotes: 0
Views: 842
Reputation: 159
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
Upvotes: 1
Reputation: 40553
You need to first restore NuGet packages so please enable these steps:
- task: NuGetToolInstaller@1
- task: NuGetCommand@2
inputs:
restoreSolution: '$(solution)'
Upvotes: 1