gpt4 book ai didi

c# - 从一台电脑复制到另一台电脑后,WebService (.asmx) 功能未显示

转载 作者:太空宇宙 更新时间:2023-11-03 10:30:36 25 4
gpt4 key购买 nike

我有一个由 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 ==========

最佳答案

创建webservice后,必须部署到IIS中,文件可能丢失的原因可能是项目可能没有部署到第二个系统中。如果您采用相同的项目,请始终重建并再次发布

关于c# - 从一台电脑复制到另一台电脑后,WebService (.asmx) 功能未显示,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30371141/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com