tag:help.appveyor.com,2012-11-13:/discussions/problems/16695-error-when-running-xunit-tests-on-net-core-appAppVeyor: Discussion 2018-10-19T08:18:56Ztag:help.appveyor.com,2012-11-13:Comment/460698922018-09-12T07:24:56Z2018-09-12T07:24:58ZError when running XUnit Tests on .net core app<div><p>Hi,</p>
<p>Im new to AppVeyor. I'm using the attached yml config file for a .net core app to do ci and cd.<br>
it builds fine but gives the following error when running the tests project:</p>
<p>No connection could be made because the target machine actively refused it</p>
<p>I also added a Powershell script to check if the site deployed and it looks like it didnt.<br>
IIS only has the following default site:</p>
<p>Name ID State Physical Path Bindings</p>
<hr>
<p>Default Web Site 1 Started %SystemDrive%\inetpub\wwwroot http <em>:80:<br>
net.tcp 808:</em><br>
net.msmq localhost<br>
msmq.formatname localhost<br>
net.pipe *</p>
<p>Is there something I am missing, maybe another step?</p></div>addictedsoulsmusictag:help.appveyor.com,2012-11-13:Comment/460698922018-09-12T22:58:10Z2018-09-12T22:59:22ZError when running XUnit Tests on .net core app<div><p>First of all, if you have <code>build:</code> section in appveyor.yml then <code>build_script:</code> section will be ignored. The presence of the <code>build:</code> section means that the project builds in "Auto" mode with commands supplied by AppVeyor. <code>build_script:</code> section is used when you want to use custom commands to build your project.<br>
But perhaps this is not really the root of the error you received.</p>
<p>Secondly, without knowing what is in your <code>CheckWebsiteStatus.ps1</code>, I'm guessing that you probably have not done sufficient configuration of IIS for it to serve your website in the way you intend. For example, you mention that you only see the default web site in IIS, but from what i can see you don't create one anywhere. I only see that you are copying content to the default site's folder.</p>
<p>Rather than the xcopy approach you are currently taking to deploy local website, you should switch to <a href="https://www.appveyor.com/docs/deployment/agent/">agent deployment</a> approach. This will require you to create a <a href="https://ci.appveyor.com/environments">deployment environment</a>.</p></div>Owen McDonnelltag:help.appveyor.com,2012-11-13:Comment/460698922018-09-13T08:59:00Z2018-09-13T08:59:00ZError when running XUnit Tests on .net core app<div><p>This has been resolved.. Thanks for the help! We had to add some variables to configure our appsettings.json on our yml file.</p></div>addictedsoulsmusic