Coder Social home page Coder Social logo

Comments (4)

jviau avatar jviau commented on June 18, 2024

From that callstack the file name looks weird: D:\myproject\wwwroot\enviroment.json;D:\myproject\wwwroot\enviroment.json Does your project file have that exact string in it?

from slow-cheetah.

martinoss avatar martinoss commented on June 18, 2024

The project file looks like this (just reproduced it in a new project):

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

  <PropertyGroup>
    <TargetFramework>net452</TargetFramework>
    <RuntimeIdentifier>win7-x86</RuntimeIdentifier>
  </PropertyGroup>

  <ItemGroup>
    <None Include="wwwroot\environment.Debug.json">
      <IsTransformFile>True</IsTransformFile>
    </None>
    <Content Include="wwwroot\environment.json" />
    <None Include="wwwroot\environment.Release.json">
      <IsTransformFile>True</IsTransformFile>
    </None>
  </ItemGroup>
  <ItemGroup>
    <PackageReference Include="Microsoft.ApplicationInsights.AspNetCore" Version="2.0.0" />
    <PackageReference Include="Microsoft.AspNetCore" Version="1.1.2" />
    <PackageReference Include="Microsoft.AspNetCore.Mvc" Version="1.1.3" />
    <PackageReference Include="Microsoft.Extensions.Logging.Debug" Version="1.1.2" />
    <PackageReference Include="Microsoft.VisualStudio.SlowCheetah" Version="3.0.61" />
  </ItemGroup>
  <ItemGroup>
    <DotNetCliToolReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Tools" Version="1.0.1" />
  </ItemGroup>
  <ItemGroup>
    <Content Update="wwwroot/environment.json">
      <TransformOnBuild>true</TransformOnBuild>
    </Content>
  </ItemGroup>

</Project>

Publish to folder reveals the same error.

from slow-cheetah.

jviau avatar jviau commented on June 18, 2024

.netcore projects already include all items via glob, so this may be due to msbuild items being duplicated. Can you try changing to:

<Content Update="wwwroot/environment.json">
  <TransformOnBuild>true</TransformOnBuild>
</Content>
<Content Update="wwwroot/environment.Debug.json">
  <IsTransformFile>True</IsTransformFile>
</Content>
<Content Update="wwwroot/environment.Release.json">
  <IsTransformFile>True</IsTransformFile>
</Content>

Remove the None Includes and the Content Include. Also, the contents of the wwwroot folder may be copied to the output directory by default, if that is the case and it runs after slow cheetah, that copy will overwrite the transform. If that happens you want to find those items in the solution explorer and set copy to output "never"

from slow-cheetah.

jviau avatar jviau commented on June 18, 2024

Closing for now. Re-open if my last reply did not solve your issue.

from slow-cheetah.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.