I have a nuget package that has .xdt transforms for a app.config file. The xdt files are included in the netstandard 2.0 project that builds the nuget package. Their build action is set to content/do not copy. When I install the package in a .net framework project, the xdt transforms work corectly, but when I install the package in a netstandard 2.0 project, the xdt files do not transform the config file, but instead are added to the project with a build action of C# Compiler. Does nuget not support xdt transforms on netstandard projects?
Are xdt transforms not supported in nuget packages installed in a netstandard 2.0 project?
646 Views Asked by Owen Johnson At
1
There are 1 best solutions below
Related Questions in NUGET
- How do I locally specify the path for nuget in my dockerfile?
- Finding all available versions of a NuGet package within a specific version range
- An error occurred while trying to restore packages: 'Dapper' already has a dependency defined for 'System.Data.SqlClient'
- .NET 6 Custom Nuget package referencing other packages - Do I have to include the other packages myself?
- What is the trigger for JFrog Artifactory to sort a nuget package as "prerelease"?
- Force new version of a different package without referencing it
- dotnet build not able to find nuget package in custom source while Visual Studio manage it
- How to resolve the errors when Nugets need to be downgraded
- How can I copy plug-in DLLs from a sub folder using NuGet
- .NET dependency management: `dotnet add package` vs. Paket?
- Nuget Package downloaded to wrong directory
- How to resolve NuGet Transitive Packages with vulnerabilities
- error NU1101: Unable to find package Telerik.Drawing.Skia.Trial. No packages exist with this id in source(s)
- ASP.NET Core library project that produces NuGet package
- NuGet package doesn't copy file to destination project
Related Questions in .NET-STANDARD-2.0
- can't reference netstandard2.0 library if a reference to CodeAnalysis.CSharp is present
- How do I suppress warnings for dependencies in sourcecode generators?
- Wrong version loaded of "System.Servicemodel" when using a service reference
- Using PdfiumViewer in a .NET standard Assembly
- The SqlParameterCollection only accepts non-null SqlParameter type objects, not SqlParameter objects
- How to ensure that implementations have a static factory method in older versions of .NET?
- How to specify DevTools protocol version in Selenium?
- How to consume a SOAP api with WCF Service on Xamarin.iOS
- Why are unsupported System.Web classes still accessible in .Net Standard?
- System.ServiceModel.Primitives is simply not being referenced at build time (though corresponding DLL seems to be properly installed)
- unable to create a target path for the nuget package in linux , but its working in Windows
- How does Visual Studio picks up the current framework?
- Build error: "Cannot find project info. This can indicate a missing project reference" after migrating from NET Framework 4.0 to NET Standard 2.0
- string.AsSpan() vs implicit cast operator peformance in .NET for ReadOnlySpan<char>
- Referenced Assemblies not included in NuGet package
Related Questions in XDT-TRANSFORM
- Transformed config file is not copied to the output directory of he referencing project
- How to use xdt-transform when the Web.config element already contains a different xmlns
- Azure DevOps Release transform/replace tokens
- XML Transform locate a node based on values in neighboring node
- Replace Connection String with Web.Release.config using external configSource
- Can you run Microsoft.VisualStudio.SlowCheetah from powershell?
- XDT Transformation in the Target Web config file
- How to Insert new Key in APP settings section with web.config Transformation
- XDT Transform not working for applicationHost.xdt on Azure - Environment variables are ignored
- ASP.NET and Visual Studio 2019: how to set up Web.Debug and Web.Release if you have configSource in Web.config?
- Transform app.config entries only if a flag in app.debug.config is true
- How to use XDT on NuGet install if there is no config file already there?
- app.config not getting transformed after installation of nuget package
- xdt transforms by a child node attribute
- Nuget xdt transform does not work for config files
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Popular # Hahtags
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
You are right, xdt transforms aren't supported in
PackageReferenceenvironment. This includes both sdk-based projects as well as classic .net framework projects usingPackageReferenceinstead ofpackages.config. You can follow this GitHub issue for more details. There is also a sample package that shows how to use build-time logic to apply transforms instead to work in all environments.Also note that .NET Standard and .NET Core projects don't have an
app.configfile that a transform could apply to. This is only relevant for .NET Framework / classic Web Applications. (with maybe an exception for IIS settings for ASP.NET Core apps but they don't affect the app itself, only IIS hosting environment).