Note that there are some explanatory texts on larger screens.

plurals
  1. POSlowCheetah working in VS but not from command line
    text
    copied!<p>I have an Azure cloud service, with a web role and a worker.</p> <p>I have a problem with the worker role when I create the Package from the command line. My worker is a simple class Library with a App.Config and transformation are made with SlowCheetah 2.5.5.</p> <p>If I right click on my Azure Cloud Service and Package it everything is fine, the app.config in the end will be the one transformed by SlowCheetah as you can see below</p> <pre><code>22&gt;Target "CopyWorkerRoleFiles" in file "C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v11.0\Windows Azure Tools\2.0\Microsoft.WindowsAzure.targets" from project "C:\dev\My\WindowsAzure\WindowsAzure.ccproj" (target "CopyRoleFiles" depends on it): 22&gt; WorkerFiles=C:\dev\My\MyWorker\bin\QA\MyWorker.dll.config -&gt; MyWorker.dll.config 22&gt; WorkerFiles=C:\dev\My\MyWorker\obj\QA\MyWorker.dll -&gt; MyWorker.dll 22&gt; WorkerFiles=C:\dev\My\MyWorker\obj\QA\MyWorker.pdb -&gt; MyWorker.pdb 22&gt; WorkerFiles=C:\dev\My\MyWorker\obj\QA\SlowCheetah\App.config -&gt; MyWorker.dll.config </code></pre> <p>From command line, now, when I create the package, SlowCheetah is not used anymore and I don't have the transformation</p> <pre><code>CopyWorkerRoleFiles: WorkerFiles=C:\CI\My\MyWorker\bin\QA\MyWorker.dll.config -&gt; MyWorker.dll.config WorkerFiles=C:\CI\My\MyWorker\bin\QA\App.config -&gt; App.config WorkerFiles=C:\CI\My\MyWorker\obj\QA\MyWorker.dll -&gt; MyWorker.dll WorkerFiles=C:\CI\My\MyWorker\obj\QA\MyWorker.pdb -&gt; MyWorker.pdb </code></pre> <p>How can I find what I am missing to have the same behavior between VS and the command line?</p> <p><strong>EDIT:</strong></p> <p>I have created a small cloud project with one worker role and slowcheetah, and everything is working fine on this new project... The problem is coming from my project, I have doubled check the csproj and ccproj from my solution with the ones from the test solution and I don't see any big difference...</p> <p><strong>EDIT 2:</strong></p> <p>Here is my msbuild command to compile my project</p> <pre><code>C:\Windows\Microsoft.NET\Framework\v4.0.30319\MSBuild.exe .\MyProject.sln /p:Configuration=QA /p:TargetProfile=CloudQA /target:Publish /nr:false </code></pre> <p><strong>EDIT 3:</strong> I finally narrowed the problem to this, I have updated Microsoft.Bcl to 1.1.3, I compiled it, the transformation works fine!</p> <p>I have updated Microsoft.Net.Http to 2.2.13, I compiled it, the transformation failed.</p> <p>The nuget packages added this to my csproj...</p> <pre><code> &lt;Reference Include="System.Net.Http" /&gt; + &lt;Reference Include="System.Net.Http.Extensions"&gt; + &lt;HintPath&gt;..\packages\Microsoft.Net.Http.2.2.13\lib\net45\System.Net.Http.Extensions.dll&lt;/HintPath&gt; + &lt;/Reference&gt; &lt;Reference Include="System.Net.Http.Formatting, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL"&gt; &lt;HintPath&gt;..\packages\Microsoft.AspNet.WebApi.Client.4.0.30506.0\lib\net40\System.Net.Http.Formatting.dll&lt;/HintPath&gt; &lt;/Reference&gt; + &lt;Reference Include="System.Net.Http.Primitives"&gt; + &lt;HintPath&gt;..\packages\Microsoft.Net.Http.2.2.13\lib\net45\System.Net.Http.Primitives.dll&lt;/HintPath&gt; + &lt;/Reference&gt; + &lt;Reference Include="System.Net.Http.WebRequest" /&gt; </code></pre> <p>If I remove all the references the transformation is working again...</p> <p>I added back this reference and the transformation was still working:</p> <pre><code> + &lt;Reference Include="System.Net.Http.WebRequest" /&gt; </code></pre> <p>I added this references one by one </p> <pre><code> + &lt;Reference Include="System.Net.Http.Extensions"&gt; + &lt;HintPath&gt;..\packages\Microsoft.Net.Http.2.2.13\lib\net45\System.Net.Http.Extensions.dll&lt;/HintPath&gt; + &lt;/Reference&gt; + &lt;Reference Include="System.Net.Http.Primitives"&gt; + &lt;HintPath&gt;..\packages\Microsoft.Net.Http.2.2.13\lib\net45\System.Net.Http.Primitives.dll&lt;/HintPath&gt; + &lt;/Reference&gt; </code></pre> <p>And the project transformation failed again.</p> <p><strong>EDIT 4:</strong></p> <p>More information on this problem, Micorosoft.Net.HttpClient Nuget Packages is also modifying the app.config when System.Net.Http.Extensions and System.Net.Http.Primitives. It adds the following to app.config</p> <pre><code>&lt;runtime&gt; &lt;assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"&gt; &lt;dependentAssembly&gt; &lt;assemblyIdentity name="System.Net.Http.Extensions" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" /&gt; &lt;bindingRedirect oldVersion="0.0.0.0-2.2.13.0" newVersion="2.2.13.0" /&gt; &lt;/dependentAssembly&gt; &lt;dependentAssembly&gt; &lt;assemblyIdentity name="System.Net.Http.Primitives" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" /&gt; &lt;bindingRedirect oldVersion="0.0.0.0-4.2.13.0" newVersion="4.2.13.0" /&gt; &lt;/dependentAssembly&gt; &lt;/assemblyBinding&gt; &lt;/runtime&gt; </code></pre> <p>Here is the build output with these assemblies referenced</p> <pre><code>17&gt;_CopyAppConfigFile: 17&gt; Copying file from "obj\Debug\Tests.MyProject.Data.csproj.App.config" to "bin\Debug\Tests.MyProject.Data.dll.config". 17&gt;CopyFilesToOutputDirectory: 17&gt; Copying file from "obj\Debug\Tests.MyProject.Data.dll" to "bin\Debug\Tests.MyProject.Data.dll". 17&gt; Tests.MyProject.Data -&gt; C:\dev\MyProject\Tests\Tests.MyProject.Data\bin\Debug\Tests.MyProject.Data.dll 17&gt; Copying file from "obj\Debug\Tests.MyProject.Data.pdb" to "bin\Debug\Tests.MyProject.Data.pdb". 17&gt;ScReplaceAppConfigItem: 17&gt; Updated app.config to point to transformed file 17&gt; AppConfigWithTargetPath: obj\Debug\Tests.MyProject.Data.csproj.App.config 17&gt; AppConfigWithTargetPath.TargetPath: Tests.MyProject.Data.dll.config </code></pre> <p>Removing the Microsoft references </p> <pre><code>17&gt;_CopyAppConfigFile: 17&gt; Copying file from "App.config" to "bin\Debug\Tests.MyProject.Data.dll.config". 17&gt;CopyFilesToOutputDirectory: 17&gt; Copying file from "obj\Debug\Tests.MyProject.Data.dll" to "bin\Debug\Tests.MyProject.Data.dll". 17&gt; Tests.MyProject.Data -&gt; C:\dev\MyProject\Tests\Tests.MyProject.Data\bin\Debug\Tests.MyProject.Data.dll 17&gt; Copying file from "obj\Debug\Tests.MyProject.Data.pdb" to "bin\Debug\Tests.MyProject.Data.pdb". 17&gt;ScReplaceAppConfigItem: 17&gt; Copying file from "bin\Debug\Tests.MyProject.Data.dll.config" to "obj\Debug\SlowCheetah\App.config". 17&gt; Updated app.config to point to transformed file 17&gt; AppConfigWithTargetPath: obj\Debug\SlowCheetah\App.config 17&gt; AppConfigWithTargetPath.TargetPath: Tests.MyProject.Data.dll.config </code></pre>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload