Possible issue with Web.Config
See original GitHub issueDescribe the bug
In the API template, both the web and test project target <Project Sdk="Microsoft.NET.Sdk.Web">
this makes them both web projects in the eyes of dotnet. When I publish, I get a Web.Config like this:
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<location path="." inheritInChildApplications="false">
<system.webServer>
<handlers>
<add name="aspNetCore" path="*" verb="*" modules="AspNetCoreModuleV2" resourceType="Unspecified" />
</handlers>
<aspNetCore processPath="dotnet" arguments=".\MyApp.IntegrationTest.dll" stdoutLogEnabled="false" stdoutLogFile=".\logs\stdout" hostingModel="inprocess" />
</system.webServer>
</location>
</configuration>
<!--ProjectGuid: 57839160-3C89-4A5A-BC23-A78F39551C1E-->
Emphasis on: arguments=".\MyApp.IntegrationTest.dll"
To Reproduce
Create a template with integration tests, publish, check Web.Config, it might produce one like the above. It did for my anyway.
Project template
API
Possible Solutions
- Be more explicit about which project to publish in CAKE.
<IsPackable>false</IsPackable>
and<IsPublishable>false</IsPublishable>
Issue Analytics
- State:
- Created 3 years ago
- Comments:7 (1 by maintainers)
Top Results From Across the Web
iis - Web Application Problems (web.config errors) HTTP ...
This error is related to web.config file. When web.config is not proper or using some features which is not available in IIS, then...
Read more >How can you verify if you have any issues with your web ...
2 answers · Look for the line number of the error in the web.config validator report or the text editor with syntax highlighting....
Read more >HTTP Error 500.19 on Internet Information Services (IIS) ...
This problem occurs because the ApplicationHost.config or Web.config file contains a malformed or unidentified XML element.
Read more >web.config error in IIS, so could not open Handlers Maping
But it shows error in web.config file. I done all the possible ways to resolve the issue. But couldn't any solution.
Read more >How to Use Web.Config customErrors in ASP.Net
Read ways to track, find, and view app errors in the Web.Config customErrors section in ASP.NET framework. Use Retrace to log all ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
<Project Sdk="Microsoft.NET.Sdk.Web">
to the integration tests is required as indicated in the docs.<IsPackable>false</IsPackable>
for you https://github.com/xunit/xunit/issues/1520.As far as publishing goes if you are running the
Publish
task in the cake script, I see your point. It’s currently publishing all projects in the solution. There are two ways to solve this problem:/Source
subdirectory.<IsPublishable>false</IsPublishable>
to the integration test.I’m leaning towards the first one. Does that solve your issue or have I missed something?
It did fix the issue. Thanks! (Sorry for the late answer)