简体   繁体   中英

How to change asp .net web service application build path instead of bin folder?

I am working asp.net web service application. Normally running time my application dll taken from bin directory. now i want to add some XML file and folder,so i want to change web service build directory.

I changed directory like this [ex:bin\\Common],but this kind of issue came.

Parser Error

Parser Error Message:** Could not create type 'WebService.MainLogic'.

Source Error:

Line 1:  <%@ WebService Language="C#" CodeBehind="MainLogic.asmx.cs" Class="WebService.MainLogic" %>

Source File: /MainLogic.asmx Line: 1

How can I change the directory?

you can copy bin folder to specific folder after build project.

Right Click on project and go to properties => Build Events

in Post-build event command line write below command :

xcopy /Q /Y "$(TargetPath)" "C:\\path\\to\\somewhere\\"

for more information see this link : Copy bin files on to Physical file location on Post Build event in VS2010

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM