从一台PC复制到另一台PC后,WebService(.asmx)功能不显示

时间:2015-05-21 10:29:41

标签: c# asp.net web-services

我有一个由webservices(.asmx)组成的项目。 关键是当我将该项目从我的一台计算机复制到另一台计算机然后编写了一个函数时,发生的事情是它没有抛出任何错误但它没有向我显示我编写的新函数并显示了所有的列表复制前声明的函数。

WebMethod代码如下:

[WebMethod]
public string test(string msg)
{
   return msg;
}

在输出标签中构建或重建后,显示:

1>------ Build started: Project: CabSoftService, Configuration: Debug Any CPU ------
1>C:\Program Files (x86)\MSBuild\12.0\bin\Microsoft.Common.CurrentVersion.targets(1635,5): warning MSB3245: Could not resolve this reference. Could not locate the assembly "Postcode". Check to make sure the assembly exists on disk. If this reference is required by your code, you may get compilation errors.
1>C:\Program Files (x86)\MSBuild\12.0\bin\Microsoft.Common.CurrentVersion.targets(2151,5): warning MSB3283: Cannot find wrapper assembly for type library "MSDATASRC". Verify that (1) the COM component is registered correctly and (2) your target platform is the same as the bitness of the COM component. For example, if the COM component is 32-bit, your target platform must not be 64-bit.
1>C:\Program Files (x86)\MSBuild\12.0\bin\Microsoft.Common.CurrentVersion.targets(2151,5): warning MSB3293: Could not resolve dependent COM reference "7c0ffab0-cd84-11d0-949a-00a0c91110ed" version 1.0.
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

1 个答案:

答案 0 :(得分:2)

创建def nav(number): while True: option = int(raw_input(number)) if filename == 1: createjob() elif option == "2": print filename elif option == "": print "empty" else: print "Option not available" def main(): print " 1 - option 1" print " 2 - option 2" nav("Choose an option:") main() 后必须在webservice部署,文件可能丢失的原因可能是项目可能没有部署在第二个系统中。如果你已经采取了相同的项目始终重建发布