0

My site has two website projects. One of them references Microsoft.CodeDom.Providers.DotNetCompilerPlatform. We have recently upgraded this from 3.6.0 to 4.1.0 as part of a wider upgrade project.

The two projects both build, publish and run on my local machine as expected. I've also been able to use WebDeploy to publish both to a UAT environment with no issues there either. The problem is that it errors in Devops (unchanged by the upgrade project), see below.

Error:

Admin\CMS\CMSApp.csproj(14677,5): Error : This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them.  For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is ..\packages\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.3.6.0\build\net472\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.targets.
Project "D:\a\1\s\Admin\CMS\CMSApp.csproj" on node 1 (default targets).

The pipeline first runs nuget restore, which correctly restores v4.1.0 of the package as expected. The next step is to build the project, which uses a Visual Studio Build task (details below): enter image description here

1
  • Have you checked your app.config/web.config files. There maybe dependencies lines in there which states that the project is waiting for exact version of the dll. Now if you run it on your local machine, you might get the old version from local cache. The dependencies look like this: <dependentAssembly> <assemblyIdentity name="System.Web.WebPages" publicKeyToken="..." /> <bindingRedirect oldVersion="0.0.0.0-3.0.0.0" newVersion="3.0.0.0" /> </dependentAssembly> Also check the <compilers> block at the end of web.config. Do you have proper version in there? Commented Nov 11 at 18:28

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.