tag:help.appveyor.com,2012-11-13:/discussions/questions/3501-badimageformatexception-while-building-an-uwp-unit-test-projectAppVeyor: Discussion 2018-08-25T02:15:47Ztag:help.appveyor.com,2012-11-13:Comment/421869382017-03-19T19:33:43Z2017-03-19T19:33:43ZBadImageFormatException while building an UWP unit test project<div><p>Install/uninstall VS 2017?</p></div>Feodor Fitsnertag:help.appveyor.com,2012-11-13:Comment/421869382017-03-20T11:36:14Z2017-03-20T11:36:14ZBadImageFormatException while building an UWP unit test project<div><p>Not sure. It seems the DLLs have been downloaded from Nuget but ended up in the appveyor's account cache. Any change you can clean that folder. I'm trying to debug it using remote desktop, but I can't get in.</p></div>dennis.doomentag:help.appveyor.com,2012-11-13:Comment/421869382017-03-20T15:20:50Z2017-03-20T15:20:50ZBadImageFormatException while building an UWP unit test project<div><p>Try cleaning up that folder during the build:</p>
<pre>
<code>install:
- rd /s /q C:\Users\appveyor\.nuget\packages\</code>
</pre>
<p>Let me know if that worked.</p></div>Feodor Fitsnertag:help.appveyor.com,2012-11-13:Comment/421869382017-03-20T21:01:02Z2017-03-20T21:01:02ZBadImageFormatException while building an UWP unit test project<div><p>Didn’t make a difference. To try a more isolated situation, I’ve created a clean UWP test project with a Cake build script. Also doesn’t work because something is wrong with some CLR assemblies. See <a href="https://ci.appveyor.com/project/dennisdoomen/appveyortest">https://ci.appveyor.com/project/dennisdoomen/appveyortest</a></p>
<p>Sent from Mail<a href="https://go.microsoft.com/fwlink/?LinkId=550986">https://go.microsoft.com/fwlink/?LinkId=550986</a> for Windows 10</p></div>dennis.doomentag:help.appveyor.com,2012-11-13:Comment/421869382017-03-21T00:19:58Z2017-03-21T00:19:58ZBadImageFormatException while building an UWP unit test project<div><p>Have you tried creating UWP project without Cake to see if that works? Also, I'm not sure yet, but don't you think that UWP tests can only be run on Windows 10 (non-Server OS)?</p></div>Feodor Fitsnertag:help.appveyor.com,2012-11-13:Comment/421869382017-03-21T20:30:40Z2017-03-21T20:30:40ZBadImageFormatException while building an UWP unit test project<div><p>Dennis Doomen</p>
<p>[cid:<a href="mailto:image001.png@01D1FD2F.53503270">image001.png@01D1FD2F.53503270</a>] M</p>
<p>+31 (0)6-47033908</p>
<p>From: Feodor Fitsner [mailto:<a href="mailto:tender2+d7a1a6126b@tenderapp.com">tender2+d7a1a6126b@tenderapp.com</a>]<br>
Sent: Tuesday, March 21, 2017 1:20 AM<br>
To: Dennis Doomen <a href="mailto:Dennis.Doomen@avivasolutions.nl">Dennis.Doomen@avivasolutions.nl</a><br>
Subject: Re: BadImageFormatException while building an UWP unit test project [Questions #3501]</p>
<p>Yep, tried that, but it won’t even compile because nuget restore doesn’t work out of the box.</p>
<p>Are you running your build agents on Windows Server 2016? Because that’s supposed to work.</p></div>dennis.doomentag:help.appveyor.com,2012-11-13:Comment/421869382017-03-21T20:38:20Z2017-03-21T20:38:20ZBadImageFormatException while building an UWP unit test project<div><p><code>Visual Studio 2017</code> image runs on Windows Server 2016.</p></div>Feodor Fitsner