tag:help.appveyor.com,2012-11-13:/discussions/problems/28561-build-failing-projectassetsjson-doesnt-have-a-target-for-net48AppVeyor: Discussion 2020-11-16T07:18:13Ztag:help.appveyor.com,2012-11-13:Comment/488300132020-11-14T20:19:00Z2020-11-14T20:19:00ZBuild failing - project.assets.json doesn't have a target for 'net48'<div><p><code>Visual Studio 2019</code> image has been just updated: <a href="https://www.appveyor.com/updates/2020/11/14/">https://www.appveyor.com/updates/2020/11/14/</a></p>
<p>There is the latest VS 2019 16.8.1 with .NET 5 and this .NET 5 is the default .NET Core right now.</p>
<p>I don't know if Microsoft has rushed with .NET 5, but it's a part of VS 2019 16.8 now and the new reality.</p>
<p>Use <a href="https://docs.microsoft.com/en-us/dotnet/core/tools/global-json?tabs=netcore3x"><code>global.json</code></a> to pin .NET Core version to 3.1.x. I sent you <a href="https://github.com/dlebansais/UpdateCheck/pull/1">PR</a>.</p>
<p>Hope that helps others as well.</p></div>Feodor Fitsnertag:help.appveyor.com,2012-11-13:Comment/488300132020-11-14T22:03:42Z2020-11-14T22:03:44ZBuild failing - project.assets.json doesn't have a target for 'net48'<div><p>Thank you for helping me with this issue. The new file works, but after I upgraded to VS 2019 16.8.1 I have some issues building locally. I've decided to make it local to AppVeyor and it's working great.</p>
<p>Thanks again!</p></div>David Le Bansaistag:help.appveyor.com,2012-11-13:Comment/488300132020-11-16T02:55:54Z2020-11-16T02:55:55ZBuild failing - project.assets.json doesn't have a target for 'net48'<div><p>Hi. I'm adding to this because I seem to have encountered the same issue.</p>
<p>Adding a global.json file seems to get the build working again, but I'm having no trouble building on my machine using Visual Studio 16.8.1 and .NET SDK 5.0.100. It's only on AppVeyor that I'm having to prevent the use of the latest .NET SDK.</p>
<p>We aren't deploying on .NET 5 yet (as our target environments do not support it yet) but the new SDK should support builds for .NET Core 2.1 and 3.1, and .NET Framework 4.7 and 4.8, yet?</p>
<p>I would like us to not be stuck building on the older .NET SDK forever, and if that means we're seeing a real AppVeyor problem, it would be good to get to the bottom of it.</p></div>Travis Halltag:help.appveyor.com,2012-11-13:Comment/488300132020-11-16T03:03:31Z2020-11-16T03:03:31ZBuild failing - project.assets.json doesn't have a target for 'net48'<div><p>Hi Travis,</p>
<p>You are building locally from VS IDE, right?</p></div>Feodor Fitsnertag:help.appveyor.com,2012-11-13:Comment/488300132020-11-16T03:08:14Z2020-11-16T03:08:14ZBuild failing - project.assets.json doesn't have a target for 'net48'<div><p>OK, looks like this is the issue: <a href="https://developercommunity.visualstudio.com/content/problem/1248649/error-netsdk1005-assets-file-projectassetsjson-doe.html">https://developercommunity.visualstudio.com/content/problem/1248649...</a></p>
<p>Indeed, we are currently installing NuGet 5.4. I'm going to run some tests and fix the image if this is the case.</p></div>Feodor Fitsnertag:help.appveyor.com,2012-11-13:Comment/488300132020-11-16T05:08:52Z2020-11-16T05:08:52ZBuild failing - project.assets.json doesn't have a target for 'net48'<div><p>Yep, that was NuGet! Now, when the image is updated with NuGet 5.8.0 it should be fine even without <code>global.json</code>.</p></div>Feodor Fitsnertag:help.appveyor.com,2012-11-13:Comment/488300132020-11-16T07:18:09Z2020-11-16T07:18:13ZBuild failing - project.assets.json doesn't have a target for 'net48'<div><p>Can confirm. Our projects now build correctly. (Actually, we're probably a fairly good test, as our system has a mix of Framework, Core, and Standard projects.)</p>
<p>Thank you, Feodor.</p></div>Travis Hall