The 'NoBuild' property was set to true but the 'Build' target was invoked. #11
-
I am trying to use your package to include ref projects dlls to my nuget package. To build the package, the following command is executed :
I am getting the error message : If I remove the --no-build parameters then I don't get the error message but I'd like to keep it, otherwise the solution is rebuilt a second time as it is already built as a first step in my build pipeline. Is this possible ? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
I think this happens because I am not generating package on build (GeneratePackageOnBuild project property set to false). Instead I generate package in post build
Error is triggered by following code in Microsof.NET.sdk.targets :
If I don't use your package, I don't get the error. Obviously my csproj ref dll are no longer included in the generated package, but at least there is no error, so I'm wondering why your package leads to this error ? |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
I tried to track down the problem. I cannot find the problem. What the program is actually doing is just injecting custom target in the the process of packing (compare https://github.com/teroneko/Teronis.DotNet/blob/9b206bb711670bc352d4dbf73249bc43fbed037e/src/MSBuild/Packaging/ProjectBuildInPackage/src/build/Teronis.MSBuild.Packaging.ProjectBuildInPackage.targets#L11 and https://github.com/NuGet/NuGet.Client/blob/ea0bf4a379b6306fd88ff1529dc57e9b16af326a/src/NuGet.Core/NuGet.Build.Tasks.Pack/NuGet.Build.Tasks.Pack.targets#L434). I do not build. the custom target CopyProjectBuildInPackage (see https://github.com/teroneko/Teronis.DotNet/blob/9b206bb711670bc352d4dbf73249bc43fbed037e/src/MSBu…