# Can not build an ASMX service for the second time

**URL:** https://talk.remobjects.com/t/can-not-build-an-asmx-service-for-the-second-time/26088
**Category:** Mercury
**Created:** [January 28, 2022, 5:42pm UTC](https://talk.remobjects.com/t/can-not-build-an-asmx-service-for-the-second-time/26088 "2022-01-28T17:42:08Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![Theo69](https://talk.remobjects.com/letter_avatar_proxy/v4/letter/t/35a633/32.png) [@Theo69](https://talk.remobjects.com/u/Theo69)
#### Post date: [January 28, 2022, 5:42pm UTC](https://talk.remobjects.com/t/can-not-build-an-asmx-service-for-the-second-time/26088/1 "2022-01-28T17:42:08Z")

</div>

To reproduce:

Open visual studio and create a new project - RemObjects Mercury, [ASP.Net](http://ASP.Net) Classic Web Service Application:

 ![image](https://talk.remobjects.com/uploads/default/original/3X/5/1/51e1e24cd98f2304c694ea8d9c67c74845e518af.png)

Press Next and Create. The new project is loaded.  
Click on Build, build Webservice:

 ![image](https://talk.remobjects.com/uploads/default/original/3X/8/3/83817a407b4b44eebdec3a8fe7bef86ab6344893.png)

After the build fails (because of some errors in the template, already gave Marc the details), try to do this again. You can’t because the menus are gone:

 ![image](https://talk.remobjects.com/uploads/default/original/3X/c/f/cfcf948e1dca6140d4c2c5207c7fee1156e2dc38.png)

---

<div class="post-metadata">

### Author: ![RemObjectsSoftware](https://talk.remobjects.com/user_avatar/talk.remobjects.com/remobjectssoftware/32/15947_2.png) [@RemObjectsSoftware](https://talk.remobjects.com/u/RemObjectsSoftware)
#### Post date: [January 28, 2022, 5:45pm UTC](https://talk.remobjects.com/t/can-not-build-an-asmx-service-for-the-second-time/26088/2 "2022-01-28T17:45:12Z")

</div>

Logged as [bugs://E25651](https://www.remobjects.com/portal/bugs/?id=E25651).

---

<div class="post-metadata">

### Author: ![RemObjectsSoftware](https://talk.remobjects.com/user_avatar/talk.remobjects.com/remobjectssoftware/32/15947_2.png) [@RemObjectsSoftware](https://talk.remobjects.com/u/RemObjectsSoftware)
#### Post date: [January 31, 2022, 12:58pm UTC](https://talk.remobjects.com/t/can-not-build-an-asmx-service-for-the-second-time/26088/3 "2022-01-31T12:58:16Z")

</div>

[bugs://E25651](https://www.remobjects.com/portal/bugs/?id=E25651) was closed as fixed.

---

<div class="post-metadata">

### Author: ![mh](https://talk.remobjects.com/user_avatar/talk.remobjects.com/mh/32/18050_2.png) [@mh](https://talk.remobjects.com/u/mh)
#### Post date: [January 31, 2022, 1:05pm UTC](https://talk.remobjects.com/t/can-not-build-an-asmx-service-for-the-second-time/26088/4 "2022-01-31T13:05:39Z")

</div>

For existing projects, you will need to manually fix the .elements file, replacing ` __VSVERSION__ ` in the import with the appropriate version number (eg 16 or 17)

```auto
<Import Project=“$(MSBuildExtensionsPath)\Microsoft\VisualStudio\v __VSVERSION__.0\WebApplications\Microsoft.WebApplication.targets” />

```

to

```auto
<Import Project=“$(MSBuildExtensionsPath)\Microsoft\VisualStudio\v16.0\WebApplications\Microsoft.WebApplication.targets” />

```

---

<div class="post-metadata">

### Author: ![Theo69](https://talk.remobjects.com/letter_avatar_proxy/v4/letter/t/35a633/32.png) [@Theo69](https://talk.remobjects.com/u/Theo69)
#### Post date: [January 31, 2022, 1:18pm UTC](https://talk.remobjects.com/t/can-not-build-an-asmx-service-for-the-second-time/26088/5 "2022-01-31T13:18:06Z")

</div>

Changed the elements file and the problem is gone. 👍
