question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Areas/**/Views glob is not working in publishOptions/include in project.json

See original GitHub issue

Steps to reproduce

Project structure:

Project root
|_ Areas
    |_ Area1
    |  |_ Views
    |      |_ Index.cshtml
    |_ Area2
       |_ Views
           |_ Index.cshtml
|_ wwwroot
|
...

project.json snippet:

"publishOptions": {
        "include": [
            "wwwroot",
            "Views",
            "Areas/**/Views",
            "web.config"
        ]
    }

Publish to IIS with Visual Studio 2015 with ASP.net Core RC2 and Web Deploy 3.6 (with server rc2 components installed).

Expected behavior

Areas/Area1/Views/Index.cshtml and Areas/Area2/Views/Index.cshtml should be published.

Actual behavior

No “Areas” folder is published.

Environment data

dotnet --info output:

.NET Command Line Tools (1.0.0-preview1-002702)

Product Information:
 Version:     1.0.0-preview1-002702
 Commit Sha:  6cde21225e

Runtime Environment:
 OS Name:     Windows
 OS Version:  10.0.10586
 OS Platform: Windows
 RID:         win10-x64

I tested the glob pattern in python’s glob module and it produces the expected result: [ 'Areas\Area1\Views', 'Areas\Area2\Views' ] (with the working directory set to the xproj directory).

Am I missing something or is this a bug ?

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:13 (4 by maintainers)

github_iconTop GitHub Comments

3reactions
TrplMcommented, Jun 7, 2016

Temporary fix as stated here is to add

“Areas/ * /.cshtml”

2reactions
artiomchicommented, Nov 10, 2016

Sure,

I just created a new blank ASP.Net project, added an area (see last commit), and then tried to build+publish. The area is missing in the outputs.

Then added the patch described above (Areas/**/*.cshtml) and the area views appeared in the publish outputs.

Created a blank repository with it: artiomchi/WebApplicationAreaPublishTest

Read more comments on GitHub >

github_iconTop Results From Across the Web

Areas/**/Views glob is not working in publishOptions ...
Publish to IIS with Visual Studio 2015 with ASP.net Core RC2 and Web Deploy 3.6 (with server rc2 components installed).
Read more >
Project Configuration
json files are located in each project's folder. Nx merges the two files to get each project's configuration. The full machine readable schema...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found