Click here to Skip to main content
15,888,521 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
I have two files(Say x.json and y.json) in my wwwRoot folder of WebAPI's solution.

I do not want to publish this files on server.
As that files get included into wwwRoot folder of my site.

After publishing, my WebAPI is able to create new copy of these files.

How can I do this?

What I have tried:

I tried to add entries in exclude and publishexclude sections of Project.json file.
But It didn't work.

JavaScript
"exclude": [
    "wwwroot",
    "node_modules",
    "x.json",
    "y.json"
  ],
  "publishExclude": [
    "**.user",
    "**.vspscc",
    "x.json",
    "y.json"
  ]
Posted
Comments
Suvendu Shekhar Giri 24-Oct-16 2:30am    
Where these files are located?
at the root?
RebelStar 24-Oct-16 4:01am    
Ya. In wwwRoot Folder of WebAPI Solution. And even after publish located at same location.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900