使用<devenv>标签和<msbuild>标签之间的主要区别在于CruiseControl.NET?
我理解他们调用不同的可执行文件,但有时我得到不同的结果(在编译时通过/失败),我想知道为什么两个构建命令之间存在差异.
.net cruisecontrol.net continuous-integration visual-studio-2008 visual-studio
我有一个.NET Remoting服务,大部分时间都可以正常工作.如果发生异常或错误,它会将错误记录到文件中,但仍会继续运行.
但是,大约每两周一次服务停止响应客户端,这会导致客户端应用程序因SocketException崩溃并显示以下消息:
A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond
Run Code Online (Sandbox Code Playgroud)
没有异常或堆栈跟踪写入我们的日志文件,所以我无法弄清楚服务崩溃的位置,这使我相信它在我的代码之外的某个地方失败了.我可以采取哪些额外步骤来找出这次崩溃的根本原因?我会想象它会在某个地方向EventLog写一些东西,但我对Windows的事件记录系统并不是很熟悉,所以我不确定在哪里看.
在此先感谢任何帮助.
编辑:忘记提及,停止或重新启动服务什么都不做,服务永远不会响应.在我再次启动服务之前,我需要手动终止进程.
编辑2:
public class ClientInfoServerSinkProvider :
IServerChannelSinkProvider
{
private IServerChannelSinkProvider _nextProvider = null;
public ClientInfoServerSinkProvider()
{
}
public ClientInfoServerSinkProvider(
IDictionary properties,
ICollection providerData)
{
}
public IServerChannelSinkProvider Next
{
get { return _nextProvider; }
set { _nextProvider = value; }
}
public IServerChannelSink CreateSink(IChannelReceiver channel)
{ …Run Code Online (Sandbox Code Playgroud) 我有一个WebBrowser文档设置为编辑模式.我试图通过使用来操纵body元素的内部文本WebBrowser.Document.Body.InnerText,但是,WebBrowser.Document.Body仍然为null.
这是我创建文档内容的代码:
private WebBrowser HtmlEditor = new WebBrowser();
public HtmlEditControl()
{
InitializeComponent();
HtmlEditor.DocumentText = "<html><body></body></html>";
myDoc = (IHTMLDocument2)HtmlEditor.Document.DomDocument;
myDoc.designMode = "On";
HtmlEditor.Refresh(WebBrowserRefreshOption.Completely);
myContentsChanged = false;
}
Run Code Online (Sandbox Code Playgroud)
我可以编辑代码,一切都很好,但我不明白为什么HtmlEditor.Document.Body仍然是null.我知道每当我需要将文本加载到表单中时,我总是可以重置文档正文,但我更愿意理解为什么它的行为方式,如果没有别的知识.
非常感谢任何帮助.
好吧,所以我在StackOverflow上询问了几个关于.NET Remoting的问题,并且总是至少有一个人不得不插手,".NET Remoting已被弃用,而是使用WCF." 我知道它已被弃用,并且无法保证将来支持新版本的.NET Framework.但是我们想要转移到WCF还有哪些其他好的理由呢?我已经看到了.NET Remoting的一些主要的小麻烦,然而,这还不足以改变那些坚定地相信"如果它没有破坏,不解决它"的权力.此时,态度将改变的唯一原因是.NET Remoting是否已从.NET Framework的未来版本中删除,那么谁知道这将会持续多久?
有没有人知道为什么WCF比.NET Remoting"更好",或者为什么Remoting不如WCF?每种技术的优缺点是什么?您是否可以使用WCF进行其他操作而不使用Remoting?
我的意思是,如果我能说服他们让我们将软件迁移到WCF只是为了允许在客户端设置可配置的TcpChannel超时(这似乎已经被打破了一段时间,无论采取什么步骤,那将是很棒的或者我尝试排除故障),当发生这种情况时,它会使我们的软件看起来像绝对的东西.
在此先感谢您帮助阐明这一点.
注意:我试图
packer.exe作为后台进程运行来解决构建器的特定问题azure-arm,并且我需要观察输出。我没有使用Start-Process,因为我不想使用中间文件来使用输出。
我将以下代码设置packer.exe为在后台运行,以便我可以使用其输出并对特定日志消息采取行动。这是一个较大脚本的一部分,但这是有问题的,行为不正确:
$builderDir = ( Split-Path -Parent $PSCommandPath )
Push-Location $builderDir
# Set up the packer command to run asynchronously
$pStartProps = @{
FileName = ( Get-Command -CommandType Application packer ).Source
Arguments = "build -var-file ""${builderDir}\win-dev.pkrvars.hcl"" -only ""azure-arm.base"" ."
UseShellExecute = $false
RedirectStandardOutput = $true
RedirectStandardError = $false
LoadUserProfile = $true
}
$pStartInfo = New-Object ProcessStartInfo -Property $pStartProps
$p = [Process]::Start($pStartInfo)
while ( $null -ne ( $output = $p.StandardOutput.Readline() ) -or …Run Code Online (Sandbox Code Playgroud) 我需要将一个WYSIWYG控件添加到.NET表单中.我在SpiceLogic的几个网站上发现了这个,并想知道这是否是一个像样的库?
http://www.spicelogic.com/Products/NET-Win-HTML-Editor-Control-8/
如果有人有任何额外的意见,我也想知道任何其他不错的选择,包括免费和非免费.
在此先感谢对此的任何意见!
编辑之前应该澄清这一点,但这是一个桌面应用程序.
我有一个用C#编写的服务,当计算机进入睡眠模式时,它看起来并不干净.用户需要手动停止并重新启动服务以保留功能.我知道问题是什么,但我不知道在哪里解决它.进入/退出睡眠和休眠状态时Windows服务如何表现?
可能重复:
将枚举转换为另一种类型的枚举
在不同类型的枚举之间进行转换时,是否可以直接从一种类型转换为另一种类型?
LicenseTypes type;
TypeOfLicense type2;
type2 = (TypeOfLicense)type;
Run Code Online (Sandbox Code Playgroud)
或者是否有必要先将枚举转换为int?编译器没有抱怨,但我想确保我不会在运行时获得某种时髦的转换异常.
这可能看起来很奇怪,但两个枚举在结构和价值上都是相同的.在这种情况下,只有类型名称不同.
我正在尝试在 Linux 上的 PowerShell 7 中设置 NuGet 包提供程序,以便我可以用来Install-Package从 NuGet Gallery 获取包。但是,当我运行时:
Install-PackageProvider -Name NuGet -Force
Run Code Online (Sandbox Code Playgroud)
我收到以下错误:
Install-PackageProvider: No match was found for the specified search criteria for the provider 'NuGet'.
The package provider requires 'PackageManagement' and 'Provider' tags. Please check if the specified
package has the tags.
Run Code Online (Sandbox Code Playgroud)
我做了一些搜索,发现这个网站和其他网站上出现了这个错误的一些问题,一些答案说我需要强制 TLS 1.2:
[System.Net.ServicePointManager]::SecurityProtocol = [System.Net.SecurityProtocolType]::Tls12
Run Code Online (Sandbox Code Playgroud)
有的说指定-RequiredVersion,Install-PackageSource有的说使用-ForceBootstrap,有的说使用-Force。这些都不起作用,我每次仍然遇到同样的错误。Get-PackageProvider将 NuGet 列为提供程序。
我也无法使用 PowerShell Core 在 Windows 上安装 NuGet 提供程序,并出现相同的错误。PowerShell Core 是否不支持此功能?