Skip to content
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

"DependentUpon" not added in SDK-style csproj #104

Closed
andreasstolpmann opened this issue Jan 18, 2018 · 2 comments
Closed

"DependentUpon" not added in SDK-style csproj #104

andreasstolpmann opened this issue Jan 18, 2018 · 2 comments

Comments

@andreasstolpmann
Copy link

"Add Transform" does not add the <DependentUpon>App.config</DependentUpon> Attribute when used in projects using the new SDK-style csproj.

Example:
Expected

   <None Include="App.Debug.config">
      <DependentUpon>App.config</DependentUpon>
      <IsTransformFile>True</IsTransformFile>
    </None>

Actual

   <None Include="App.Debug.config">
      <IsTransformFile>True</IsTransformFile>
    </None>

Using the old csproj style everything works fine.

The Add DepentUpon metadata to transform files option is activated in all cases.

@davilimap
Copy link
Member

I created a new .NET Core 2.0 app and added an App.config file and an appsettings.json file. Add Transform is correctly adding the correct metadata on both. This is the resulting project file:

<Project S<Project Sdk="Microsoft.NET.Sdk">

  <PropertyGroup>
    <OutputType>Exe</OutputType>
    <TargetFramework>netcoreapp2.0</TargetFramework>
  </PropertyGroup>

  <ItemGroup>
    <None Update="App.config">
      <TransformOnBuild>true</TransformOnBuild>
    </None>
    <None Update="App.Debug.config">
      <IsTransformFile>true</IsTransformFile>
      <DependentUpon>App.config</DependentUpon>
    </None>
    <None Update="App.Release.config">
      <IsTransformFile>true</IsTransformFile>
      <DependentUpon>App.config</DependentUpon>
    </None>
    <None Update="appsettings.Debug.json">
      <IsTransformFile>true</IsTransformFile>
      <DependentUpon>appsettings.json</DependentUpon>
    </None>
    <None Update="appsettings.json">
      <TransformOnBuild>true</TransformOnBuild>
    </None>
    <None Update="appsettings.Release.json">
      <IsTransformFile>true</IsTransformFile>
      <DependentUpon>appsettings.json</DependentUpon>
    </None>
  </ItemGroup>

</Project>

Can you provide more details on the issue? Repro steps would be best, if possible

@andreasstolpmann
Copy link
Author

It seems like something fixed the problem since i can't repro it anymore.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants