tag:help.appveyor.com,2012-11-13:/discussions/problems/14822-project-no-longer-compiling-after-package-updateAppVeyor: Discussion 2018-09-08T21:00:30Ztag:help.appveyor.com,2012-11-13:Comment/455624312018-06-26T05:16:26Z2018-06-26T05:16:26ZProject no longer compiling after package update<div><p>Does it builds locally OK with <code>msbuild</code> command line?</p>
<p>Also can you check <a href="https://github.com/ctaggart/SourceLink/issues/323">this issue</a>. I am not familiar with SourceLink, but I hope that fix can be the same.</p></div>Ilya Finkelshteyntag:help.appveyor.com,2012-11-13:Comment/455624312018-06-27T01:31:53Z2018-06-27T02:53:05ZProject no longer compiling after package update<div><p>I can build it in visual studio and on the command line.</p>
<p>Interestingly, I had the message "Your project is not referencing the ".NETFramework,Version=v4.7.1" framework. Add a reference to ".NETFramework,Version=v4.7.1" in the "frameworks" section of your project.json, and then re-run NuGet restore." until I deleted the contents of the "obj" folder, but it builds fine after clearing that.</p>
<p>I added the suggested:</p>
<pre>
<code><ItemGroup>
<DotNetCliToolReference Include="dotnet-sourcelink" Version="2.8.0" />
</ItemGroup></code>
</pre>
<p>in the two projects affected but it doesn't seem to have made any difference.</p></div>dylantag:help.appveyor.com,2012-11-13:Comment/455624312018-06-27T02:52:38Z2018-06-27T02:52:38ZProject no longer compiling after package update<div><p>Is there any way to create a repro in the public repository?</p>
<p>If not, we will ask you to add someone from our team as <a href="https://www.appveyor.com/docs/team-setup/#collaborator">collaborator</a> on AppVeyor. Also we will ask you to create separate project targeted to the same repository and configuration in UI (not YAML). Ensure that this project has produce the same errors.</p></div>Ilya Finkelshteyntag:help.appveyor.com,2012-11-13:Comment/455624312018-06-27T04:14:16Z2018-06-27T04:14:16ZProject no longer compiling after package update<div><p>We can't make this a public repo, I'll try creating a new project now and let you know how that goes.</p></div>dylantag:help.appveyor.com,2012-11-13:Comment/455624312018-06-27T04:20:21Z2018-06-27T04:20:21ZProject no longer compiling after package update<div><p>Checked and found we don't use a .yml file - just a cmd build script:</p>
<pre>
<code>nuget restore .\app\MathsPathway\MathsPathway.sln
nuget restore .\EnvironmentManager2.sln
msbuild .\EnvironmentManager2.sln /logger:"C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll"
msbuild EnvironmentManager2\EnvironmentManager2.csproj /T:Package /P:PackageLocation="%APPVEYOR_BUILD_FOLDER%\EnvironmentManager2.zip" /logger:"C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll"
appveyor PushArtifact EnvironmentManager2.zip -Type WebDeployPackage -DeploymentName EnvironmentManager2
7z a EnvironmentManagerWorker.zip %APPVEYOR_BUILD_FOLDER%\EnvironmentManagerWorker\bin\Debug\*
appveyor PushArtifact EnvironmentManagerWorker.zip</code>
</pre></div>dylantag:help.appveyor.com,2012-11-13:Comment/455624312018-06-27T06:20:39Z2018-06-27T06:20:39ZProject no longer compiling after package update<div><p>With a little more research, I've found this:</p>
<p><a href="https://github.com/ctaggart/SourceLink/issues/153">https://github.com/ctaggart/SourceLink/issues/153</a> - this has an associated commit adding the exact error I'm getting!</p>
<p><a href="https://github.com/ctaggart/SourceLink/commit/b1c5b6abedd67b4609f8577c36c142cb1286bec9">https://github.com/ctaggart/SourceLink/commit/b1c5b6abedd67b4609f85...</a> - CreateTask.cs line 45</p>
<p>I also found this job with the same error:</p>
<p><a href="https://github.com/ctaggart/SourceLink/issues/197">https://github.com/ctaggart/SourceLink/issues/197</a></p>
<p>The resolution points back to an update with appveyor in May last year, not much in the way of details though.</p>
<p>I also found some other packages, Microsoft.CodeDom.Providers.DotNetCompilerPlatform and Microsoft.Net.Compilers were superfluous and removed them. I have fewer errors but overall it didn't help.</p></div>dylantag:help.appveyor.com,2012-11-13:Comment/455624312018-06-27T06:52:50Z2018-06-27T06:52:50ZProject no longer compiling after package update<div><p>One last link, this appears to be the same issue:</p>
<p><a href="https://github.com/ctaggart/SourceLink/issues/321">https://github.com/ctaggart/SourceLink/issues/321</a></p>
<p>I've tried updating the version in the DotNetCliToolReference entry but it still doesn't work.</p>
<p>I'll have to pick this up tomorrow, I will have to produce a version with a few auth things removed before I can give anyone access. any other troubleshooting suggestions welcome.</p></div>dylantag:help.appveyor.com,2012-11-13:Comment/455624312018-06-27T16:24:30Z2018-06-27T16:24:30ZProject no longer compiling after package update<div><p>This seems to be the kind of issue which is difficult to investigate without putting hands on it.</p>
<p>Just to clarify: we do not ask you to make someone from our team to be a collaborator on GitHub, just on AppVeyor. Because of that we need all build configuration of test project to be set in UI.</p>
<p>While you are investigating yourself, please note (is you do not know this already) that you can <a href="https://www.appveyor.com/docs/how-to/rdp-to-build-worker/">RDP</a> to the build worker and repro/debug in the command line. However custom environment variables from the build session are not available in the RDP session so you might need to re-set them manually.</p></div>Ilya Finkelshteyntag:help.appveyor.com,2012-11-13:Comment/455624312018-06-27T21:09:51Z2018-06-27T21:09:53ZProject no longer compiling after package update<div><p>Hi,</p>
<p>i have the same issue since the last Octokit update via nuget...</p>
<p>SourceLink.Create.GitHub.2.8.3 is now a dependency of Octokit.</p>
<p>My repo is public, you can find it here and try to reproduce the error: <a href="https://github.com/BornToBeRoot/NETworkManager">https://github.com/BornToBeRoot/NETworkManager</a></p>
<p><a href="https://ci.appveyor.com/project/BornToBeRoot/NETworkManager/branch/master">https://ci.appveyor.com/project/BornToBeRoot/NETworkManager/branch/...</a><br>
Error is in line 124</p>
<p>Greetings<br>
BornToBeRoot</p></div>BornToBeRoottag:help.appveyor.com,2012-11-13:Comment/455624312018-06-28T00:14:06Z2018-06-28T00:14:06ZProject no longer compiling after package update<div><p>Thanks BornToBeRoot!!</p>
<p>Ilya, is this enough to troubleshoot the issue?</p>
<p>We could also reopen the ticket on Sourcelink's site, it isn't happening outside of appveyor though so I don't know how helpful it would be.</p></div>dylantag:help.appveyor.com,2012-11-13:Comment/455624312018-06-28T05:22:23Z2018-06-28T05:22:23ZProject no longer compiling after package update<div><p>Ok I've been working on this for a couple of hours, I seem to have gotten past the original error by passing "/P:SourceLinkCreate=false" into MSBuild, but then I have a bunch of missing packages.</p>
<p>I readded Microsoft.CodeDom.Providers.DotNetCompilerPlatform and Microsoft.Net.Compilers references, and now I just have errors saying I'm missing those.</p>
<p>I've tried downgrading each of them individually to previous major version (versions I can see being added earlier in the process to a submodule) but it still complains they are missing when building the project.</p>
<p>It's worth noting this continues to compile fine on my machine.</p>
<p>I'd be willing to add someone as a collaborator now.</p></div>dylantag:help.appveyor.com,2012-11-13:Comment/455624312018-06-28T18:12:10Z2018-06-28T19:01:01ZProject no longer compiling after package update<div><p>I've forked BornToBeRoot's project and am trying to troubleshoot there. I'm not sure yet whether it is exactly analagous to your problem.</p>
<p>In case its not it is still worth making me (owenmcdonnell at appveyor.com) a collaborator on your project.</p></div>Owen McDonnelltag:help.appveyor.com,2012-11-13:Comment/455624312018-06-29T00:54:51Z2018-06-29T00:54:51ZProject no longer compiling after package update<div><p>You've been added - the project is environment_manager. Thanks.</p></div>dylantag:help.appveyor.com,2012-11-13:Comment/455624312018-06-29T04:38:57Z2018-06-29T04:38:57ZProject no longer compiling after package update<div><p>Thanks, but in order to see the project settings (as Ilya mentioned above, all settings should be in UI, not in yml file) can you grant me permission to update project settings as shown in the screenshot.</p>
<p>But it may not be necessary...<br>
It looks pretty likely to me that this is a bug from octokit 0.30, and one that has been recognized as such in a <a href="https://github.com/octokit/octokit.net/commit/fb928f68d51b4b17633d4f5dea766f61356e8aee#diff-a4f0cab5b684c08fffe8a3ccc54ce71aR40">fairly recent commit</a>.<br>
All of your build errors happen after octokit was updated from v0.29 and your project was forced to take that dependency.</p>
<p>So maybe you can roll back to v0.29 until a new release of octokit includes that commit?</p>
<p>Of course, if that works you can disregard the permissions and remove me as collaborator.</p></div>Owen McDonnelltag:help.appveyor.com,2012-11-13:Comment/455624312018-07-03T04:30:28Z2018-07-03T04:30:28ZProject no longer compiling after package update<div><p>Hi Owen, the error is different (updating to prevent use of sourcelink fixed the original problem) but I'm still unable to compile. It's still complaining it can't find packages Microsoft.CodeDom.Providers.DotNetCompilerPlatform and Microsoft.Net.Compilers - I'm not sure why these aren't showing up in the appveyor environment?</p>
<p>I've updated your access, any help would be appreciated!</p></div>dylantag:help.appveyor.com,2012-11-13:Comment/455624312018-07-03T05:16:32Z2018-07-03T05:16:32ZProject no longer compiling after package update<div><p>It looks like in previous builds the package <a href="https://ci.appveyor.com/project/dylandhall/environment-manager/build/1.0.699?fullLog=true#L1034">was being installed</a> both in the <code>nuget restore .\app\MathsPathway\MathsPathway.sln</code> command and also in the <code>nuget restore .\EnvironmentManager2.sln</code> so it was being placed in two different package folders.</p>
<p>When it is <a href="https://ci.appveyor.com/project/dylandhall/environment-manager/build/1.0.722#L142">installed now in the failing builds</a> the <code>EnvironmnetManager2.csproj</code> is referencing it in <em>its own</em> packages folder.</p>
<p>Without being able to see commits, I'm guessing the breaking change was in that project file.</p></div>Owen McDonnelltag:help.appveyor.com,2012-11-13:Comment/455624312018-07-04T01:26:52Z2018-07-04T01:26:52ZProject no longer compiling after package update<div><p>going back to where it all broke, neither the Microsoft.Net.Compilers or the Microsoft.CodeDom.Providers.DotNetCompilerPlatform packages were updated or changed at that time.</p>
<p>I've rolled back the version of octokit and removed sourcelink and it hasn't helped the issue. the only differences in the environmentmanager2.csproj file I can see are minor versions on other packages - not the ones in the message. Same goes for the packages.config.</p>
<p>Microsoft.CodeDom.Providers.DotNetCompilerPlatform was updated in the previous push but that built fine. I've already tried rolling it back and it didn't help.</p>
<p>I'm not 100% sure what you mean by, "EnvironmnetManager2.csproj is referencing it in its own packages folder." as far as I can see it's referenced in the same way it has always been referenced?</p></div>dylantag:help.appveyor.com,2012-11-13:Comment/455624312018-07-04T03:42:32Z2018-07-04T03:42:32ZProject no longer compiling after package update<div><p>I made the discussion private since i'm sharing some screenshots from your build log.</p>
<p>I think the package reference error is unrelated to sourcelink issue, so i think we can put that aside.</p>
<p>Let me explain more explicitly what i mean...</p>
<p>When i go to your <a href="https://ci.appveyor.com/project/dylandhall/environment-manager/build/1.0.700?fullLog=true">last successful build</a> and search "Microsoft.codedom" i get many references. The package is not only installed by the <code>nuget restore .\app\MathsPathway\MathsPathway.sln</code> but <em>also</em> by the <code>nuget restore .\EnvironmentManager2.sln</code> command.You can see this in the first screenshot.</p>
<p>When i go to any recent failing build and search "Microsoft.codedom" i get only references to it under the <code>nuget restore .\app\MathsPathway\MathsPathway.sln</code> command. You can see this in the second screenshot.</p></div>Owen McDonnelltag:help.appveyor.com,2012-11-13:Comment/455624312018-07-05T00:27:45Z2018-07-05T00:29:37ZProject no longer compiling after package update<div><p>Ok I've finally fixed it.</p>
<p>The key was removing the nuget restore for the environment manager solution and adding a separate one for each project's packages.config file.</p>
<p>I'm not sure if this is a nuget bug or expected behaviour and I'm not sure why this changed (as I said, the problem packaged hadn't been updated) but that was the solution.</p>
<p>I'd encourage you to make this discussion public again, I didn't find the solution on google so this might help someone else. The screenshots don't contain anything I'd consider secret.</p>
<p>updated restore statements look like:<br></p>
<pre>
<code>nuget restore .\ProjectFolder\packages.config -SolutionDirectory .\
nuget restore .\ProjectFolder2\packages.config -SolutionDirectory .</code>
</code>
</pre></div>dylantag:help.appveyor.com,2012-11-13:Comment/455624312018-07-05T00:58:12Z2018-07-05T00:58:12ZProject no longer compiling after package update<div><p>I made it public again.</p>
<p>So if you go to the <code>EnvironmentManager2.csproj</code> file in your repository and check the history you don't find any commits of relevance to this case? Like, for example, the removal of a <code>PackageReference</code> element?</p></div>Owen McDonnelltag:help.appveyor.com,2012-11-13:Comment/455624312018-07-05T01:11:29Z2018-07-05T01:11:29ZProject no longer compiling after package update<div><p>No, I can see the commit that the problem originated in and the package reference element for that project didn't change at all. The only thing that was included were minor version updates to other packages.</p>
<p>My working theory is that package is only referenced in one project and the solution restore stopped reading all the package.config files - it seemed to restore all the common packages but not the ones that were unique to the second project.</p>
<p>I have no real lead on what would cause this. There were no updates to the .sln file at the same time.</p></div>dylantag:help.appveyor.com,2012-11-13:Comment/455624312018-07-05T01:19:47Z2018-07-05T01:20:15ZProject no longer compiling after package update<div><p>Ok this is interesting - it's listed in packages.config, and this is at the top of the csproj file:</p>
<pre>
<code><Import Project="..\packages\Microsoft.Net.Compilers.2.8.2\build\Microsoft.Net.Compilers.props" Condition="Exists('..\packages\Microsoft.Net.Compilers.2.8.2\build\Microsoft.Net.Compilers.props')" /></code>
</pre>
<p>but I don't have a <code><Reference /></code> entry in the csproj file.</p>
<p>This didn't change but maybe it needs a reference entry? I've removed and re-added the package however, nuget manager never creates this.</p></div>dylantag:help.appveyor.com,2012-11-13:Comment/455624312018-07-05T15:53:13Z2018-07-05T15:53:13ZProject no longer compiling after package update<div><p>Is this a netcore project or .net framework?</p></div>Owen McDonnelltag:help.appveyor.com,2012-11-13:Comment/455624312018-07-05T23:55:40Z2018-07-05T23:55:40ZProject no longer compiling after package update<div><p>.net framework</p></div>dylantag:help.appveyor.com,2012-11-13:Comment/455624312018-07-06T02:42:49Z2018-07-06T02:42:49ZProject no longer compiling after package update<div><p>From <a href="https://docs.microsoft.com/en-us/nuget/consume-packages/package-references-in-project-files">this documentation</a>...</p>
<blockquote>
<p>.NET full framework projects support PackageReference, but currently default to packages.config. To use PackageReference, migrate the dependencies from packages.config into your project file, then remove packages.config</p>
</blockquote>
<p>But that doesn't explain how your project got broken in the first place.<br>
Perhaps a change in nuget? The last update on our platform was <a href="https://www.appveyor.com/updates/2018/05/17/">in may</a></p></div>Owen McDonnelltag:help.appveyor.com,2012-11-13:Comment/455624312018-07-09T03:44:41Z2018-07-09T03:44:41ZProject no longer compiling after package update<div><p>That's interesting, I hadn't tried using PackageReference so I don't know much about it.</p>
<p>It broke with minor updates to a few packages. I'm really not sure what changed but it's working currently. I'll look into PackageReference and see if it's likely to simplify things but for the moment I'll leave what I have.</p>
<p>Thanks for the assistance.</p></div>dylantag:help.appveyor.com,2012-11-13:Comment/455624312018-07-09T04:31:09Z2018-07-09T04:31:09ZProject no longer compiling after package update<div><p>No problem.<br>
Don't forget to remove me from your team.</p></div>Owen McDonnell