简体   繁体   English

注册 .Net Standard 2.0 DLL 时忽略连接的 WCF 服务?

[英]Ignoring the connected WCF Service when registering a .Net Standard 2.0 DLL?

I currently have a .Net Standard DLL that I create through Visual Studio 2019. This library has a WCF service connected within it that contains a GetPassword and GetHealthCheck method in it.我目前有一个通过 Visual Studio 2019 创建的 .Net Standard DLL。该库中连接了一个 WCF 服务,其中包含一个 GetPassword 和 GetHealthCheck 方法。 When I build the .Net Standard project in release mode (I have it set to build for both Standard and Framework 4.7.1) the DLL is created, but when I register it all that I can see in my registry is the WCF methods.当我在发布模式下构建 .Net Standard 项目(我将它设置为为标准和框架 4.7.1 构建)时,DLL 被创建,但是当我注册它时,我在我的注册表中只能看到 WCF 方法。 My actual class methods aren't there, and they don't appear in the registry either.我的实际类方法不存在,它们也不会出现在注册表中。 我的 Visual Studio 窗口

我的注册表窗口

I would like to think that the registry values would be the CyberarkUserIDPasswordRetrieval class instead.我认为注册表值应该是 Cyber​​arkUserIDPasswordRetrieval 类。 Is there another setting within visual studio that I should flip to have it ignore the connected service?我应该翻转 Visual Studio 中的另一个设置以使其忽略连接的服务吗?

It's possible that your .cs files have been included in a manner which means they are not compiled.您的 .cs 文件可能以某种方式被包含在内,这意味着它们没有被编译。 Files added to a solution have an action associated with them:添加到解决方案的文件具有与之关联的操作:

Visual Studio 构建操作

(Example is for .vb or Visual Basic .net code files but the behaviour is the same) (示例适用于 .vb 或 Visual Basic .net 代码文件,但行为相同)

It usually doesn't make sense for the build action of a .cs file to be anything other than Compile . .cs 文件的构建操作通常是Compile之外的任何其他内容。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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