“The type or namespace name 'Route' could not be found” using “attribute routing”

后端 未结 4 2170
栀梦
栀梦 2021-02-19 08:57

Just trying to splice some code from one working project to another. The \"from\" project uses \"attribute routing\" where you embed [Route(…)] directives in the W

4条回答
  •  孤城傲影
    2021-02-19 09:43

    This comment from Vedran Mandić solved the problem for me. I'm re-posting it here because I think it should be the answer (or at least a answer).

    I did an 'Update-Package Microsoft.AspNet.WebApi.WebHost -reinstall' and it worked. Funny this happens after getting the latest version on different PCs from TFS. I guess this happens because of nuget packages not working properly with the versioning system

提交回复
热议问题