-
Notifications
You must be signed in to change notification settings - Fork 253
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
Xdt Transforms support in Package Reference #5954
Comments
Made some progress on this to transform via targets, facing one issue with web.config file. Need to follow it with ASPNET team. |
Added NuGet samples to demonstrate how to author and consume packages with PR# NuGet/Samples#15 |
Sample PR is merged to show how can we transform xml files with msbuild targets which will allow it to work with |
Provided sample solution will not work for ASP.NET Core projects - they do not have TransformWebConfigCore and similar tasks on build, still they may have web.config file to configure IIS module behavior. |
Suggested solution also fails when publishing to Microsoft Azure App Service. Just try to create Microsoft Azure App Service publish profile and publish it there with sample consuming project.
Suggested solution also prevents from applying VS standard Web.Debug.config/Web.Release.config transforms when publishing to folder selected.
Definitely, we try to apply transform to same file twice with |
@iskiselev Thanks for letting us know these issues. We'll analyze these issues. |
Update:
|
Let us know if you see any other issue! |
What about preventing from applying VS standard Web.Debug.config/Web.Release.config? |
That has nothing to do with NuGet and is out of scope for this issue. You can check with ASP.NET team. |
@jainaashish Is this Xdt Transform sample currently working? Getting the master branch, I assumed that installing the package into the MyWebApp and doing a build would transform the config files, but it doesn't. Any tips? |
@jainaashish, I cannot seem to adapt this sample to work for our project. A few questions before I spend any more time debugging the issue:
|
XDT Transforms don't work for transitive restore
https://msdn.microsoft.com/en-us/library/dd465326%28v=vs.110%29.aspx?f=255&MSPPError=-2147217396
https://blog.nuget.org/20130920/how-to-use-nugets-xdt-feature-examples-and-facts.html)
There are over 700 unique packages on nuget.org that have xml transforms.
This can't be done in PackageReference currently because the concept of install/uninstall is non existent.
Package Reference does not change any project artifacts by design!
These transforms are normally required in the published application, however we need to consider the F5 experience, since just building does not copy over the config files.
Another concern is that not only web.config files are being transformed but also applicationinsights.xmls, UI.xml and seemingly random xmls .
The text was updated successfully, but these errors were encountered: