-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Custom build task is not called when building on solution level #3564
Comments
Do I understand correctly that you're both building the NuGet package and referencing it inside the same build? That definitely won't work, because project imports can't be updated after it is loaded. That means:
For your scenario, I think you'd like something like dotnet/sdk#1151, but that doesn't currently exist. |
I see. What you are describing is exactly my issue. You can close this issue as a duplicate then. |
Duplicate of dotnet/sdk#1151 |
Oh, and your workaround of building in phases sounds pretty reasonable to me, given the current state of things. |
Steps to reproduce
Hi:
I have created a nuget package to redistribute IIS Web Manager (currently named Microsoft.IIS.WebManager.Middleware). It's a static website. There's a build task in the nuget package that would copy the website content to a project's wwwroot directory if this nuget package is imported. The example usage was (https://github.com/shhsu/IIS.WebManager/blob/shhsu/proj/src/Microsoft.IIS.WebManager.SelfHost/Microsoft.IIS.WebManager.SelfHost.csproj)
Project file
Directory contents:
See https://github.com/shhsu/IIS.WebManager/tree/shhsu/proj
Command line
Edit the solution file
Microsoft.IIS.WebManager.sln
and re-enable buildingMicrosoft.IIS.WebManager.SelfHost
project (I disabled it because it didn't work as expected)Call:
Expected behavior
The output directory
WebManagerApp
should contains awwwroot
directory.Actual behavior
The
wwwroot
directory does not exist.NOTE:
I was able to workaround the issue by disabling build of
Microsoft.IIS.WebManager.SelfHost
from solution.And I would call
msbuild Microsoft.IIS.WebManager.sln
and build
Microsoft.IIS.WebManager.Middleware
first, then I would buildMicrosoft.IIS.WebManager.SelfHost
by itselfThis seem to generate the result as expected,
WebManagerApp
has the correct content inwwwroot
directoryEnvironment data
msbuild /version
output: 15.7.177.53362OS info:
Version 10.0.17134 Build 17134
If applicable, version of the tool that invokes MSBuild (Visual Studio, dotnet CLI, etc):
The text was updated successfully, but these errors were encountered: