Comments (4)
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.
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.
.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.
Closing for now. Re-open if my last reply did not solve your issue.
from slow-cheetah.
Related Issues (20)
- Xml and config transformation does not work on UWP HOT 4
- This repo is missing important files
- Use INuGetProjectService instead of IVsPackageInstallerServices
- SlowCheetah no longer working in VS2019 HOT 1
- Transformation Damages Values with ">" in Them HOT 2
- Problem with readonly app.config files
- ClickOnce not coping data files after Transform
- The transformation is correctly applied and the resulting config file in the output looks as expected. But the configuration loaded in memory is as if taken from the original config file. project is .net framework 4.7.2 self-hosted winform app using appsettings.config file
- How to json arrays of objects or attributes therein HOT 4
- VS2022 Error while loading solution HOT 16
- Transform Not Working In Template Studio Created WinUI 3 Projet
- Old NuGet project page still accessible and getting downloads HOT 1
- TransformXml task could not be loaded from the assembly HOT 1
- SlowCheetah 'File not found' issue when publishing to the file system using msbuild HOT 1
- Per-user transformations HOT 1
- App.config Transform not working with VS2022 HOT 3
- Transform fails when project is targetting multiple frameworks HOT 2
- Publish WPF Core App with ClickOnce does not transform App.Config
- Q: How to publish transformed file to multiple directories HOT 2
- Q: How to coordinate internal targets with SC processes HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from slow-cheetah.