tag:help.appveyor.com,2012-11-13:/discussions/problems/298-assemblyinfo-patching-not-working-for-one-project-in-a-solutionAppVeyor: Discussion 2018-10-19T08:16:32Ztag:help.appveyor.com,2012-11-13:Comment/329190132014-05-10T13:25:25Z2014-05-10T13:25:34ZAssemblyInfo patching not working for one project in a solution<div><p>I'm using the AssemblyPatching feature for a set of NuGet
packages on <a href=
"https://ci.appveyor.com/project/james-dibble/jamesdibbleassemblies">
this project</a> but one of the projects
(JamesDibble.Extensions.System) does not have its version
information updated. I have tried recreating the project several
times and diffed it with the projects that are working but it
hasn't made a difference. Is there anything specific that would
prevent this from happening? It wouldn't be a massive problem but
it is preventing automatic deployment to NuGet as the package
versions are the same.</p></div>jamestag:help.appveyor.com,2012-11-13:Comment/329190132014-05-10T19:10:41Z2014-05-10T19:10:41ZAssemblyInfo patching not working for one project in a solution<div><p>Is there a standard AssemblyInfo.cs? Could you paste it's
contents please?</p>
<ul>
<li>Feodor</li>
</ul></div>Feodor Fitsnertag:help.appveyor.com,2012-11-13:Comment/329190132014-05-10T19:22:58Z2014-05-10T19:22:58ZAssemblyInfo patching not working for one project in a solution<div><p>It should be. It came from the standard C# library project.
<a href=
"https://github.com/james-dibble/JamesDibbleAssemblies/blob/master/Extensions/JamesDibble.Extensions.System/Properties/AssemblyInfo.cs">
Here's the file</a></p></div>jamestag:help.appveyor.com,2012-11-13:Comment/329190132014-05-10T19:23:55Z2014-05-10T19:23:55ZAssemblyInfo patching not working for one project in a solution<div><p>Thanks, I will take a look what's wrong.</p></div>Feodor Fitsnertag:help.appveyor.com,2012-11-13:Comment/329190132014-05-14T18:50:03Z2014-05-14T18:50:03ZAssemblyInfo patching not working for one project in a solution<div><p>Hi James,</p>
<p>I'm trying to reproduce the issue and that Assemblyinfo.cs is
getting patched:<br>
<a href=
"https://ci.appveyor.com/project/appvyr/jamesdibbleassemblies/build/2.3.3">
https://ci.appveyor.com/project/appvyr/jamesdibbleassemblies/build/...</a></p></div>Feodor Fitsnertag:help.appveyor.com,2012-11-13:Comment/329190132014-05-14T18:50:49Z2014-05-14T18:50:49ZAssemblyInfo patching not working for one project in a solution<div><p>Hey, and thanks for writing about AppVeyor in your blog! ;)</p></div>Feodor Fitsnertag:help.appveyor.com,2012-11-13:Comment/329190132014-05-14T19:28:08Z2014-05-14T19:28:08ZAssemblyInfo patching not working for one project in a solution<div><p>Ok, this a bit odd then. If you take the (Nuget
package)[<a href="https://ci.appveyor.com/api/buildjobs/kpqvrksrfmcaglwk/artifacts/JamesDibble.Extensions.System.1.0.0.0.nupkg">https://ci.appveyor.com/api/buildjobs/kpqvrksrfmcaglwk/artifacts/Ja...</a>]
from the latest build, extract it and check the AssmbleyFileInfo
version it says 1.0.0.0 in it still, which is why the Nuget package
gets version accordingly. I had an AppVeyor project on the same
repository with identical settings that worked as expected ONCE,
then reverted back to putting 1.0.0.0 even though no changes had
been made to either the .csproj, AssemblyInfo.cs, .nuspec before it
worked, on the build it worked, or the subsequent build it stopped
working again.</p>
<p>Is this a side affect in another part of the build somehow and
like your demonstration project shows, the AssemblyInfo is being
patched but not being adhered to when it hits MsBuild?</p>
<p>What was the script you ran in your demonstration and could I
run it on my project to check we're getting the same results?</p>
<p>And no problem, thanks for reading :)</p></div>jamestag:help.appveyor.com,2012-11-13:Comment/329190132014-05-14T19:30:23Z2014-05-14T19:30:23ZAssemblyInfo patching not working for one project in a solution<div><p>Well, I enabled assembly patching through UI, no appveyor.yml
there. Will do that with appveyor.yml and let you know about the
results.</p></div>Feodor Fitsnertag:help.appveyor.com,2012-11-13:Comment/329190132014-05-14T19:37:29Z2014-05-14T19:37:29ZAssemblyInfo patching not working for one project in a solution<div><p>OK, this is the results: <a href=
"https://ci.appveyor.com/project/appvyr/jamesdibbleassemblies">https://ci.appveyor.com/project/appvyr/jamesdibbleassemblies</a><br>
appveyor.yml: <a href=
"https://github.com/FeodorFitsner/JamesDibbleAssemblies/blob/master/appveyor.yml">
https://github.com/FeodorFitsner/JamesDibbleAssemblies/blob/master/...</a></p>
<p>Maybe the problem is in NuGet packaging?</p></div>Feodor Fitsnertag:help.appveyor.com,2012-11-13:Comment/329190132014-05-14T19:52:06Z2014-05-14T19:52:06ZAssemblyInfo patching not working for one project in a solution<div><p>I get same the same (result)[<a href=
"https://ci.appveyor.com/project/james-dibble/jamesdibbleassemblies/build/1.1.0.48">https://ci.appveyor.com/project/james-dibble/jamesdibbleassemblies/...</a>]
which is ALWAYS good.</p>
<p>It must be the NuGet packaging as you say. Any suggestions
looking at the (.nusepc file)[<a href=
"https://github.com/james-dibble/JamesDibbleAssemblies/blob/master/Extensions/JamesDibble.Extensions.System/JamesDibble.Extensions.System.nuspec">https://github.com/james-dibble/JamesDibbleAssemblies/blob/master/E...</a>]?
It's about as basic as they get and all the other packages in the
solution using a very similar format work fine.</p></div>jamestag:help.appveyor.com,2012-11-13:Comment/329190132014-05-14T20:01:25Z2014-05-14T20:01:25ZAssemblyInfo patching not working for one project in a solution<div><p>I think the problem is that <code>$version$</code> variable is
getting expanded when you package VS project like <code>nuget
something.csproj</code> (this case nuget knows the assembly to
extract version from). If you do package <code>nuget
my.nuspec</code> then <code>$version$</code> variable should be
provided by you.</p></div>Feodor Fitsnertag:help.appveyor.com,2012-11-13:Comment/329190132014-05-14T20:43:35Z2014-05-14T20:43:35ZAssemblyInfo patching not working for one project in a solution<div><p>We were right about it being the NuGet packaging, but not for
any good reason!</p>
<p>Some of the other .csproj files were dependent on the
Extenstions.System dll so in one of my weirder moments I must have
decided to use NuGet to get the dependency rather that use the
local project. Coincidentally, this made the solution download a
REALLY old version of the dll from NuGet and put it in the output
directory which was then picked up when trying to build the new
NuGet package for the same dll, hence why the assemblyinfo patching
was working fine, but the artefacts being build had totally
different versions.</p>
<p>Everything working great now. User error!</p>
<p>Thanks for all your help.</p></div>james