Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

error NETSDK1005: Assets file 'D:\a\1\s\...\project.assets.json' doesn't have a target for '.NETStandard,Version=v1.5' #2720

Closed
AArnott opened this issue Dec 5, 2018 · 9 comments
Milestone

Comments

@AArnott
Copy link
Contributor

AArnott commented Dec 5, 2018

Very similar to #1321, except that it works fine on my own machine, but consistently fails when run in Azure Pipelines.

C:\hostedtoolcache\windows\dncs\2.1.500\x64\sdk\2.1.500\Sdks\Microsoft.NET.Sdk\targets\Microsoft.PackageDependencyResolution.targets(198,5): error NETSDK1005: Assets file 'D:\a\1\s\obj\Microsoft.VisualStudio.Composition.LocalizationShell\project.assets.json' doesn't have a target for '.NETStandard,Version=v1.5'. Ensure that restore has run and that you have included 'netstandard1.5' in the TargetFrameworks for your project. [D:\a\1\s\src\Microsoft.VisualStudio.Composition.LocalizationShell\Microsoft.VisualStudio.Composition.LocalizationShell.csproj]

The LocalizationShell project targets netstandard1.0, and is referenced by a multitargeting project that targets several frameworks including netstandard1.5.

The odd thing is this works on my machine, on AppVeyor, and even on Azure Pipelines in the past. But now it's consistently failing.

This may be a dupe of #2563

@AArnott
Copy link
Contributor Author

AArnott commented Dec 5, 2018

Please note that all the project.assets.json files and the verbose msbuild log are all available from the Azure Pipeline build I link to above as build artifacts.

@AArnott
Copy link
Contributor Author

AArnott commented Dec 5, 2018

I think this may be a regression in 15.9.x, since commits we were able to build a couple months ago can no longer be built.

@nguerrera
Copy link
Contributor

Looking at binlog, there is something wrong in TFM negotiation between P2P here. Microsoft.VisualStudio.Composition is building Microsoft.VisualStudio.LocalizationShell with TargetFramework=netstandard1.5 global property, which is not a valid TFM for the latter.

There's a solution build dependency that triggers this. This looks like another bug I investigated a little while ago, but I do not recall the msbuild versions impacted. I will search for it.

@nguerrera
Copy link
Contributor

Looks exactly like dotnet/msbuild#3626, but that was supposed to be fixed in 15.9, not caused by 15.9.

cc @rainersigwald

@nguerrera
Copy link
Contributor

Binlog has this:

MSBuildVersion = 15.8.169

@AArnott Is it possible you downgraded to 15.8 RTM from 15.9 preview in pipelines rather than upgraded to 15.9 RTM?

@nguerrera nguerrera added this to the Discussion milestone Dec 5, 2018
@nguerrera
Copy link
Contributor

Could also have happened if pipelines was previously on 15.7 and now moved to 15.8. That's where the actual regression happened, and it was fixed in 15.9. Actually upgrading to 15.9 should resolve this.

@AArnott
Copy link
Contributor Author

AArnott commented Dec 5, 2018

Thanks, @nguerrera. Unfortunately I can't influence when these cloud build hosts upgrade to 15.9.

But since you mentioned solution dependencies are involved (which I rarely use, but do in this solution), I tried simply removing the solution dep, which I can't remember why I even needed. I'll see if I can get that route to work. :)

@nguerrera
Copy link
Contributor

nguerrera commented Dec 5, 2018

Duplicate of dotnet/msbuild#3626

@nguerrera nguerrera marked this as a duplicate of dotnet/msbuild#3626 Dec 5, 2018
@AArnott
Copy link
Contributor Author

AArnott commented Dec 5, 2018

Ya, removing the solution dependency (and using ProjectReference with a ReferenceOutputAssembly=false metadata) made an adequate workaround.
Thanks again.

wli3 pushed a commit that referenced this issue Feb 7, 2020
…907.1 (#2720)

- Microsoft.DotNet.Arcade.Sdk - 1.0.0-beta.19457.1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants