-
Notifications
You must be signed in to change notification settings - Fork 258
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
dotnet pack fails with project references and <TargetFramework> #3865
Comments
|
Looks like it's not our issue. Msbuild will pass two paths to nuget pack task in TargetPathsToAssemblies like following: the first one is right one, the second one doesn't exist, that's why nuget throw. those two paths are returned by msbuild task Targets="BuiltProjectOutputGroup;DocumentationProjectOutputGroup" |
See dotnet/sdk#356 (comment). The issue is in the way the msbuild calls in the pack targets are batched and not a problem in the SDK targets. |
When I remove all of the seemingly unnecessary usage of %(_MSBuildProjectReferenceExistent) in the local copy of the pack targets in my package cache, then the pack succeeds in this case. |
I agree that that usage seems unnecessary--it's creating multiple invocations of the same project for combinations of TargetFrameworks (desired) + various project-reference properties (not needed since they don't apply to the project being built. |
This has only been checked into dev (4.0.0-rc2). This should be closed when we cherry-pick to 4.0.0-rc branch. |
Steps
dotnet new
two .csproj<TargetFramework>
not<TargetFrameworks>
dotnet restore
bothdotnet build
bothdotnet pack
projectAExpected
projectA should have a .nupkg produced.
Actual
The text was updated successfully, but these errors were encountered: