I have a large solution which I have updated from .NET Core 3.1 to .NET 7
This is all compiling on my local development machine
However, I get lots of failures when I build via DevOps pipeline
For example,
Has anyone had this issue? It really concerns me that this works on my local machine but not the pipeline and that key packages such as Auto Mapper are saying not supported on the pipeline, but compile fine locally
My pipeline is shown below
2
Answers
I will leave this question here as the issue is subtle
The windows-latest image doesnt have a recent version of nuget installed, its only 4.1
I fixed by adding the following before the nuget task
Your workaround for installing the latest nuget could be the only solution currently.
You could check this github ticket Nuget_Tool_Cache_issue#16800, a lot of developers are confused with this behavior.
Same issue was observed when I was trying to investigation further in this ticket. I suppose that it could be by design that the old
Nuget 4.1
could not recognize the compatibility between the packages with the latest.Net 7.0
You could also raise a feature request ticket to raise more concern for future update on this behavior.