`Project cannot be packaged` warning even when `<IsPackable>true</IsPackable>` in project file has defined
See original GitHub issueSteps to reproduce
I have a netcoreapp2.2
project which i’m trying to build by using dotnet (3.0.100)
getting the warning
for warning : This project cannot be packaged because packaging has been disabled. Add <IsPackable>true</IsPackable> to the project file to enable producing a package from this project.
Expected behavior
Ignore projects which has defined <IsPackable>true</IsPackable>
.
Actual behavior
Now cli prints out a warning which should not.
Environment data
dotnet --info
output:
.NET Core SDK (reflecting any global.json):
Version: 3.0.100
Commit: 04339c3a26
Runtime Environment: OS Name: ubuntu OS Version: 18.04 OS Platform: Linux RID: ubuntu.18.04-x64 Base Path: /usr/share/dotnet/sdk/3.0.100/
Host (useful for support): Version: 3.0.0 Commit: 95a0a61858
.NET Core SDKs installed: 2.1.105 [/usr/share/dotnet/sdk] 2.1.503 [/usr/share/dotnet/sdk] 2.2.103 [/usr/share/dotnet/sdk] 3.0.100 [/usr/share/dotnet/sdk]
.NET Core runtimes installed: Microsoft.AspNetCore.All 2.1.7 [/usr/share/dotnet/shared/Microsoft.AspNetCore.All] Microsoft.AspNetCore.All 2.2.1 [/usr/share/dotnet/shared/Microsoft.AspNetCore.All] Microsoft.AspNetCore.App 2.1.7 [/usr/share/dotnet/shared/Microsoft.AspNetCore.App] Microsoft.AspNetCore.App 2.2.1 [/usr/share/dotnet/shared/Microsoft.AspNetCore.App] Microsoft.AspNetCore.App 3.0.0 [/usr/share/dotnet/shared/Microsoft.AspNetCore.App] Microsoft.NETCore.App 2.0.7 [/usr/share/dotnet/shared/Microsoft.NETCore.App] Microsoft.NETCore.App 2.1.7 [/usr/share/dotnet/shared/Microsoft.NETCore.App] Microsoft.NETCore.App 2.2.1 [/usr/share/dotnet/shared/Microsoft.NETCore.App] Microsoft.NETCore.App 3.0.0 [/usr/share/dotnet/shared/Microsoft.NETCore.App]
To install additional .NET Core runtimes or SDKs: https://aka.ms/dotnet-download
Issue Analytics
- State:
- Created 4 years ago
- Comments:11 (6 by maintainers)
Top GitHub Comments
The problem was i was using global project properties which was applying to all projects:
By adding a condition it fixed:
@dasMulli no
dotnet pack
. the problem is indotnet build
command. when i’m trying to build the solution which contains multiple projects, some of them has<IsPackagable>true</IsPackagable>
some of them not or have<IsPackagable>false</IsPackagable>
tags. but for those project which the target framework isnetcoreapp2.2
fails ( if the the tag has set tofalse
) .