SlowCheetah Azure web角色未转换
我正在Visual Studio 2013解决方案中使用SlowCheetah 2.5.10.6,我想在其中创建一个用于部署的web角色包。我正在使用Azure Tools 2.3。 我的默认web.config转换工作正常。但是,SlowCheetah转换不起作用。无论如何,这应该是可行的: 在我的输出窗口中,我看到以下内容:SlowCheetah Azure web角色未转换,azure,msbuild,slowcheetah,Azure,Msbuild,Slowcheetah,我正在Visual Studio 2013解决方案中使用SlowCheetah 2.5.10.6,我想在其中创建一个用于部署的web角色包。我正在使用Azure Tools 2.3。 我的默认web.config转换工作正常。但是,SlowCheetah转换不起作用。无论如何,这应该是可行的: 在我的输出窗口中,我看到以下内容: 1>Task "SlowCheetah.Xdt.TransformXml" 1> Transfroming source file:
1>Task "SlowCheetah.Xdt.TransformXml"
1> Transfroming source file: D:\web\Project\src\Project.Web\App_Config\OTAP\connectionStrings.config
1> Applying Transform File: App_Config\OTAP\connectionStrings.O.config
1> Output File: bin\App_Config\OTAP\connectionStrings.config
1>Done executing task "SlowCheetah.Xdt.TransformXml".
在我的bin文件夹中,我看到正确转换的文件
我在输出中还看到以下行:
3> Task "Message"
3> TransformedWebFiles = App_Config\OTAP\connectionStrings.config, DestinationRelativePath=App_Config\OTAP\connectionStrings.config, Exclude=False, FromTarget=CollectFilesFromContent, Category=Run, ProjectFileType=Default
但创建包时,将使用原始文件
3>Target "CopyWebRoleFiles" in file "C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v12.0\Windows Azure Tools\2.3\Microsoft.WindowsAzure.targets" from project "D:\web\Project\src\Project\Project.ccproj" (target "CopyRoleFiles" depends on it):
3> Task "Message"
3> CurrentRoleWebFiles=D:\web\Project\src\Project.Web\App_Config\OTAP\appSettings.config -> App_Config\OTAP\appSettings.config
3> Task "Message"
3> CurrentRoleWebFiles=D:\web\Project\src\Project.Web\App_Config\OTAP\connectionStrings.config -> App_Config\OTAP\connectionStrings.config
因此,包中使用了我的基本配置,我希望使用ConnectionString.*.config。
有人知道我做错了什么吗?我修复了以下MSBuild脚本的问题:
<Target Name="DeploySlowCheetahTransforms" AfterTargets="CopyWebRoleFiles" Condition="'@(WebRoleReferences)' != ''">
<PropertyGroup>
<IntermediateWebOutputPath>%(WebRoleReferences.OutputDir)</IntermediateWebOutputPath>
</PropertyGroup>
<ItemGroup>
<TransformedFiles Include="$(WebTargetDir)\**\*.config" Exclude="$(WebTargetDir)\**\*.dll.config;$(WebTargetDir)\**\web*.config" />
</ItemGroup>
<Copy SourceFiles="@(TransformedFiles)" DestinationFiles="@(TransformedFiles->'$(IntermediateWebOutputPath)\%(RecursiveDir)%(Filename)%(Extension)')" />
</Target>
%(WebRoleReferences.OutputDir)
此脚本需要添加到ccproj文件中。
WebRoleReferences
和WebTargetDir
变量是在Microsoft.WindowsAzure.targets中创建的。此脚本从csproj文件的OutputPath获取所有转换的配置文件,并将其复制到OutputDir,该文件用于创建Azure WebRole包。我修复了以下MSBuild脚本的问题:
<Target Name="DeploySlowCheetahTransforms" AfterTargets="CopyWebRoleFiles" Condition="'@(WebRoleReferences)' != ''">
<PropertyGroup>
<IntermediateWebOutputPath>%(WebRoleReferences.OutputDir)</IntermediateWebOutputPath>
</PropertyGroup>
<ItemGroup>
<TransformedFiles Include="$(WebTargetDir)\**\*.config" Exclude="$(WebTargetDir)\**\*.dll.config;$(WebTargetDir)\**\web*.config" />
</ItemGroup>
<Copy SourceFiles="@(TransformedFiles)" DestinationFiles="@(TransformedFiles->'$(IntermediateWebOutputPath)\%(RecursiveDir)%(Filename)%(Extension)')" />
</Target>
%(WebRoleReferences.OutputDir)
此脚本需要添加到ccproj文件中。
WebRoleReferences
和WebTargetDir
变量是在Microsoft.WindowsAzure.targets中创建的。此脚本从csproj文件的OutputPath获取所有转换的配置文件,并将其复制到OutputDir,该文件用于创建Azure WebRole包。我修复了以下MSBuild脚本的问题:
<Target Name="DeploySlowCheetahTransforms" AfterTargets="CopyWebRoleFiles" Condition="'@(WebRoleReferences)' != ''">
<PropertyGroup>
<IntermediateWebOutputPath>%(WebRoleReferences.OutputDir)</IntermediateWebOutputPath>
</PropertyGroup>
<ItemGroup>
<TransformedFiles Include="$(WebTargetDir)\**\*.config" Exclude="$(WebTargetDir)\**\*.dll.config;$(WebTargetDir)\**\web*.config" />
</ItemGroup>
<Copy SourceFiles="@(TransformedFiles)" DestinationFiles="@(TransformedFiles->'$(IntermediateWebOutputPath)\%(RecursiveDir)%(Filename)%(Extension)')" />
</Target>
%(WebRoleReferences.OutputDir)
此脚本需要添加到ccproj文件中。
WebRoleReferences
和WebTargetDir
变量是在Microsoft.WindowsAzure.targets中创建的。此脚本从csproj文件的OutputPath获取所有转换的配置文件,并将其复制到OutputDir,该文件用于创建Azure WebRole包。我修复了以下MSBuild脚本的问题:
<Target Name="DeploySlowCheetahTransforms" AfterTargets="CopyWebRoleFiles" Condition="'@(WebRoleReferences)' != ''">
<PropertyGroup>
<IntermediateWebOutputPath>%(WebRoleReferences.OutputDir)</IntermediateWebOutputPath>
</PropertyGroup>
<ItemGroup>
<TransformedFiles Include="$(WebTargetDir)\**\*.config" Exclude="$(WebTargetDir)\**\*.dll.config;$(WebTargetDir)\**\web*.config" />
</ItemGroup>
<Copy SourceFiles="@(TransformedFiles)" DestinationFiles="@(TransformedFiles->'$(IntermediateWebOutputPath)\%(RecursiveDir)%(Filename)%(Extension)')" />
</Target>
%(WebRoleReferences.OutputDir)
此脚本需要添加到ccproj文件中。
WebRoleReferences
和WebTargetDir
变量是在Microsoft.WindowsAzure.targets中创建的。此脚本从csproj文件的OutputPath获取所有转换的配置文件,并将它们复制到OutputDir,该文件用于创建Azure WebRole包。请提供您正在使用的产品的一些版本号。我已添加了一些版本号的问题。您应该提供一些版本号您正在使用的产品的编号。我已使用一些版本号添加了问题。您应该提交请提供您正在使用的产品的一些版本号。我已使用一些版本号添加了问题。您应该提交请提供您正在使用的产品的一些版本号。我已添加了问题有一些版本号。你应该归档