0

I created a ASP.NET Website and pushed the entire code on TFS. But when i create a Build Definition in VSTS i do not see any template for the Website, all the templates are for ASP.NET Web application. The list of templates are shown in the below screenshot:

Screenshot: https://i.stack.imgur.com/j5IOa.png

So if i want to build a website in VSTS do I need to first convert it into the Web Application or is there a third party template available to build my Website in VSTS ?

Edited: The website project structure is show below: enter image description here

I have given the path till my project file in the Build Solution task as follows:

enter image description here

The build is successful but i get the message that nothing can be added in the Artifact as shown in the below screenshot:

enter image description here

Edited (Latest): When I create a new "Website" in VS 2017 i do not get a project file, only a .sln file is created, so for this website what template and its configuration can i use in VSTS or how can i create a project file(.csproj) so the whole website can come under that project file. The project structure is shown in below screenshot:

enter image description here

Any help will be greatly appreciated. Thanks in advance.

1 Answers1

0

To build website project, you can also use ASP.NET build process template.

The only difference is you should specify **\*.publishproj instead of **\*.sln in VS Build task.

enter image description here

You can also refer the answer in another post.

Marina Liu
  • 36,876
  • 5
  • 61
  • 74
  • Thanks for your quick reply. My website does not contain any project file, it only contains a Solution file. I have edited my question and added a screenshot related to structure of my Website Project. Can you please have a look ? – Shubham Khandelwal May 09 '18 at 09:06
  • So how did you create the website without any project? Or can you share it in one drive? – Marina Liu May 09 '18 at 09:29
  • Really sorry for confusion, I discovered I have a project file inside the CMS folder. Now I will try as you mentioned above to use the **\*.publishproj. Thanks. – Shubham Khandelwal May 09 '18 at 10:14
  • I have received a message "nothing can be added in the Artifact folder". I have edited the question and provided the screenshot. Can you please have a look ? Thanks in advance. – Shubham Khandelwal May 09 '18 at 10:34
  • @Sandy You specified `.csproj` in VS Build task. Please specify the `.publishproj` instead. – Marina Liu May 10 '18 at 01:48
  • Thanks for your reply. I have one more doubt related to building of Website on VSTS. I have edited my question. Can you please have a look? Thanks in advance. – Shubham Khandelwal May 10 '18 at 10:15
  • Since the question you initially asked has been solved, you can accept the answer. For the additional questions as you described in "Edited (Latest)", you can create a new post to describe with more details (such as show the detail steps how you create a website only with sln file etc). And it cab also benefit other members to read this question clearly :) – Marina Liu May 11 '18 at 08:21