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

The publish target fails for uap10.0 #129

Open
ryantrem opened this issue Nov 6, 2018 · 6 comments
Open

The publish target fails for uap10.0 #129

ryantrem opened this issue Nov 6, 2018 · 6 comments

Comments

@ryantrem
Copy link

ryantrem commented Nov 6, 2018

When a project includes the uap10.0 target framework, msbuild /t:publish fails with:

C:\Program Files\dotnet\sdk\2.1.402\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.Publish.targets(280,5): error NETSDK1005: Assets file 'C:\Temp\MSBuildSDKExtrasTest\obj\project.assets.json' doesn't have a target for '.NETCore,Version=v5.0'. Ensure that restore has run and that you have included 'netcore50' in the TargetFrameworks for your project.
@ryantrem ryantrem changed the title The publis target fails for uap10.0 The publish target fails for uap10.0 Nov 6, 2018
@clairernovotny
Copy link
Collaborator

Did you run restore first? Either as msbuild /t:restore or in one command msbuild /restore /t:publish

@ryantrem
Copy link
Author

ryantrem commented Nov 6, 2018 via email

@clairernovotny
Copy link
Collaborator

do you have a simple repro that you can share?

@ryantrem
Copy link
Author

ryantrem commented Nov 6, 2018

Default .NET Standard project with MSBuild.Sdk.Extras and uap10.0 added to <TargetFrameworks>:

<Project Sdk="MSBuild.Sdk.Extras/1.6.61">
  <PropertyGroup>
    <TargetFrameworks>netstandard2.0;uap10.0</TargetFrameworks>
  </PropertyGroup>
</Project>

Then just do msbuild /t:restore;publish

@clairernovotny
Copy link
Collaborator

unfortunately publish and restore targets cannot be combined in the same line like that. You either need to call msbuild /t:restore first, or use the /restore switch instead like msbuild /restore /t:publish.

@ryantrem
Copy link
Author

ryantrem commented Nov 6, 2018

I've tried all the combinations of doing a restore first, then a publish, but I always get this error. This only happens for uap10.0.

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