For my company I'm creating a nuget package that transforms a vanilla console project to a corporate batch project so we don't have to do this boilerplate actions every time we create a new batch.
For this I need the target framework to be not Profile=Client, which is the default for new Console Application.
Currently I'm looking into app.config.install.xdt
as follows:
<?xml version="1.0"?>
<configuration xmlns:xdt="http://schemas.microsoft.com/XML-Document-Transform">
<startup>
<supportedRuntime
sku=".NETFramework,Version=v4.0"
xdt:Transform="SetAttributes"
xdt:Locator="Condition(@sku='.NETFramework,Version=v4.0,Profile=Client')"
xdt:Transform="SetAttributes"/>
</startup>
</configuration>
This however replaces the entire sku attribute. This could become a problem when we change framework version.
Is it possible to only remove the profile=client part?
Or is there maybe a better way altogether to enforce this?